Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Prevent X.Org from Starting in Ubuntu

If you've got an Ubuntu machine that you initially installed with Ubuntu Desktop, but would like to run as a server, you can just disable the graphical environment from starting up in order to save resources. This is also useful for doing system maintenance from the command line that needs to be performed outside of the GUI.

The only reason to do this instead of removing the packages would be because you might want to still sometimes use the box through the GUI.

Disable X.Org

In order to disable the graphical environment, we'll need to disable GDM, the Gnome Display Manager. In order to do this, you'll need to run the following command at the terminal:

sudo update-rc.d -f gdm remove

image

When you restart your computer, you'll be presented with a text-mode login prompt instead of the graphical environment.

image

Run X.Org While Disabled

If you want to run the graphical environment, all you have to do is type the following command from the prompt, making sure to run it as your normal user account.

startx

The annoying gray screen will go away once Gnome is fully started.

Enable X.Org

If you want to re-enable X11 it's a simple matter of running this command from the terminal:

sudo update-rc.d -f gdm defaults

image

When you restart, you'll be presented with the graphical prompt again.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 09/7/07 and tagged with: Ubuntu

Comments (1)

  1. Paddy Devine

    I'm just a novice, but enjoy the info on your site. I've done everything in windows since 85 and have really forgotten everything dos…its been so long ago. Really like this unit with Ubuntu and the ability to go to the command line. The commands are new to me, but hopefully I can get up to speed and learn some real computing.

    Peace, Paddy


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.