Ubuntu – How to export X Display with Audio

soundttyxorg

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.

Best Answer

///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:

audio:x:29:pulse

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.

///OLD

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 :)

Related Question