Multiple Choice

Variety is good. More variety is better,

Window Manager/Opener

You walk into a department store to buy a new
suit. This store only sells one style of suit: a three piece polyester
item with matching tie. You get your choice of colors, but there is only
one size.

Just down the block there’s another store with both suits and
separates. It offers a diversity of colors,sizes, styles, and fabrics
from all kinds of manufacturers. You can buy any tie you want. Even
better, most of the clothes in this store are free. Tailoring isn’t
included, but they’ll provide you with everything you need to make the
suit yourself or hire a tailor.

Where do you shop?

If you are like me, you might complain a bit, just because it takes
more time to make up your mind with all of these choices. But you’ll
shop in the second store every time. Now, instead of clothes, think of
the graphics on your desktop, and you’ll be on your way to understanding
the windowing supermarket that makes up Linux’s X Window System.

X Marks the Spot

Most graphical user interfaces are all-in-one systems. Often, with
Windows and MacOS for example, they are integrated right into the
operating system. This makes things nice and consistent for the user,
but this consistency comes at the expense of choice.

Linux, like most forms of Unix, takes a different approach. It uses
the X Window System. The X Window System (also called X11, or simply X)
de-couples the graphics system from the OS, and splits it into two
components: One component, called the X server, draws the dots and lines
on your monitor; a second component, called the client, tells the server
what to draw and keeps track of what’s going on within the various
windows on your desktop. In fact, these two components can even reside
on different computers and communicate across a network. The X server
has to run on your desktop, but it can be controlled by a client a
continent away, if you choose.

A standardized protocol, called (surprise, surprise!) X, lets all
this communication take place. The X protocol has been implemented on a
wide variety of systems, including all flavors of Unix, Windows, and
MacOS. It is important to note that in X terminology, the application
talking to the X server is always called a client, even if this “client”
is, in reality, a server application. Your company’s billing system may
run on a centralized server, but it’s a client as far as X is concerned;
it’s a client to the X server on your desktop. This seems to be the
reverse of normal client-server nomenclature, but it makes sense if you
really think about it.

The window manager is another important part of the X Window System.
The window manager is a client to the X server that runs alongside other
clients, handling a lot of the management work of manipulating and
displaying the windows on your desktop. You can run only one window
manager at a time, and they enjoy special privileges. For example, when
an application requests a new window on your screen, the X server won’t
create it until the window manager says where it should be placed.

Window Manager 01
Figure 1: The relationship between the
various elements
of the X Window System.

All of this choice can make for interesting combinations. You can
have the X server displaying graphics on your Macintosh in San
Francisco, with its window manager running on a Solaris box in Taiwan,
and these can be hooked up with some kind of supercomputer application
running on a Cray in France. Just as easily, the Linux machine on your
desktop can be running all three components — the X server, the window
manager, and the application — itself.

Figure 1 shows how all of these components interact with
Linux. The X server handles the display management and the window
manager takes care of managing all of the application windows.

If you want, your Linux machine can run more than one X server. And
if you really want, one X server can handle the graphics display
for several monitors. But let’s keep things simple for now.

The X Server

The X server is what actually draws the graphics you see on your
screen. It communicates with your video card, either directly or via the
kernel’s device drivers, depending on the X server and card you’re
using. It takes requests from applications and renders whatever text,
windows, or images the client application asks it to display. The X
server also lets these applications know about what-ever key-presses or
mouse movements the person using the application may be making.

The X server is the only component of the X Window System that has
to run on your local machine. Typically, a client application will ask
the X server to draw a line or write a word on the screen. The client
will say what font to use and where the drawing should take place. The X
server then decides how to draw the line. It may hand this task off to
your graphics accelerator, if the card is advanced enough. Otherwise the
X server will do the work itself.

If it’s being asked to render text, the X server will either parse
the font file itself, or communicate with a font server to figure out
how to render the font. In either case, the X server will then copy the
rendered text to your video card’s RAM.

By far, the most popular X server for Linux is the XFree86 server,
but others are available from vendors like Metro Link and Xi Graphics.
SuSE and Red Hat distribute the XFree86 server, but with extra drivers

You can usually fire up the X server by typing
X at the shell prompt. When you do this, you should
be rewarded with a screen full of a strange grayish pattern, (known as
the “root weave”) with an “X” at the center. The X will move around in
response to your mouse, but otherwise nothing will happen. Your X server
is waiting for a client.

X Clients

As I’ve already mentioned, X clients are applications that
communicate with the X server. When any application that requires
graphics starts up, it immediately establishes a connection with the X
server and tells it what windows should be created to support it. It
tells the X server what size and shape they should be, and what they
should display. The client also informs the X server what events
(mouse-clicks or keystrokes, for example) it wants to know about.

