[pulseaudio-discuss] PulseAudio ssh -X equivalent
Anton Lundin
glance at acc.umu.se
Wed Feb 2 03:36:54 PST 2011
On 02 February, 2011 - Yves (theYinYeti) wrote:
> Hello,
>
> Le 02/02/2011 09:50, rozelak at volny.cz a écrit :
>> Hallo
>> I would like to ask if there is (planned) something as -X option in ssh for
>> PulseAudio as well. I know from the pulseaudio FAQ that it supports
>> playback over the network, but I would like to have it working
>> transparently - playing on my desktop office computer when I sitting in
>> from of it, or playing through my laptop speakers when ssh-ing to the
>> office desktop and invoking *play commands on the desktop remotely.
>
> I'm far from being a pulseaudio expert, but I remember someone wrote that
> this can't be done transparently for now.
> However, doesn't pulseaudio listen on a TCP port? If so, let's assume
> this port to be 1234, then something along the lines of this should work
> :
>
> client>$ ssh -R 1234:localhost:1234 server
> ...
> server>$ export PULSE_SERVER=localhost:1234
> (I'm not sure about the name of the env variable)
>
I would sugest to use unix sockets instead of tcp to get some control
who on the remote machine can get access to your pulse-server.
eg:
logon to the remote machine and prepare the enviorment there.
local$ ssh remote
remote$ mkdir -m 700 /tmp/pulse-remote
remote$ export PULSE_SERVER=unix:/tmp/pulse-remote/native
use a separate terminal to create a remote listening socket:
local$ socat EXEC:'ssh remote "socat STDIO UNIX-LISTEN:/tmp/pulse-remote/native"' UNIX-CONNECT:$HOME/.pulse/`cat /var/lib/dbus/machine-id`-runtime/native
play some music in your remote terminal.
remote$ mplayer my-music.mp3
//Anton
--
Anton Lundin +46702-161604
More information about the pulseaudio-discuss
mailing list