Wednesday, September 16, 2009

Boot ubuntu in text mode and have sound after running startx

I've disabled gdm by:
user@machine:~$ sudo update-rc.d -f gdm remove

probably not the nicest solution.

It is just the matter to add the user to the audio group, that's the way I did it, and it works. So I don't grant permissions to all users for audio devices.

user@machine:~$ find /dev -group audio -type c -exec ls -l '{}' ';'
crw-rw----+ 1 root audio 14, 0 2009-09-16 19:16 /dev/mixer
crw-rw----+ 1 root audio 14, 4 2009-09-16 19:16 /dev/audio
crw-rw----+ 1 root audio 14, 3 2009-09-16 19:16 /dev/dsp
crw-rw----+ 1 root audio 14, 12 2009-09-16 19:16 /dev/adsp
crw-rw----+ 1 root audio 14, 1 2009-09-16 19:16 /dev/sequencer
crw-rw----+ 1 root audio 14, 8 2009-09-16 19:16 /dev/sequencer2
crw-rw----+ 1 root audio 116, 7 2009-09-16 19:16 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 5 2009-09-16 19:18 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116, 6 2009-09-16 19:18 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116, 4 2009-09-16 19:16 /dev/snd/pcmC0D1p
crw-rw----+ 1 root audio 116, 3 2009-09-16 19:16 /dev/snd/seq
crw-rw----+ 1 root audio 116, 2 2009-09-16 19:16 /dev/snd/timer

We can see by default that our user doesn't belong to audio group

user@machine:~$ id -Gn user
user adm dialout cdrom plugdev lpadmin admin sambashare

So let's add user to group audio:

user@machine:~$ sudo usermod -a -G audio user

Now group audio has rw permissions over audio devices and after running startx we will hear sound.

1 comment:

Dani said...

http://blog.jorgeivanmeza.com/2010/01/iniciar-linux-ubuntu-9-10-en-modo-solo-texto/