Text boot and disabling GDM in Ubuntu 10.04 (Lucid), 10.10 (Maverick), 11.04 (Natty)

The days of /etc/inittab seem to be gone in Ubuntu. But fear not - if you for some reason don't want graphical login (GDM, KDM, etc) when booting Ubuntu, here's how to do it. This also shows how to get rid of the splash image when booting, if you would rather have the good old black screen with the whole boot process shown.

This applies to Ubuntu 10.04 (Lucid), 10.10 (Maverick), 11.04 (Natty) and possibly some earlier versions. Some people will tell you to edit /etc/init/gdm.conf and change the "start on..." stuff to "start on runlevel []", but there's an easier way:

  1. To disable GDM/KDM/etc, edit /etc/default/grub and change the line GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="text"
  2. To show boot messages and disable the splash image, remove quiet splash from GRUB_CMDLINE_LINUX_DEFAULT so that it reads GRUB_CMDLINE_LINUX_DEFAULT="". (If you want the splash image and some text, use splash.)
  3. Run sudo update-grub Done!

This worked fine for me - but the sound was no longer working:

$ alsamixer
cannot open mixer: No such file or directory

I fixed this by adding my user to the group audio:

$ sudo usermod -a -G audio fooninja

(Replace fooninja with your username.)

I logged out and in again and voila - sound was working.

Oh, and if you want to start X automatically when logging in on the first console, put something like this in e.g. ~/.bashrc:

if [ `tty` = "/dev/tty1" ]; then
    startx
fi

2010-07-29 · revised 2011-08-08 · ·

blog comments powered by Disqus