I use the Pulseaudio Device Chooser to set the default sink (on a laptop) to a remote server. This works fine. When i reboot my laptop, the default sink reverts back to "default" (the laptop sound card). Is there a way to get the laptop to continue to use the remote server after a reboot? Is there a command that I can run in a script on startup to change the default sink back to the remote server?

I am running Ubuntu 9.04 on this machine.

Looks like there is a problem creating the tunnel with the version of pulse used in the ubuntu 9.04 distribution. If I do the following on ubuntu 10.04 it works:

pactl load-module module-tunnel-sink "server= sink=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0

pacmd set-default-sink sink-DGTM

Unfortunately this does not work on ubuntu 9.04. The syslog shows:

Nov 13 14:45:33 ubuntu-JMRT pulseaudio[3473]: module-tunnel.c: Stream died.

So I am going to assume that there is a bug in this version of pulse. Although it does work with padevchooser, I can not get it to work from the command line. I also tried adding the following to /etc/pulse/default.pa and got the same results:

load-module module-tunnel-sink server=
sink=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0 sink_name=sink-DGTM
set-default-sink sink-DGTM


Nov 13 14:45:33 ubuntu-JMRT pulseaudio[3473]: module-tunnel.c: Stream died.

So I am back to trying to figure out where to export PULSE_SERVER so that apps launched from gnome see it when I reboot.

I tried adding:

export PULSE_SERVER=tcp:

to: ~/.bashrc

This works if I launch apps from the console but does not work if I launch apps from gnome.

I also tried adding this export to:


but none of the above worked.

  • At boot, or on login? Nov 14, 2010 at 2:16
  • I think Ubuntu loads pulse at login?
    – Dave M
    Nov 14, 2010 at 4:34

2 Answers 2


http://pulseaudio.org/wiki/DefaultDevice - default is not the same as fallback in PulseAudio. One can't really set a "default" device as described in the link within PulseAudio itself.

The "correct" way to do it would be to define a remote sink via module-tunnel-sink as you are trying to do. You say it is not possible on that version of PulseAudio, and then I can only recommend you to recheck syntax or upgrade in some way. Setting PULSE_SERVER can be done for login shells as in Gilles's answer. Below I write explicitly about my solution (with a recent PulseAudio version).

My exact lines from /etc/pulse/default.pa:

.ifexists module-tunnel-sink.so
load-module module-tunnel-sink server= sink=alsa_output.pci-0000_00_1b.0.analog-stereo sink_name=d-f05

...just as you try to do. If this works, then you can set a "true default" via e.g. gnome-volume-control, where your aliased sink should show up as an available output device.

This way makes you able to switch output on the fly for all applications.

The definition of the remote sink can also be done nicer via Avahi, but I haven't been able to get that to work here just yet (not a PulseAudio problem).


The right place to set environment variables when you log in is, in most cases, ~/.profile.

~/.bashrc is a configuration file of the bash shell, read at startup by interactive instances of bash. It's not the right place to set an environment variable, because they would only be set in processes started from an interactive shell, as you've observed.

~/.profile is read by most login methods. However, depending on your distribution, display manager and session type, it may not be read when you log in in graphics mode. It is loaded in the default configuration on Ubuntu 10.04, but I'm not sure about 9.04. If it's not loaded, try ~/.gnomerc or ~/.xsession.

See also Difference between .bashrc and .bash_profile.

  • Adding "export PULSE_SERVER=tcp:" (where is the IP address or DNS name of the remote pulse audio server) to ~/.profile works. Thank you.
    – Dave M
    Nov 14, 2010 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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