Southend Linux User Group

Shutting down xserver in Debian.


What one would have thought as being a simple run level change, to get to a text level in the main, doesn’t work in Debian. It defaults to run level 2, which does not comply with convention and any attempt to transfer to a text mode, is met with resistance. This is particularly frustrating, if you want to install a Nvidia proprietary graphics driver, as this has to be installed with xserver not running.

The Solution.

First off, Log Out. (Desktop -> Log Out)

Then select Ctrl+Alt+F1

This will take you to a text based screen with a command prompt, but at the moment, xsever is still running in the background.

Log in as root

and run this command:

#> /etc/init.d/gdm stop

Remember, all commands need the Enter key to be pressed to execute the command.

This command actually stops Gnome (gdm). If you are running KDE, substitute kdm or for Xfce use xdm. These abbreviations stand for Gnome desktop manager, KDE desktop manager or Xfce desktop manager.

At this point, you can carry out whatever you want to do with the xserver shut down.

If you wish to restart the xserver, simply replace stop with start, like so:

#> /etc/init.d/gdm start


#> startx

I hope this may help solve a very common question.

Author: paul - Page reference: 1214
Last modified: Alan Campion - 2012-11-18