How can I export my X Display with audio.

For example, in tty1 if I put, "startx xmoto -- :1 &", I can play xmoto ok, but have no sound. If I put "xinit -- :1 &"and then put "xmoto &", again I can play xmoto ok, but have no sound.

The strange thing is the sound continues in tty1...if I go back to tty1 (ctrl+alt+f1) I can hear the game, but in tty8 (ctrl+alt+f8) didnt have sound.

So, probably I need to know how to export the X Display and the sound to tty8, for example.

  • 1
    I can't completely anwser your question, but I can start you on your way. X doesn't handle the sound, if you're using Natty its pulseaudio. May 28, 2011 at 10:36

1 Answer 1


///OLD: Left just in case! This worked for me

edit /etc/group

sudo nano /etc/group

Next, search for audio, you shoud find somethink like this:


Add a coma and your username afther pulse

audio:x:29:pulse,username //whatever your username actually is

change username with the one you wish to log in!!!

Save and restart ubuntu, it should work. If I switch between sessions(Cn+Alt+F7), I loose sound in the one I started, just to let you all know. I suppose it is a bug.


EDIT: According to Reinis(see comment below) it is not recommended to edit the file manually. It's better to :

sudo adduser _username_ audio

Change username with your actual username. Restart :)

  • Really thanks, worked to me too. Interesting, similar problems can solved by this.
    – GarouDan
    Aug 29, 2011 at 12:20
  • You shouldn't edit that file manually. The better way would be to use command: "sudo adduser username audio" I can't say the reason for this but I guess security and/or data consistency. I would upvote You would kindly fix the solution :)
    – Reinis
    Dec 31, 2012 at 10:35
  • No need to reboot, just log out, and log in again.
    – Hi-Angel
    Mar 13, 2015 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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