114

I'm having a really hard time trying to understand what the differences between a desktop environment and a window manager are?


EDIT: From this article by Jack Wallen:

There are basically three layers that can be included in the Linux desktop:

X Windows – This is the foundation that allows for graphic elements to be drawn on the display. X Windows builds the primitive framework that allows moving of windows, interactions with keyboard and mouse, and draws windows. This is required for any graphical desktop.

Window Manager – The Window Manager is the piece of the puzzle that controls the placement and appearance of windows. Window Managers include: Enlightenment, Afterstep, FVWM, Fluxbox, IceWM, etc. Requires X Windows but not a desktop environment.

Desktop Environment – This is where it begins to get a little fuzzy for some. A Desktop Environment includes a Window Manager but builds upon it. The Desktop Environment typically is a far more fully integrated system than a Window Manager. Requires both X Windows and a Window Manager.

Examples of desktop environments are GNOME, KDE, Cinnamon, Xfce among others)

1
  • Yeah, but the emphasis should be on how the roles are no longer clear cut and haven't been since the late 80's. Gone are the days when merely saying "Motif" said it all. For instance, now we have the murky roles of compositors and window decorators. When Compiz "integrates with MATE", where is it then? Dec 28 '20 at 17:16
60

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.

2
  • 5
    Is the task bar (window list) part of the Window Manager, or Desktop Environment? Dec 28 '12 at 10:34
  • I do not think it’s really useful to make a sharp distinction. My dear old fvwm came with several widgets (among them pager and window list), but I would not call fvwm anything more than a window manager. OTOH, Gnome’s or Unity’s bars are not part of the window manager anymore.
    – MPi
    Dec 29 '12 at 20:15
16

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).

2
  • The first link is broken. Please fix it.
    – evaristegd
    Jul 16 '19 at 18:57
  • @evaristegd Really not in my control. Regardless, this answer is self-sufficient. The links are just addendum. Moreover, one can look on the internet after reading the answer one has pretty much a good idea of the difference between the two with examples, and get enough background knowledge to read anything further on it.
    – zeal
    Dec 6 '19 at 2:26
14

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.
4

The picture and words from Wikipedia is helpful when I feel really confused by those concepts. display server and DE

enter image description here

1
  • Good answer as it presents examples that are efficiently employed nowadays, as opposed by old answers.
    – mathway
    Jul 25 at 0:36
2

There are not clear-cut definitions to distinguish them but there are strong patterns.

Classical functions of a window manager (WM)

  • Position and sizes of the windows, as well as repositioning and resizing them.
    • Layers — some windows are on top, some are below, some are docks, ...
    • Positioning via stacking or tiling algorithms.
  • Virtual desktops (a.k.a. workspaces).
  • Closing, maximizing, minimizing (a.k.a. iconifying), raising, lowering, etc. windows.
  • Focus — determine window receives keyboard.
  • Decoration — title-bars and title-buttons (optional, e.g. absent from Dwm and Spectrwm).

Classical functions of a desktop environment (DE)

Some will mention menus (such as Windows' start menu), task-bars and window lists, but, for example, despite Icewm features those, it is a WM, not a DE.

That's because a fundamental point of DEs is that they ship their own set of general purpose GUI applications, such as file managers, image viewers, calendars, and so on.

Additionally, quintessential to DEs is a set of GUI utilities for configuration, not only of the DE itself but also of system parameters that could otherwise be controlled via command-line (CLI). Examples:

Evidence and references

You don't need to believe me, just look at some packages dependencies in Ubuntu repositories:

  • KDE includes kmail, muon (software center), kate (editor), juk (music player), gwenview (image viewer), systemsettings (recommended), dolphin (file-manager).

  • XFCE includes thunar (file-manager), orage (calendar), xfce4-settings.

  • GNOME includes shotwell (image viewer), libreoffice, gnome-screenshot, and a bunch of others via gnome-core dependency: nautilus (file manager), gnome-software (software center), baobab (disk usage), gnome-control-center (settings).

and contrast them with window-managers — I3, Xmonad, Icewm, Bspwm —, whose dependencies are system libraries, not GUI programs at all besides the old, classical x11-utils.

Conclusion

DEs are heavier than WMs.

In a sense, DEs act as a valuable bridge for those migrating from Windows/Mac, who are generally heavily GUI reliant, to the GNU/Linux world, that is historically more CLI oriented.

That's why some advanced users call DEs bloated. From their point of view, it includes a lot of graphical interface for tasks that are simple to achieve via a command-line. And how come DEs feature a whole bunch of default programs? Such users want to build their own tool-set and can easily do so; They only need a WM to perform the basic and indispensable window operations.

Don't let snobs drive you away, though. Use whatever you are most comfortable with and gets the job done. If you are curious and want to find out what's happening under the hood and how to deal with the CLI, you'll probably find to be slowly steering away from DEs.

0
1

The XFCE website has a pretty nice explanation of the components included in the XFCE desktop environment (one of them being a window manager):

Xfce contains a number of core components for the minimum tasks you'd expect from a desktop environment:

Window Manager

Manages the placement of windows on the screen, provides window decorations and manages workspaces or virtual desktops.

Desktop Manager

Sets the background image and provides a root window menu, desktop icons or minimized icons and a windows list.

Panel

Switch between opened windows, launch applications, switch workspaces and menu plugins to browse applications or directories. Session Manager Controls the login and power management of the desktop and allows you to store multiple login sessions.

Application Finder

Shows the applications installed on your system in categories, so you can quickly find and launch them.

File Manager

Provides the basic file management features and unique utilities like the bulk renamer. Setting Manager Tools to control the various settings of the desktop like keyboard shortcuts, appearance, display settings etcetera.

link: https://www.xfce.org/about

0

IMHO the Desktop Environment term derives from Window Manager term. As a Desktop Environment is a set of software/tools which builds today's complex visual interface(s) between human being and computer, while Window Manager serves just for creating a simple graphical interface(s) (I remember XWindows on Silicon Graphics station in 1995 :) ).

Regards, Vincenzo

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