[pulseaudio-discuss] Odd behaviour with remote startX session
Anil Seth
seth.anil at gmail.com
Sun Jun 28 05:14:16 PDT 2009
On Sun, Jun 28, 2009 at 3:30 PM, Colin Guthrie<gmane at colin.guthr.ie> wrote:
> 'Twas brillig, and Anil Seth at 28/06/09 07:06 did gyre and gimble:
>>
>> Hi,
>>
>> I need to use startx to connect to a remote machine. The xinitrc contains
>> start-pulseaudio-x11
>> ssh -X user at remote.host ". .bash_profile;gnome-session"
>>
>> Sound does not play on tty7 (gui)
>> However, if I switch to tty1, it plays!
>> The bash_profile sets the PULSE_SERVER variable.
>
> Why does it set the PULSE_SERVER variable? start-pulseaudio-x11 should load
> the x11 module which, in turn, should set the PULSE_SERVER property on the
> root window. (xprop -root | grep PULSE). This should then be forwarded over
> ssh and available at the client side...
>
I checked but it does not do so. However, if I use
X -query remote.host
then the variable is set.
>> I had tried running pulseaudio as a daemon for the user. It was the
>> same behaviour.
>> I assumed that x11-publish was the issue and tried starting pulseaudio
>> with x11 modules from within startx but it did not help.
>
> If you look at the start-pulseaudio-x11 script it loads those modules for
> you :)
>
An error in my explanation. I was first using the pulseaudio command.
Then, I realised that start-pulseaudio-x11 command may be needed so
that the additional modules are loaded.
>> I must be missing something obvious. The distribution is Fedora11.
>> Any help about where to look would be greatly appreciated.
>
> There could be one of two problems here as I see it (2 is more likely).
>
> 1. The client side is not allowed to talk to the server side - make sure
> that your PULSE_SERVER variable is definitely set correct (either in xprops
> or via standard env var) and make sure you can at least talk to the server
> (just run pavucontrol for example).
>
If I login as root on and run the startx command with the same xinitrc
file, the behaviour is fine.
> 2. For whatever reason, the "session" is no longer active and ACLs on the
> audio devices have been removed for your user. To explain, a bit of software
> called ConsoleKit is responsible for setting and removing ACLs on the audio
> device nodes (/dev/snd/*). This allows things such as logging in with two
> different users and switching between then. ConsoleKit knows which session
> is "active" and thus applies the appropriate ACLs to the device nodes so
> that the user with the active connection has permission but inactive users
> do not. What could be happening here is that while you are can talk to the
> pulse server fine (tested using 1 above), pulse itself is no longer allowed
> to use the audio h/w due to the ACL being removed. You can check this via
> ck-list-sessions. Make sure you ssh back to the first machine to run that
> command tho' :D
Expectedly, there is only one session for the logged in user ('anil')
>
> When you switch vt, console kit notices this and will change the ACL
> literally as you switch vt, thus giving you permission again. You can test
> this easily by doing the following in a perminal in the X session: sleep 5;
> paplay /usr/share/sounds/startup3.wav
>
The console kit changing permissions is very useful. My wife and I are
often logged in together and now a common sound server is not an
irritant any more.
It is clear now that switching to tty7 makes ConsoleKit remove the
permissions to the audio even though it is owned by the correct user.
crw--w----. 1 anil anil 4, 7 2009-06-28 17:27 /dev/tty7
I suppose it looks like a distribution issue and I should raise it in Fedora.
> And then switching to the VT and seeing if you can hear anything after a
> small delay!
>
> HTHs track down where the issue lies.
>
> Col
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
> Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
> Mandriva Linux Contributor [http://www.mandriva.com/]
> PulseAudio Hacker [http://www.pulseaudio.org/]
> Trac Hacker [http://trac.edgewall.org/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>
Thanks & regards
Anil
More information about the pulseaudio-discuss
mailing list