accessing DVB-S tuner and media files remotely from another machine

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
leo.smith
Level 1
Level 1
Posts: 27
Joined: Wed Jan 02, 2013 12:23 pm

accessing DVB-S tuner and media files remotely from another machine

Post by leo.smith »

The problem:
A machine can run e.g. kaffeine or VLC and access a DVB-T or DVB-S hardware, but you want to watch the TV program on another machine on the same network.

The solution: to redirect X windows and sound to a remote client machine.

Client configuration
On the client machine you have to set both the X-server and pulse audio servers to accept incoming
Edit (as root, or using sudo) the two files:

/etc/pulse/default.pa

and add the line

load-module module-native-protocol-tcp auth-ip-acl="192.168.0.100"

(where 192.168.0.100 is the IP address of your DVB equipped server)
and also edit (with root permissions) the display manager file (I use mate, so its mdm)

/usr/share/mdm/defaults.conf

and change the line

DisallowTCP=true

to

DisallowTCP=false

In my laptop I also needed to change this line

StandardXServer=/usr/bin/X -audit 0

to
StandardXServer=/usr/bin/X -listen tcp -audit 0

At this point your client is fully capable of receiving video and audio from a remote X program that uses pulse, provided that you set up the far end correctly.

Server configuration
This was complex, so I scripted it.

At some level you need to create this script and make it executable.

#!/bin/sh
# start in the right place - this is where my hoard of multimedia files is mounted so starting there makes kaffeine default to search that for pre-recorded material
cd /var/videos
# this fixes some errors that I don't understand
export $(dbus-launch)
#detect IP address of remote client
IP=`echo $SSH_CONNECTION | awk '{print $1}'`
#redirect pulse audio to it
PULSE_SERVER=$IP:'4713'
# set default X display to remote client
DISPLAY=$IP:0.0
export PULSE_SERVER
export DISPLAY
# run kaffeine with all info and errors redirected to outer space
kaffeine > /dev/null 2>&1

Now I had already set up ssh so that I use passwordless logins to access the server, so on the client machine all I have to do is run:

ssh <myserver> <path/to/my/script-above>

If you wrap that up in a desktop launcher its a one click to launch kaffeine on the remote machine but watch and listen to it on your local client

Be aware that it needs fair bandwidth. Bad wifi may not be enough...

....and indeed it really isn't. you need 100Mbps minimum
Last edited by leo.smith on Tue Nov 21, 2017 8:18 pm, edited 1 time in total.
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

Re: accessing DVB-S tuner and media files remotely from another machine

Post by mr_raider »

Ingenious. I use a slightly different technique.

I install a PVR software on the machine hosting the tuner, this is the "backend". I personally use HTS-tvheadend, but have used mythtv in the past.

I then install a front end software on the target machine, usually Kodi. I can then use kodi on the front end to control, view and record streams on the backend.
Image
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: accessing DVB-S tuner and media files remotely from another machine

Post by jimallyn »

Nice. I tried to access Pulse remotely one time and gave up. I will bookmark this page!
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
leo.smith
Level 1
Level 1
Posts: 27
Joined: Wed Jan 02, 2013 12:23 pm

Re: accessing DVB-S tuner and media files remotely from another machine

Post by leo.smith »

now of course on this identical software laptop, it isn't accepting X despite editing the same files in the same way. netstat shows port 6000 is not listening :(
Neil Edmond
Level 6
Level 6
Posts: 1346
Joined: Thu Dec 26, 2013 10:19 am
Location: N.E. AR USA

Re: accessing DVB-S tuner and media files remotely from another machine

Post by Neil Edmond »

It may be a while before I get around to setting it up, but I plan on a system something like the technique mr_raider is using. Bookmarking this too.
Post Reply

Return to “Tutorials”