Getting GUI in Debian after base installation

I am seeing this question most of the users asking this how to get GUI after base installation of Debian

For this you need to install x-window-system-core,kde,gnome

Install KDE in debian

#apt-get install x-window-system-core kde

You'll probably also want to install KDM, for the KDE-style login screen.

#apt-get install kdm

Starting KDE

To start KDE, type


you may need to start X-Server if it is not running, to start it run


To start KDE each time (you probably want this) you'll need to edit your startup files. If you use KDM or XDM to log in, edit .xsession, otherwise edit .xinitrc or .Xclients.

Install Gnome in Debian

#apt-get install gnome

This will install additional software (gnome-office, evolution) that you may or may not want.


For a smaller set of apps, you can also do

 # aptitude install gnome-desktop-environment

A set of additional productivity apps will be installed by

 # aptitude install gnome-fifth-toe


If you need development packages, e.g. for compiling GNOME dependent packages from source, you should try

 # aptitude install gnome-core-devel

For a full set of developer tools, please do

 # aptitude install gnome-devel

The install procedure will as you the details of your video card, keyboard and mouse. Some hints

- PS/2 mice are attached to /dev/psaux.

- USB mice are usually attached to /dev/input/mouse0

- Be sure to select the correct video driver. If you select an inappropriate one, X won't start. If you are not sure which driver to use, ask here.

- If you are completely helpless, use the 'vesa' driver. It should work on any card.

- Other than the things listed above, you can accept the default answers, but be sure to actually read what the installer ask; the default maybe isn't what you want.

After you done, you have two options.

The first one is to edit the ~/.xinitrc file, and write the 'exec startkde' or 'exec gnome-session' lines to it, depending on what you want to start. After this, if you issue the 'startx' command, a GUI will hopefully start.

The second option is to install a login manager, which is probably the more convenient choice, and is good for most people. Simply install the kdm or the gdm package (the former is KDE's login manager, the latter is of Gnome). No matter which one you choose, you can always choose your GUI upon login, if you installed both KDE and Gnome.