Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to understand the different subsystems that are in charge of the user interface, the terminology to refer to them, and how they are structured; so far I know there are:

At the top level:

desktops? (kde, gnome, etc)

Then we have:

  • a display manager (also called desktop manager or desktop environment)
  • window manager
  • anything else?

I'm making this a community wiki, I'd like this to be a central place for *all there is to know (from the user perspective) regarding user interface subsystems in Linux; what I would like to know is what are the components of each, and what are the responsibilities of each, i.e. I would like to know things like:

  • what exactly is in charge of the global shortcut keys, when I open up the "run application" dialog, who is doing that, when I press a key to show the desktop, run a terminal, maximize a window, etc, who is capturing that and sending it over to the right window;
  • who is in charge of drawing the desktop, the workspaces, etc.
  • what are the environment variables that can give me information regarding these components
  • Is the "main menu" a subsystem, or a component of a subsystem?

It would also be nice to compile a list of the most popular desktops/subsystems, which ones run under each, can you mix and match desktops/desktop environments/window managers, etc?

Finally, how do I tell which desktop/subsystems are actually running (active?) on the system, can different users have a different subsystem each?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

First of all, a Display Manager (or DM, e.g. xdm, gdm, kdm) is not the same as a Desktop Environment (or DE, e.g. GNOME, KDE, XFCE).

The Display Manager takes care of graphical login, and decides (or lets you choose) what session to run. Or what session*s* in case you choose the "switch user" menu option.

A Desktop Environment is basically a collection of programs (display manager, window manager, session manager, panels, configuration tools, etc.) and libraries (e.g. Gtk) that intend to give a consistent and integrated environment to work in.

A Window Manager manages windows: where to place them, move them, resize them, minimize/maximize them, tile them, etc.). It also handles the shortcuts to do those things. In some cases the window manager also paints the borders of windows, in other cases this task is off-handed to a "window decorator".

The "Run Application" dialog in GNOME is part of gnome-panel, but in another DE it could be another part of the environment.

Who is in charge of painting windows etc. depends; in case there is a "compositor" in use (often part of the window manager, e.g. in Compiz) then the compositor paints the windows on the screen, otherwise (as was usual in the past) it's the X-server doing that.

The Main Menu(s) are put on the screen by a part of gnome-panel, but the data used comes from a bunch of files in /usr/share/applications/ (possibly combined with an equivalent directory in your home for personal changes). Those files have a structure defined by FreeDesktop.org (a platform for different DEs to collaborate on common infrastructure), so that GNOME and KDE know about the same programs (but still can show them differently, and in some cases prioritize "native" programs over "foreign" ones).

And yes, different users can use a different session configuration (and can even define their own ones). In GDM, try the Session drop-down for the available choices.

Furthermore, it is possible to mix & match several components, but that will sometimes result in less cooperation and a loss of "smoothness" in how things work. One very well known example where things get exchanges is of course Compiz, which replaces Metacity if you want fancy desktop effects. But there are lots of other changes possible.

share|improve this answer
add comment

A desktop manager manages your hardware mostly, while a window manager manages your software. For example, power management, screen savers, system performance, login screen, etc are managed by a desktop manager. Your theme, window placement, widget and icon set, fonts, etc are managed by your window manager.

You can have a window manager installed without a desktop manager. It's common to login to a virtual terminal, then have a login script execute your window manager to start up your "desktop".

Desktop managers are GNOME, KDE and CDE. Window managers are Metacity, Openbox, Enlightenment, Awesome, etc.

To answer some of your questions directly:

  • the window manager is mostly in charge of desktop keyboard shortcuts.
  • the window manager is in charge of drawing the desktop, workspaces, placements of windows, etc as mentioned before
  • there aren't a lot of environment variables for the GUI. These are usually just applicable to the shell behind a terminal. However, you can run set and env to get an idea of what is set.
  • not sure what you mean by the "main menu" as a subsystem or component of a subsystem. Menus are part of the window manager.

I've mentioned some popular desktop managers and window managers already. More can be found by using Google.

Depending on your operating system, there is probably an ASCII config file that has defined your preferred desktop. For example, on Debian GNU/Linux, this is defined in the /etc/X11/default-display-manager config. You could also run 'ps -ef | grep user' where 'user' is the name of the login of some user on the system, and see what processes are listed, and which is the graphical desktop running. For me, it's 'metacity'.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.