Though they are not common, there are some X clients that don’t
create any windows at all. For example, the program xdpyinfo simply
provides a command-line printout of the capabilities of the X server
it’s talking to.

Following the client’s instructions, the X server tells the client
when a relevant event occurs. A wide variety of things can qualify as
events. One can occur when a window gets moved, if a key is pressed, if
the mouse gets moved, or if a window gets dismissed. It’s up to the
person who writes the client application to define which events the
client cares about. Some clients — for example a program that displays
a clock on the screen — may not care about keystrokes. But the clock
program may well care to know when another window has been placed over
top of it. That way it could suspend itself until it heard from the X
server that it was visible again (another event).


While every X client uses a library of functions known as Xlib to
communicate with the X server, most don’t directly call the functions in
Xlib. To draw a simple 3D button using Xlib directly, a client must draw
a couple of rectangular windows, shade them to give the appearance of
beveled edges, monitor mouse events, be able change the button’s
appearance if it gets pressed, and so on.

To make this job easier, there are additional libraries of
functions, known as toolkits, that include oft-used combinations of the
Xlib functions. These combinations are called widgets. A developer can
pluck a widget from one of these toolkits to, say, create a button that
displays “Okay” when pressed. The toolkit takes care of all the little
Xlib details.

In addition to simplifying the work of the programmer, toolkits give
applications consistency. Applications made from the same toolkit simply
look like they belong together. By tweaking the individual toolkit
widgets, developers can change the look and feel of all the applications
that use that particular toolkit. Some popular toolkits include Qt,
GTK+, Motif, XForms, Tk, and XView.

Widget sets are not normally inter-changeable because they usually
have different interfaces to the programs that use them. However,
sometimes it is possible to replace a widget set.

You can do this with Xaw, the Athena Widget Set. The original Xaw
widget set has a simplistic 2D look, but its later developers have
created new widget sets for Xaw that look different from the original.
These usually retain its programming interface. So if you want, it’s
possible to put a replacement Xaw library on your system and still have
all your Xaw applications run. They’ll look different, but with the same
programming interfaces, everything will still work.

The first of these modified Xaw widget sets, Xaw3d, takes the
standard Xaw look and makes it three dimensional. Other Xaw replacements
attempt to simulate the look of other windowing systems. Xaw95 looks
like the widgets in Windows 95 and neXtaw looks like those of

Windowman Variations
Variations On A Theme: These images show
just how customizable the
look can be with some window managers. In all of these images, the
window manager is kwm, with different themes loaded. Note that these are
screen captures of rectangular regions, but not all of the window frames
shown here are rectangular in shape. In the Leaf theme, for example, the
frame is actually shaped like leaves, vines, and flowers. The dark
background is merely the desktop background showing through.

The Window Manager

X’s window managers do a lot of work. The layout of windows on your
desktop is controlled by the window manager. Frames around the windows
are drawn by the window manager. The particular icon a window can take
when shrunk depends on the window manager. Some window managers let you
switch between multiple desktops. Some provide a virtual desktop. If you
want to change the size of a window, you need to talk with the window
manager. In short, the whole look and feel of your computer is
completely influenced by your window manager.

So which window manager is best for you? Maybe you’d like one that
feels like Windows 98 or the Macintosh? Perhaps you have an older system
and want to use as little memory as possible? Maybe you’re looking for a
compact window manager for your notebook? Ease of configuration may be
your top priority. Or perhaps you work with different systems from
different vendors and would like a consistent look and feel when you
switch between them? In the rest of this article, I’ll outline the five
major categories of window managers, as I see them, and tell you about
all of the most common choices. Ultimately you’ll want to try on a
window manager or two for size before you decide which is best for

The Tab Window Managers

Tab window managers get their name from the way they can configure
their title bars to only extend part way along the top of the window.
This creates a look reminiscent of a file folder tab.

twm: The only window manager actually distributed with X is
the Tab Window Manager. This window
manager has a plain appearance by today’s standards, but it was advanced
for its time. It allows you to configure title bars, and supports shaped
windows and selectable focus policies (see the Glossary at right for an
explanation of focus policies and other window manager terminology). You
can configure the title bar buttons and menus to execute macros of
your choice. Twm was the starting point for several other window managers,
but it has not been developed recently.

vtwm:This twm derivative adds a virtual desktop. Recently, it
has added a 3D option to its window frames and title bars; it supports
color pixmaps for the title bar buttons and icons.

ctwm:With a 3D appearance and animated icons and title-bar
buttons, ctwm adds some flash to twm’s plain look. It also supports
multiple desktops, each with their own look and pinnable menus.

The Bottom

Window Manager Glossary

Focus Policies

Focus policies determine where your keystrokes go. If you are using
a focus-follows-mouse policy, then your keystrokes will always be sent
whatever window the mouse cursor is currently pointing to. With a
or click-to-type policy, you need to actually click on the window in
question before you can type inside it.

Virtual Desktops

Virtual desktops (sometimes called virtual screens) allow you to
pretend you’ve got more screen real estate than you really do. A virtual
desktop pretends that your screen is only a small corner of a much
larger “virtual” desktop. This comes in handy when you have more windows
than you can fit on your screen. Instead of opening windows on top of
each other, you can move them to the right or the left or above or below
your display. You don’t see them on your monitor, but you can use a
small navigation tool to move your display to whatever part of the
virtual desktop you choose.

Multiple Desktops

Window managers that support multiple desktops let you switch from one
screen display to another as if you were switching computers. Windows
that appear on one desktop, disappear when you move to another, only to
reappear when you switch back. Usually, each desktop can have a
different background.

X Pixmap

Early window managers used only one color for the foreground and a
second for things like title bars and icons. But modern window managers
let you have multicolored icons, using a format called X Pixmap. This is
called XPM (X Pixmap) support. Some window managers support other
graphics file formats too.


X originally supported only rectangular windows. Eventually it was
extended so that windows could take any shape. Window managers with
Shape break through the rectangular-only restriction.

Pinnable Menus

Menus normally disappear from the screen once you have made your
selection. Some window managers let you “pin” menus so they stay on the
screen. This can make things easier if you need to choose many options
from the same menu.


Hints are instructions for the window manager that client applications
can attach to their windows. They let the client tell the window manager
things like “this window should not be resized” or “please do not place
a title bar above this window”. Exactly what messages are recognized
varies between window managers. Often you can configure the window
manager with values that override the hints the client supplies. Open
Look, Motif, GNOME, and KDE all support hints.


Configuration methods vary between window managers. Most have one or
more configuration files that can be edited to change the window
manager’s look or behavior. Others are configured interactively with a
GUI configuration tool. Almost any modern window manager will have some
sort of configuration tool, whether it comes with the window manager
itself or from a third party.


By changing themes, you can alter the look of things like title bars,
menus, or the background all in keeping with a particular style. See the
themes.org Web site for sample screen shots and all the info you need to
use themes on your desktop.

fvwm and Derivatives

fvwm: Nobody knows what the “f” in fvwm stands for, but it is
a virtual window manager built on top of twm, with features like a 3D
appearance, mwm emulation, and lower memory consumption. Fvwm supports
shaped windows and icons, multiple virtual desktops, and it allows you
to select among several different ways of placing windows on the

Fvwm also introduced the concept of modules to the world of window
managers. Fvwm modules are small programs that provide extra features to
the window manager. Because of their modular design, though, these
little programs only use up system memory if the feature they provide is
being used.

fvwm2:Version 2 of fvwm has been through several maintainers
and picked up a number of new features along the way. Fvwm2 is extremely
configurable. It allows you to configure the focus policy far beyond the
simple click-to-focus or focus-follows-mouse methods.

fvwm95: A variant of fvwm, fvwm95, has the look and feel of
Windows 95, but is compatible with fvwm2. It features a module that
emulates the Start menu of Windows 95.

AfterStep: AfterStep is a fvwm derivative developed to
emulate the look and feel of NeXTSTEP. It supports multiple desktops,
each with their own look and feel, and allows you to change themes
easily via menus. The AfterStep Web site brags that it is “The most
highly configurable window manager available today, bar none!” They said
it, not me.

xfwm:This window manager is not as configurable as fvwm2, but
it’s smaller. Plus it supports KDE and GNOME hints, in addition to the
Open Look and Motif hints already supported by fvwm2.

scwm: The Scheme Window Manager is another highly
configurable window manager. It is configured by writing functions in a
dialect of Lisp known as Scheme. Unless you are a programmer, this is
probably not the window manager for you.

The Lookalikes

These window managers attempt to emulate the look and feel of other
desktop environments.

amiwm: This window manager
approximates the look of the Amiga Workspace Manager.

qvwm: Developed in Japan, gvwm has a Windows 95-like

mlvwm:This Mac lookalike is an obvious candidate for anyone
used to working with MacOS.

icewm:The icewm window manager is able to simulate the look
of OS/2 Warp, Windows 95 and mwm.

WindowMaker: WindowMaker has a NeXT-like look, although it
too can be configured with different themes. WindowMaker configuration
is done via drag-and-drop, so it is a good choice for someone who wants
to be able to make changes easily.

Blackbox:Blackbox has a look similar to WindowMaker (and
AfterStep, and therefore, NeXTSTEP). It supports multiple workspaces and
is GNOME-aware, yet relatively lightweight.


The window managers in this category are designed to be small and
efficient. Their lack of features is, in fact, one of their best
features. If you are using a system without much RAM or a low-resolution
screen (or both) you’ll want to try one of these.

wm2:Wm2 lets you move windows around on the screen and resize
them. It allows you to delete windows, to hide them from view and cause
them to be seen again. It also attaches a title bar and a partial frame
to the windows. It gives you the basic functions a window manager should
provide, but not much more. You do not get any configuration options
with wm2.

wmx:Wmx is from the same author as wm2 and it shows. It
places a thin half frame along the top and left side of each window and
adds a small tab with the window title vertically along the top of the
window’s left side. However, wmx has a trick or two that is lacking in
wm2: multiple desktops and key bindings, for example.

lwm:The Lightweight Window Manager, like wm2, has a very
short list of features. It is somewhat configurable though. For example,
you can change the font used in the title bar. This window manager draws
a thin frame for each window, but only the window that currently has
focus (using focus-follows-mouse) gets a title bar. This reduces the
amount of screen real-estate used by the window manager itself. The root
menu is configured by adding symlinks to the directory ~/.wmx. For each
symlink in that directory, there will be a menu entry of the same name.
The symlink should point to the program to be executed when the menu
item is selected.

flwm: Another window manager with minimal configurability,
flwm, the Fast Light Window Manager also reads the ~/.wmx directory to
generate its root menu. Each window gets a title bar running sideways
along the left side of the window.

Commercial Window Managers

These all either cost money or are obsolete. Unless you are already
using a Unix workstation and want to keep the same look on your Linux
box, you can probably skip this section of the store. The free window
managers are a much better choice.

mwm:The Motif Window Manager or some variant was a standard
window manager for several years on Unix workstations. Built with the
Motif widget set, mwm has a 3D look that has been imitated by many other
window managers. This window manager is slowly being supplanted by dtwm
(see below).

olwm:One vendor that did not use mwm was Sun. Instead Sun
used the Open Look desktop environment and olwm, the Open Look Window
Manager. Sun released the olwm source code and it has since been ported
to Linux. Olwm’s look, provided by the XView toolkit, is unique, with
buttons and menu selections that have rounded corners. It also has
pinnable windows and menus.

olvwm:Olvwm is simply olwm with the addition of a virtual

dtwm: Dtwm is the window manager for the Common Desktop
Environment. CDE is now used by almost all of the major workstation
vendors, including Sun. If you are trying to introduce Linux
workstations to a company that has been using Unix for a long time and
is standardized on CDE, you may want to purchase CDE for your new Linux

The Ones that Don’t Fit

Most window managers fit into one of five broad categories, but
there are three that defy categorization. And two of the three, kwm and
Enlightenment, are window managers that you will definitely want to
check out.

kwm:The K Desktop Environment comes with its own window
manager,kwm. This window manager features roll-up windows, keyboard
shortcuts, and themes. Its strongest feature, though, is its integration
with the rest of the KDE desktop. While there are now other KDE-aware
window managers, kwm uses the same Qt toolkit as the KDE applications,
so it maintains the same look and feel across the entire desktop

Enlightenment:Enlightenment, also known simply as E, is a
very graphics-intensive window manager. It is designed to be extremely
customizable. Selecting themes with Enlightenment is a piece of cake
because of this. It broke from tradition by being the first to use
non-rectangular window frames. Probably the most interesting innovation
in Enlightenment is its use of floating desktops. As with other window
managers, Enlightenment lets you have multiple desktops on one machine,
but instead of being separate, disjointed entities, floating desktops
are layered one on top of the other. You switch desktops by sliding one
over the top of another. You can partially slide one desktop on top of
the other, creating an overlap where it’s easy to move windows from one
desktop to another. Enlightenment is GNOME-aware and is often used with

gwm:The Generic Window Manager, like scwm is configured by
writing code in a programming language. Gwm uses a language called WOOL
(Window Object Oriented Language). But unlike, scwm, it has not been
updated for several years. You’ll probably want to skip this one.

So there you have it. While I’ve not covered every possible item in
the inventory, you should now know enough about the X Window System
store to make an informed purchase. And sometime down the road, if you
want to update your wardrobe, feel free to shop again. There’s always
plenty to choose from.

Joseph Moss is the maintainer of the XFree86 man pages. He can be
reached at joe@morton.rain.com.

Comments are closed.