Windows Managers vs Login Managers Vs Display Managers Vs Desktop Environment

From the bottom up:

  • Xorg, XFree86 and X11 are display servers. This creates the graphical environment.
  • [gkx]dm (and others) are display managers. A login manager is a synonym. This is the first X program run by the system if the system (not the user) is starting X and allows you to log on to the local system, or network systems.
  • A window manager controls the placement and decoration of windows. That is, the window border and controls are the decoration. Some of these are stand alone (WindowMaker, sawfish, fvwm, etc). Some depend on an accompanying desktop environment.
  • A desktop environment such as XFCE, KDE, GNOME, etc. are suites of applications designed to integrate well with each other to provide a consistent experience.

In theory (and mostly so in practice) any of those components are interchangeable. You can run kmail using GNOME with WindowMaker on Xorg.


If you experiment with this, it'll be clear:

In /etc/rc2.d, you'll find files that are instructions what your computer should do when it starts.

If you use GNOME, look for a file with gdm in its name, then replace the S (first letter of the name) by a lowercase s. (GDM is as you might have guessed the GNOME display manager. If you use some other suite, of course, find out what display manager it uses, then disable it in the same way.)

Now, reboot your computer and you'll notice that the login screen no longer shows up. Conclusion 1: No display manager, no login screen.

Instead, you'll log in to the console. Now, try for example to play a movie (or do anything with graphics). Won't work! This is because X isn't running. Conclusion 2: No X, no graphics.

Third step, starting X: By typing xinit, depending on your ~/.xinitrc file, a set of applications might get started. But, to illustrate, try running X with only a terminal, say, urxvt. So, put urxvt in .xinitrc and comment-out (with #) everything else, then type xinit.

You should now see the urxvt window. Here, you could play movies, etc. But instead, let's move the urxvt window somewhere else. Can't do it. Conclusion 3: No window manager, none of the usual GUI functionality you are probably used to. So, type exit in urxvt. (That command will exit the terminal, but, as that was the only process run as specified in .xinitrc, X will terminate as well.)

Last step, modify .xinitrc once more:

urxvt &
metacity

(note the & so the processes will run concurrently)

Run X again and see the result. The last part of the puzzle: metacity, a window manager.

To get out, type pkill -9 metacity. (On this, urxvt will terminate as well, possibly because, as it was run in the background (with &), metacity is the only process X monitors.)

Good luck. Probably, you'll get stuck on some detail, but it's worth it, to gain understanding.


In one sentence: Your display manager create a nice graphical display where you can use a login manager to login to your X session which will start a window manager and may start a desktop manager.