X Windows - Configuring Window Managers
What is a window manager?
If you are new to UNIX systems, you are new to the concept of a window
manager. On Windows and Mac systems, the operating system provides the
window borders and buttons for minimizing, maximizing, and closing
windows. You have choices about what color active windows should be, but
little more. X Windows allows for more flexibility by letting you use any
window manager you want.
The problem with this window manager system is this: If for some reason
you wind up running without a window manager, your windows will show up on
screen with no borders or titles. You can't move, resize, or minimize them.
In addition to supplying window borders, the window manager manages your
windows; it decides where to place windows on the screen and may also provide other services such as menus and ``virtual desktops.''
There are also ``desktop environments'' (DEs) which go beyond simply managing
windows to include file management and more. There is no clear distinction
between a DE and a window manager. Some window managers (such as Enlightenment)
are moving in the DE direction, while some DEs can be used with any window
manager. GNOME is the only
full-fledged desktop environment currently available on the CS
department computers. It provides an
easy-to-use graphical interface to the system.
There are several different window managers which you can use and most
can be configured to work in a variety of different ways. If you've
been unhappy with the way your windows look, you can probably change
them to be how you want them to be.
Which window managers are available?
Turing currently has many window managers installed, including twm,
fvwm, fvwm2, olwm,
afterstep, windowmaker, Sawfish, and
enlightenment.
New accounts are currently set up to use Sawfish, but users
with very old accounts may have been given fvwm or even
tvtwm instead.
Here are some sample window shots and screen shots from some of the various
window managers.
- twm is one of the first window managers. It looks quite primitive.
- Click here
- fvwm2 is another classic window manager. It is more modern than twm.
- Click here
- olwm
- Click here
- Afterstep
- Click here
- Enlightenment has been breaking ground in terms of window manager
``eye-candy.'' It can look however you want. Some
themes make it look like the computers on Star
Trek. Other themes make it look like MacOS or
Windows among other things.
- Click here
- Window Maker
- Click here
- Blackbox is extremely light-weight in terms of system resources. Thus it
runs quickly and reliably.
- Click here
- Sawfish (shown here with the GNOME desktop) is a very light-weight window
manager intended to be run with a
desktop such as GNOME, though it is not
required. The default setup on Turing
has Sawfish running without GNOME.
- Click here
How do I configure my window manager?
Warning: Improper use of the following can cause X to load up and
immediately drop you back to the login prompt. Be careful! If
you have a project due in an hour and there isn't someone friendly in the
lab to help you fix what you've done if you mess up, you probably shouldn't
meddle with your window manager. Improper configurations can take a while to
fix, check and make sure you are actually doing what you want.
Note: If you mess up your configurations, you can still
login via SSH from another
computer to fix things. From the terminal room you can use the
NCD Window Manager as a temporary fix just to get in
and change back to a window manager that works.
Changing your Window Manager
To use a different window manager, edit your ~/.xinitrc file. This
file lists the commands that are run when you log in. (Lines
beginning with a `#' are comments and are ignored by the
computer.) You will note that every line but the last one
end with an ampersand. This tells the computer to keep
going, rather than wait for that command to complete. (If
every entry had an ampersand after it, X would close because
it would get to the end of the ~/.xinitrc file.)
The current default ~/.xinitrc looks like this:
# set the root window display. do xsetroot -help for all the options that can
# be specified.
xsetroot -solid navyblue -display $DISPLAY &
#start button bar
/usr/local/bin/ButtonBar &
#start terminal windows
xterm -ls -geometry 80x40+10+150 -title `whoami`@`hostname` -bw 2 -sb -sl 300 &
xterm -ls -geometry 80x25+525+10 -title `whoami`@`hostname` -bw 2 -sb -sl 300 &
xterm -ls -geometry 80x25+525+400 -title `whoami`@`hostname` -bw 2 -sb -sl 300 &
#start the windows manager
exec ssh-agent sawfish
When you've decided on a window manager to run, you
will want to replace sawfish with the path to whatever window
manager you want. In the meantime, so you can test things, replace the line
with:
$ exec xterm
This will tell X to run an xterm window and only when that window closes go
back to the login prompt. (So among the windows you have, one of them is, as
far as X is concerned, the only process that has to stop before you can be
considered logged out. When you want to leave your terminal, type
logout in that window, and the system will return you to the login
prompt.)
Choosing a window manager that suits you
Now you have at least one xterm open. From the list below, pick a
window manager, follow the directions, play with it, and then quit. It should
only close the window manager, and then in your xterm you can try a new one.
- FVWM & FVWM2
-
> fvwm
(or)
> fvwm2
- BlackBox
- > blackbox
- AfterStep
- > afterstep
- Enlightenment
- > enlightenment
- TWM
- > twm
- OLWM
- > olwm
- GNOME (You can graphically choose any window manager once you log on.)
- > gnome-session
- Sawfish
- > sawfish
- NCD Window Manager
- [See above link]
Setting your window manager
At this point you should have found a window manager that suits you. Go back
and edit (in vi, emacs, vim, xemacs, whatever) your .xinitrc file and go
back to that last line (should be exec xterm at this point.)
Remove that line, and replace it with:
exec [WindowManager]
where [WindowManager] would be the command you used to try out
the window manager in the first place. (If you want, for some reason, to use
the NCD window manager, you'll have to find another way to do it.) Make sure
that whatever you have will actually call up the window manager (check typos),
and save it. When you log in again next time, X should call up your window
manager for you by automatically.
More information
For more information on window managers, consult the following sources:
Particular window managers
Official home pages
Man Pages
Man pages can be found for the following:
General resources
- The Open Directory Project page for window managers
- themes.orgwindow manager
information and themes to make your window manager look great. (If you find a
great theme that you think should be made available to everyone on Turing, email
staffnow@hmc.edu and let us know.
- Window Managers for XInformation about several window managers, including screen shots and configuration information.
Copyright (c) HMC Computer Science Department.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the no Invariant Sections, with no
Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU Free Documentation License.''
|