Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I frequently need to login from my desktop into my laptop using FreeNX, I am able to redirect the audio from session running on the laptop by setting the pulse audio default server using the "padevchooser" applet, setting it to the IP of my desktop.

Is there an easy way to achieve this from the freenx session login ? For example overriding the PA default server from the .bash_profile?

share|improve this question

Exporting the current pulseaudio server to a X-session root window can be done with

pax11publish -e -S <pa-server>

This will export the currently used source, sink, and configuration of <server-pa> to the X11-session window.

Switching back to default is done by

pax11publish -e -r

We have however no experience and can not test how FreeNX does this and if that command is applicable.

share|improve this answer
I need the opposite behaviour, I need the local X-session to import the source/sink from a remote PA server. – João Pinto Jul 27 '11 at 14:51

It was easier than I expected, looking into the source code from padevchooser I found that the server can be set from an environment variable, PULSE_SERVER, the following code on my ~/.bash_profile did it:

if [ -n "$NXSESSIONID" ]; then
  export PULSE_SERVER="local_desktop_ip"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.