[pulseaudio-discuss] Choose remote default sink fromcommandline?

Dave DaveM at Mich.Com
Mon Nov 8 19:26:18 PST 2010

At 04:25 AM 11/8/2010, you wrote:
>'Twas brillig, and Dave at 08/11/10 02:21 did gyre and gimble:
> > At 01:56 PM 11/7/2010, you wrote:
> >> 'Twas brillig, and Dave at 07/11/10 14:48 did gyre and gimble:
> >> > 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.
> >>
> >> padevchooser doesn't work in the nicest way possible. We've been openly
> >> telling people it's deprecated for some years now!
> >>
> >> Anyway, you can do something like: "export PULSE_SERVER=remotemachine"
> >> in your .bashrc file.
> >>
> >> This will bypass your local PA completely on any ever use a remote
> >> server.

I tried adding each of the following (one at a time of course) to 
~/.bashrc and none of these variations worked:

export PULSE_SERVER=tcp:
export PULSE_SERVER=tcp:
export PULSE_SERVER=tcp:ubuntu-DGTM.gateway.2wire.net
export PULSE_SERVER=ubuntu-DGTM.gateway.2wire.net

Which of these (if any) looks correct? I can ping the IP address or 
the name and both are valid. Is there a log file that I can look at 
to see if there is an error or some other clue as to why this is not working?

> >>
> >> That said, as you are using a laptop this is not likely the best
> >> approach. Better to use tunnels (with avahi for auto detection) as when
> >> you resume your laptop from suspend when away from your "home network"
> >> then you'll still have working sound.

It will work fine since this laptop is only used on the home network.

>Basically just tick all the
> >> relevant boxes in paprefs and things work by themselves. Make sure you
> >> set up both sides tho'.

I already have the laptop working with the server. So I assume that I 
have the server configured correctly. I have no problems getting my 
apps to stream audio to a sound card on a remote server.

I am just looking for a way to set the default sink to the remote 
server (so the user does not have to select the remote server each 
time the laptop is rebooted).

>Really what you aim for is for your tunnel sinks to appear along side
>the local sinks in e.g. pavucontrol. If you can get this working (and it
>really should just be a matter of ticking the boxes in paprefs and
>ensuring firewalls are suitably open etc) then you're home free. You can
>just move the application in question to the tunnel device.

This works if I use padevchooser. I just make the remote server the 
default sink and it works. But I can not get the setting to remain 
after I reboot the laptop. It always reverts back to the laptops sound chip.

When I mouseover the menu (on the laptop after I set it to use the 
remote server as the default sink) I get the following info regarding 
the sink on the remote server:

Name:   davem at ubuntu-DGTM: HDA Intel - ALC888 Analog
Server:  tcp: ubuntu-DGTM.gateway.2wire.net
Device:  alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0

Thanks again for your help.

More information about the pulseaudio-discuss mailing list