Prevent X.Org from Starting in Ubuntu

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

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

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

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

Leave a Comment


NOTE - 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=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close