How to redirect pulse audio through ssh?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/]




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux