[pulseaudio-discuss] How to redirect pulse audio through ssh?

Quinn Plattel qiet72 at gmail.com
Fri May 20 09:45:33 PDT 2011


Thanks for info, but I don't think it is the solution I am interested in. I
have to use ssh as my server is behind a firewall
and ssh is the only way to contact it.  The other thing is I would like to
use vnc to work with my server.

Right now, I am doing this:

client: ssh -L 5901:localhost:5901 user at server
client: vncviewer localhost:5901

Of course vnc, does not support sound so I was hoping that I can use ssh
tunnels to redirect the sound somehow.

I did some "xprop -root|grep PULSE" tests.  If I ssh to my server from an
Ubuntu Linux machine, then I can see four PULSE variables in use.
If I do the xprop test from Maemo Linux, then it shows no PULSE variables.
If I ssh from there to my server with the -X parameter, then there is also
no PULSE variables shown.
I can confirm that pulseaudio is working on Maemo by doing a "mplayer -ao
pulse some-sound-file.wav"


On Fri, May 20, 2011 at 5:48 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:

> Hi,
> 'Twas brillig, and Quinn Plattel at 20/05/11 15:52 did gyre and gimble:
> > I am currently trying to attempt to redirect pulse audio sound from a
> > server to a client through ssh.  I am bit unclear on what the correct
> > way is of doing it.
> Firstly, I wrote up how our X11 piggy backing stuff work here:
> http://colin.guthr.ie/2009/08/sound-on-linux-is-confusing-defuzzing-part-2-pulseaudio/
> Technically we do not tunnel over SSH directly (this can of course be
> done, but not automatically as SSH does not know about PA in the same
> way it knows about X11). We can however piggy back on the X11 forwarding
> built into SSH for our authentication (cookie) and server connection
> strings.
> If this is on a private network (direct routing) then the built in way
> is the best, but it doesn't go over SSH. You just need to ensure the
> machine you're sshing from has the netwrok protocol module loaded into
> PA (pactl load-module module-protocol-native-tcp, or put it in your
> default.pa) and make sure port 4713/tcp is open for external connections.
> Also ensure that module-x11-publish is loaded on the client side and you
> should get some interesting results from "xprop -root | grep PULSE".
> Then when you ssh with x11 forwarding running the xprop command on the
> remote machine should show you the same results.
> If you cannot use the direct connection, just setup TCP tunnels in your
> SSH config and then hack the PULSE_SERVER property or env var on the
> remote machine to point to e.g. localhost:4713 which will actually be a
> tunnel back to localhost:4713 on the remote machine. The PULSE_COOKIE
> stuff already forwarded should be enough for auth.
> For debugging connections:
> PULSE_LOG=99 pactl stat
> This shows you e.g. the server name it's trying to connect to etc.
> Hope that helps (although I wrote it really quick so apologies if it
> doesn't! I'll clarify later if needs be :D)
> Col
> --
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mageia Contributor [http://www.mageia.org/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Best regards/Med venlig hilsen,
Quinn Plattel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110520/6ed499f5/attachment.htm>

More information about the pulseaudio-discuss mailing list