How do I disable GDM and Graphical User Selection?

The new Ubuntu features a completely unkillable GDM. Is there a way to disable it?

It is not enabled in services , the GDM startup script is deleted, it is removed from update.rc but it still starts up.

How do I disable GDM and Graphical User Selection?


Solution 1:

In Ubuntu 10.04 you should refer to documentation for Upstart which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.

Upstart handle start of gdm, so you should edit /etc/init/gdm.conf

sudo vi /etc/init/gdm.conf    # or use nano if vi is unfamiliar

Default runlevel in ubuntu 10.04 is 2 so you must change this line

stop on runlevel [016]

adding "2" in the runlevel list

stop on runlevel [0126]

Now you can reboot the system.

Solution 2:

Do:

sudo dpkg-divert  --rename --add /etc/init/gdm.conf

Which prints:

Adding `local diversion of /etc/init/gdm.conf to /etc/init/gdm.conf.distrib'

This will allow you to disable GDM while preventing package upgrades from putting the file back in place and allowing the GDM package to upgrade the configuration file.

In the case of 11.x and above lightdm is used instead of GDM. I instead used the command:

sudo dpkg-divert --rename --add /etc/init/lightdm.conf

To undo it replace the rename and add with a remove.

Solution 3:

Recent versions of Ubuntu are using upstart instead of SysV init.

Rename /etc/init/gdm.conf to /etc/init/gdm.disabled.

For Kubuntu, rename /etc/init/kdm.conf to /etc/init/kdm.disabled.

Solution 4:

I found this forum thread to be very helpful:

The solution that I found that worked consistently was post 30 by iscatel:

well, this disables sound, as a previous post pointed out, but here goes:

in /etc/default/grub, comment out (by placing # at the start of the line)

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and add

GRUB_CMDLINE_LINUX_DEFAULT="text"

then

sudo update-grub2

this will pass "text" to the kernel at boot time line, disabling gdm.

if it still does not work, you can

echo "manual" > /etc/init/gdm.override

and try it again. I used Ubuntu 12.04 32-bit server with GNOME core and it worked for me.

Solution 5:

Follow the directions of @freedev on Server Fault:

$ sudo nano /etc/init/gdm.conf

And change to:

stop on runlevel [0126]

Also

$ sudo nano /etc/init/tty1.conf

And change to:

stop on runlevel [!345]

Note the missing 2 in the tty1.conf. This is so that you get tty1 up and running and can log on into the first console. No need to mess with GRUB.