Ubuntu: How To Disable PulseAudio Remote Sound


I have been running my music player (Clementine) headless on a file server that is plugged into my stereo. I open the player up on my workstation via ssh X11 forwarding (ssh -f -X me@fileserver 'clementine') and it used to play fine out of my stereo's speakers.

I enabled pulseaudio on my workstation this evening and now I can't get any sound from Clementine because it's picking up the PA driver on my workstation and is trying to play through that. How do I tell the PA libs on my fileserver to always use the local sound system rather than the network one? I can still listen to music by logging into the file server with VNC and starting Clementine from there, but that is a pain.


Set and export the PULSE_SERVER environment variable to be the path of the Unix domain socket of the pulseaudio server that is running on your file server. For example, I use:

export PULSE_SERVER=/run/user/1000/pulse/native  

The exact path will depend on how pulseaudio is configured on your file server.

After you export PULSE_SERVER, then run Clementine.

Documentation of PULSE_SERVER is here on freedesktop.org.

For another possible solution (that I have not verified) see this answer:
How to start/configure pulseaudio remotely with ssh?


Somewhat of a fix for anyone else with this problem. I wrote a quick script which removes the pulseaudio xprops and then starts Clementine. It's below in case anyone else needs it, although I would prefer a "don't do that!" checkbox...

#!/bin/bash  for p in PULSE_COOKIE PULSE_SERVER PULSE_SESSION_ID PULSE_ID; do    xprop -root -remove $p  done  clementine  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »