Ubuntu Linux stop / disable GNOME GUI ~ X.org

by Vivek Gite · 5 comments

Q. I don’t need GUI as I’m developing CLI based applications. By default Ubuntu Loads Gnome GUI. How do I disable X.org / Gnome under Linux so that I get text only login?

A. You can use GUI tools or command line tools to disable GDM (Gnome Display Manager) service (/etc/init.d/gdm).

Disable GDM using GUI tools

The Services Administration Tool allows you to specify which services will be started during the system boot process. You can type the command:
services-admin &

Or just click on System > Administration > Services

Now you will be prompted for the administrator password, this is necessary because the changes done with this tool will affect the whole system. After entering the administrator password, the following window is displayed:

Ubuntu Linux stop / disable GNOME GUI (X.org)

Make sure you remove GDM (Gnome login manager) by disabling the the checkbox and close the window.

Enable GDM using Command Line (CLI) tools

Ubuntu comes with rcconf and update-rc.d command. rcconf allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off.

Install rcconf

Use apt-get command:
sudo apt-get install rcconf
Now start rcconf:
sudo rcconf
Again you will be prompted for the administrator password, this is necessary because the changes done with this tool will affect the whole system. After entering the administrator password, the following text based window is displayed on screen:
Ubuntu / Debian Runlevel configuration tool

Next enable GDM service by pressing space bar (check the checkbox) > Click OK to save the changes.

update-rc.d command

This is 3rd and old method. You can enable or disable any service using update-rc.d command.

Task: Disable X.org GUI

Just enter command:
sudo update-rc.d -f gdm remove

Task: Enable X.org GUI

Just enter command:
sudo update-rc.d -f gdm defaults

You can always start GUI from a shell prompt by typing startx command:
startx &

Please note that you can use above tools to enable or disable any services under Debian / Ubuntu Linux.

See also:

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 5 comments… read them below or add one }

1 Bryce Harrington 03.31.08 at 11:11 pm

This command should not be used by users to disable gdm:

sudo update-rc.d -f gdm remove

While it may seem to work, that’s just a side effect. This is a packager’s tool, not an administration tool.

A better approach (recommended to me by slangasek, the Ubuntu release manager) is:

mv /etc/rc2.d/S30gdm /etc/rc2.d/disabled-S30gdm
mv /etc/rc2.d/K30gdm /etc/rc2.d/disabled-K30gdm

2 erkko 01.12.09 at 5:27 pm

I shall second to Bryce. And to add insult to injury: when trying to temporarily suspend some services this way, on might end up with pretty screwed system.
sudo update-rc.d -f gdm remove — this removes all links to /etc/init.d/gdm and if you did not pay attention to their original sequence numbers… try to remove gdm this way and restore it afterwards. default restore method, you suggested, will use sequence number 20 for start and kill, original for ubuntu gdm is btw 30 for start and 01 for kill.

And because disabling gdm by itself really is not enough, one has to disable usplash also. When you use this same-old default remove -command and later on wanna restore gdm & usplash, you’ll end up with both of them started at the same sequence and this also means no mouse/keyboard while sitting at gdmgreeter login…

Nice enough?

commands for restoring such systems original condition would be:

update-rc.d -f gdm remove
update-rc.d -f usplash remove
update-rc.d -f gdm defaults 30 01
update-rc.d -f usplash defaults 98 02

use sudo, if need be.

3 rkaneknight 03.02.09 at 6:13 pm

I’ve had a horrible time removing the GUI from Ubuntu 8 Maybe I have the wrong version, but I finally ran into this site, and installed and ran rcconf and removed gdm and a few other things related to X and some other stuff I didn’t think I needed. I’m running this as a VM so the last thing I need is a bulky GUI slowing things down. waiting for reboot… Woot, finally a regular login prompt. A couple errors came on the screen, but I don’t care, as long as I don’t have a GUI taking away my ram.

4 SaltwaterC 04.21.09 at 9:13 am

sudo apt-get install sysv-rc-conf ; sudo sysv-rc-conf

rcconf looks like an unfinished product besides sysv-rc-conf.

5 ASaavedra 11.11.09 at 10:18 pm

SaltwaterC: sysv-rc-conf is such a great tool, thanks for the tip! A. Saavedra

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All