What is the difference between a desktop environment and a window manager?

The window manager manages your windows. It puts the window decoration around the contents including the buttons to minimize or close. It allows resizing and moving the windows around, decides which window is on top.
Metacity and Compiz are two examples from today, twm and fvwm might be remembered by old people like me.

A desktop environment gives you an overall user experience. It has the panels, the system menus, the starters, the status applets. It needs a window manager, of course, to manage the windows. It might offer a default file explorer and viewer. To streamline, it might even contain default editor, terminal program, or even e-mailer, all made to look alike and work together.
GNOME, XFCE and KDE are the best known at the moment.


What is a Window Manager?

A Window Manager is a piece of software that manages windows, allowing the windows to be opened, closed, re-sized, and moved. It is also capable of presenting menus and options to the user. It controls the look and feel of the user's GUI. With Linux or BSD, you have choices. You are free to select any number of window managers, ranging from lean-and-mean simple ones (low memory and CPU consumption), to feature-packed large ones. There are approximately 17 "mainstream" window managers, and at least 70 others.

Here is a short list of some of the more popular ones:

  • fvwm2
  • twm
  • mwm
  • wm2
  • AfterStep
  • Enlightenment
  • WindowMaker
  • IceWM
  • Sawfish
  • Blackbox
  • Fluxbox
  • and MetaCity

For a really nice website that lists them all, try www.plig.org/xwinman/.

What is a Desktop Environment?

A desktop environment (DE) usually rides on top of a Window Manager and adds many features, including panels, status bars, drag-and-drop capabilities, and a suite of integrated applications and tools. In fact, user opinions on operating systems are typically based on one thing: the Desktop Environment. Of course, the DE is only a small part of an OS, and in Linux and Unix systems, the Window Manager and/or DE can be replaced or highly customized without violating any end-user licensing agreements.

The most popular Desktop Environments for Unix/Linux are:

  • GNOME
  • KDE
  • CDE
  • XFce

Of course, there are others.

Source (Archived).


I'll try to be brief. Taking Ubuntu for an example:

  • Compiz/Metacity (or KWin, XFWM) are window managers. Their purpose is to draw windows, borders, buttons etc.
  • Gnome (or KDE, XFCE) are desktop environments, because beside a window manager they package a login screen, panels and systrays as well as certain tools to configure and tweak settings.