'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 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 :) > 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). 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 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 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/]