Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I configured my Ubuntu system so that I'm able to start any application in a separate X server. Running games or for example XBMC in a separate X server has some major advantages.

The problem however, is that when you switch to the second X server (Ctrl+Alt+F8), you don't hear any sound. Strangely, when switching back to the desktop (Ctrl+Alt+F7) you can suddenly hear the sound from the second X server. This means that the sound is working, but you just can't hear it while you're in the second X server.

In older versions of Ubuntu (e.g. Ubuntu 10.10), there is a command (ck-launch-session) which you could run in the second X server and the sound would work. Unfortunately, this command no longer has that effect in Ubuntu 11.04 and later. This is the command I would use to launch XBMC in a separate X server:

xinit /usr/bin/ck-launch-session /usr/bin/xbmc -- :1

How can I enable sound when I'm in a second X server in Ubuntu 11.04 or later?

Related bug report: 366404

share|improve this question
I'm guessing you would need to have the output of the pulseaudio server (or whatever sound server you are using if not pulseaudio) on the second xserver routed as an input to the pulseaudio server on the first xserver--this is because only one audioserver (or, if you aren't running an audio server, only one application) can access the soundcard at a time. I'm not sure off the top of my head how to do this, but hopeful it gives you an idea of where to look (the pulseaudio documentation). – adempewolff Jun 7 '12 at 4:43
up vote 2 down vote accepted

When I did that kind of thing, I had to be part of the "audio" group. That way the audio from every screen could be heard. One problem: switching screens does not change the audio outputted. If I had an instance of KDE running on one screen and playing music with Amarok, I would be able to hear it on all screens.

If you (like me) don't know how to add a user to a group through the command prompt, just install "kuser" in Synaptic or the software centre or type sudo apt-get install kuser in the terminal.

I seem to remember having some problems starting it as root with the default launcher. If it gives you an error saying it cannot access a file, it generally isn't a problem, just make sure you are using the program as root. If it just tells you you need to be root, close the window, press ALT+F2, then type gksudo kuser. The computer will ask for your password, then Kuser will load correctly.

share|improve this answer
Thank you for providing the answer! I can't believe the answer is that simple. I'm a command-line guy however and sudo usermod -a -G audio $USER followed by a system reboot does the trick. And fortunately you still won't hear audio from other users. – Serrano Pereira Feb 6 '13 at 20:06
this used to work, but I reinstalled ubuntu and it stopped working – Aquarius Power Feb 24 '15 at 18:20
@AquariusPower: this still works for me on Ubuntu 15.04. – Serrano Pereira Oct 17 '15 at 14:41

Try to make your pulse-audio credentials known on the second x-server by using pax11publish -D :1 -e

(where :1 is the Display number of your second X-Server, normally :0 is the first one, counting upwards)

The application you are running is probably trying to read pulse-attributes from the X11 root windows properties.

Alternatively you could be stuck in major consolekit f*ckup.

share|improve this answer
Thanks for your answer Paul, but unfortunately it didn't work. I tried running that command from both the first and the second X server. And I tested sound with different applications. – Serrano Pereira Oct 27 '12 at 19:58
wow... then I really have no solution, but I appreciate the problem... – Paul Hänsch Oct 28 '12 at 15:32
worked! not sure if it would also require being in group audio (Im too lazy to remove and test xD) – Aquarius Power Feb 24 '15 at 18:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.