Can't access server sound card when vnc'd into ubuntu server

0

I've set up my ubunutu 10 server with xfce, nxserver, and now tightvncserver so that I can control it remotely from my Windows 7 laptop. NX is working fine for remote access, but when I run (for example) exaile, no sound will be sent through the server's sound card. I installed tightvncserver and connected, but ran into the same problem. Exaile opens, sound isn't muted, I can see that sound cards are installed (via cat /proc/asound/cards), but I can't seem to get the remote sessions to access the server's sound card.

Also, just to confirm that the sound card was working I hooked up a montior/keyboard to the server and opened a local xfce session. That worked fine. While I had the local session running, I was also able to open a remote session with NXClient and start exaile - which then successfully piped sound to the local card. After disconnecting the monitor/keyboard and moving the box back to its normal spot, though, I was not able to play sound via either an NX or VNC session.

Does anyone have any suggestions? Surely it's possible to configure my remote sessions to pipe sound to the server's sound card, right? Or at least get xfce up and running without a monitor or keyboard but with access to the sound card so I can VNC into it?

Thanks!

Nate Kennedy

Posted 2011-01-29T20:17:20.043

Reputation: 1

Answers

1

On Ubuntu, ConsoleKit manages device permissions, among other things. The owner of the currently active (foreground) session is added to the ACLs for device nodes /dev: Run getfacl /dev/audio in a local session and you should see your username there.

However, this does not yet work with SSH. I tried ck-launch-session over a SSH connection, and ConsoleKit wouldn't mark the session as "active". The [ConsoleKit TODO] file still lists:

  • Make openssh report sessions correctly
    Not as easy as just using the PAM module.

I do not have a VNC server installed, so I couldn't test, but editing your VNC session startup script (I assume VNC does have a session startup script) to run, for example, ck-launch-session xfce4-session instead of just xfce4-session could work.

Use ck-list-sessions to see if yours is marked as active = TRUE.


The old way of assigning permissions was to add yourself to the audio group, which owns all audio device nodes in /dev. Use sudo gpasswd -a $USER audio (and remember that it will not affect currently open sessions).

user1686

Posted 2011-01-29T20:17:20.043

Reputation: 283 655