How to Get ssh -X Session to Use Host’s Sound Settings

pulseaudiosoundssh

I have a USB sound card on a host system which has all my music, and to which I have connected my living room speakers.

I would like to use my laptop to ssh -X into that system and run my favorite music player remotely, so that sound is played on the USB sound card on the host system.

However, when I ssh in, and start the music player, it does not seem to see my sound settings there (even though I'm logged in with the same user with which I would normally log in) and will only play using the internal sound card.

Is there a way that I can make the ssh session pick up the (I assume) pulseaudio settings that I get on normal logins?

Best Answer

pulse-client.conf man page suggests you may be able to set the PULSE_SERVER environment variable to change which pulseaudio it talks to. So if you

  1. on the host machine run xprop -root PULSE_SERVER > pulseaudio-server.txt

  2. ssh -X (or actually ssh -Y is better) to that machine with the laptop

  3. run export PULSE_SERVER= to whatever xprop -root PULSE_SERVER said

  4. run your music player

Answer via +Ray Strode on google+

Related Question