[pulseaudio-discuss] Choose remote default sink fromcommandline?

Dave DaveM at Mich.Com
Fri Nov 12 18:55:37 PST 2010


At 10:33 AM 11/12/2010, you wrote:
>At 11:50 AM 11/9/2010, you wrote:
>>On Tue, 2010-11-09 at 10:42 -0500, Dave wrote:
>> > At 05:31 AM 11/9/2010, you wrote:
>> > > > I tried adding each of the following (one at a time of course) to
>> > > > ~/.bashrc and none of these variations worked:
>> > > >
>> > > > export PULSE_SERVER=192.168.1.64
>> > >
>> > >This is the only form you need. I presume you logged out and back in
>> > >again after setting this env var?
>> > >
>> > >Try this on the command line and post the results:
>> > >
>> > >export PULSE_SERVER=192.168.1.64
>> > >export PULSE_LOG=99
>> > >paplay -vvv /usr/share/sounds/startup3.wav
>> >
>> > jmrt at ubuntu-JMRT:~$ export PULSE_SERVER=192.168.64
>> > jmrt at ubuntu-JMRT:~$ export PULSE_LOG=99
>> > jmrt at ubuntu-JMRT:~$ paplay /usr/share/sounds/purple/logout.wav
>> > D: memblock.c: Using shared memory pool with 1024 slots of size 64.0
>> > KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
>> > D: context.c: Trying to connect to 192.168.64...
>> > Connection failure: Connection refused
>> > jmrt at ubuntu-JMRT:~$
>> > - No sound was played
>>
>>Regarding the question of where to put the environment variable export
>>so that it's set for the whole session and not just terminal - I don't
>>think there's any standard place that will work everywhere. It's
>>possible to configure the system to have some environment variables
>>always set, but I don't know how it can be done specifically for your
>>system (I have done it in the past on my own system, but I don't
>>remember the specifics of that either).
>>
>>But if you want to set the server address
>>globally, /etc/pulse/client.conf or ~/.pulse/client.conf is much better
>>place for configuring that than setting environment variables in some
>>obscure start-up script.
>
>- I tried setting the server address in the following
>   places and none worked when i launch applications
>   from gnome:
>
>~/.bashrc
>/etc/pulse/client.conf
>~/.pulse/client.conf
>/usr/bin/start-pulseaudio-x11
>
>- I also tried un-commenting the following lines in client.conf and 
>that did not work either.
>
>; default-sink = davem at ubuntu-DGTM: HDA Intel - ALC888 Analog
>; default-server = davem at ubuntu-DGTM
>
>
>>Also, as Colin pointed out earlier, tunnels might make more sense than
>>connecting directly to the remote server. ..... the command for loading
>>a tunnel sink is basically the following:
>>
>>pactl load-module module-tunnel-sink server=192.168.1.64 
>>sink=<remote sink name> sink_name=mytunnel
>
>- I tried the following command:
>
>jmrt at ubuntu-JMRT:~$ pactl load-module module-tunnel-sink 
>server=192.168.1.64 
>sink=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0 sink_name=sink-DGTM
>
>15
>
>- It returns '15' which I assume is an error but I could not find 
>out what it means.
>
>>That creates a new local sink with name "mytunnel". When directing
>>applications to that sink the audio will be forwarded to <remote sink
>>name> (you'll have to figure out the remote sink name before loading the
>>tunnel sink module) at 192.168.1.64.
>>
>>I don't remember whether the module arguments had to be put within
>>quotes, so try this if the first command doesn't work:
>>
>>pactl load-module module-tunnel-sink "server=192.168.1.64 
>>sink=<remote sink name> sink_name=mytunnel"
>
>- I also tried it is quotes. This did not work either. Still returns '15'
>
>jmrt at ubuntu-JMRT:~$ pactl load-module module-tunnel-sink 
>"server=192.168.1.64 
>sink=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0 
>sink_name=sink-DGTM"
>
>15
>
>- Dave

I am trying this on another system (I dont have access to 
jmrt at ubuntu-JMRT this evening).

davem at davem-eee901:~$ pactl load-module module-tunnel-sink 
server=192.168.1.64 
sink=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0 sink_name=sink-DGTM

21


davem at davem-eee901:~$ pactl list
.
.
.
Module #21
         Name: module-tunnel-sink
         Argument: server=192.168.1.64 
sink=alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0 sink_name=sink-DGTM
         Usage counter: n/a
         Properties:
                 module.author = "Lennart Poettering"
                 module.description = "Tunnel module for sinks"
                 module.version = "0.9.21-63-gd3efa-dirty"
.
.
.
Sink #1
         State: SUSPENDED
         Name: sink-DGTM
         Description: HDA Intel - ALC888 Analog on davem at ubuntu-DGTM
         Driver: module-tunnel.c
         Sample Specification: s16le 2ch 44100Hz
         Channel Map: front-left,front-right
         Owner Module: 21
         Mute: no
         Volume: 0: 100% 1: 100%
                 balance 0.00
         Base Volume: 100%
         Monitor Source: sink-DGTM.monitor
         Latency: 0 usec, configured 0 usec
         Flags: NETWORK HW_MUTE_CTRL HW_VOLUME_CTRL LATENCY
         Properties:
                 device.description = "HDA Intel - ALC888 Analog on 
davem at ubuntu-DGTM"
                 tunnel.remote.server = "192.168.1.64"
                 tunnel.remote.sink = 
"alsa_output.pci_8086_293e_sound_card_0_alsa_playback_0"
                 device.icon_name = "audio-card"
                 tunnel.remote_version = "14"
                 tunnel.remote.user = "davem"
                 tunnel.remote.fqdn = "ubuntu-DGTM"
                 tunnel.remote.description = "HDA Intel - ALC888 Analog"
.
.
.
Source #2
         State: SUSPENDED
         Name: sink-DGTM.monitor
         Description: Monitor Source of HDA Intel - ALC888 Analog on 
davem at ubuntu-DGTM
         Driver: module-tunnel.c
         Sample Specification: s16le 2ch 44100Hz
         Channel Map: front-left,front-right
         Owner Module: 21
         Mute: no
         Volume: 0: 100% 1: 100%
                 0: 0.00 dB 1: 0.00 dB
                 balance 0.00
         Base Volume: 100%
                      0.00 dB
         Monitor of Sink: sink-DGTM
         Latency: 0 usec, configured 0 usec
         Flags: DECIBEL_VOLUME LATENCY
         Properties:
                 device.description = "Monitor Source of HDA Intel - 
ALC888 Analog on davem at ubuntu-DGTM"
                 device.class = "monitor"
                 device.icon_name = "audio-input-microphone"

.
.
.

- So it looks like it is creating the tunnel to the server.
- How do I set this tunnel as the default sink (so apps launched from 
gnome will use it)?

- Dave 




More information about the pulseaudio-discuss mailing list