[pulseaudio-discuss] Audio over SSH
Colin Guthrie
gmane at colin.guthr.ie
Tue Feb 2 01:38:15 PST 2010
'Twas brillig, and Jeremy Nickurak at 01/02/10 22:53 did gyre and gimble:
> What's the right magical incantation to expose an audio sink over ssh to
> another machine? Google turns up several results, but they generally
> involve using socat to get access to the unix demain socket and other
> oddness.
>
> Integration into a project like synergy might be interesting....
> basically I have a machine I'm using with no speakers, next to a machine
> with speakers. They're not on the same network, not even routable in the
> revelant direction... but I can make SSH work.
So the easiest way is to:
1. On the machine where you want to hear things, run paprefs and enable
network access to local sound devices. To save trouble, it's easiest to
tick the box "do not require authentication" too but I'll assume you
have not ticked this box (if things break, this is step one to check!)
2. Ensure start-pulseaudio-x11 has been run on this machine (xprop
-root| grep PULSE will tell you) and if not, run it.
3. ssh -X -R 4713:localhost:4713 othermachine
4. export PULSE_SERVER=localhost
5. Run any pulseaudio client.
That's it.
This should setup a reverse SSH tunnel from the destination machine back
to the source machine. PA uses TCP port 4713 by default for it's network
support and we override the PULSE_SERVER variable on the remote machine
to point at localhost which is, in turn, a tunnel over SSH back to our
source machine which connects to the PA servers network socket.
Other information regarding authentication etc. should be passed across
in X11 properties (the -X flag to ssh ensures this although I believe it
is generally enabled by default anyway).
Of course if SSH were aware of PA in the same way it's aware of X11,
then this wouldn't be needed and it would just work. Perhaps one day :)
Hope this helps.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list