Working with Window Managers


Suppose you don't want to burden your computer with the behemoth that is KDE, flashy though it might be. Suppose, instead, that you want your desktop UNIX experience under FreeBSD to be a minimalist affair, taking up as little as possible of the precious processing power your machine has, yet giving you the capability to work with modern graphical applications just as easily as you can under Windows.

Before KDE and GNOME, there were window managers. These simple programs, as lightweight as possible (so as to avoid putting undue processing load on the thin clients in computing clusters where they were run), served only the limited purpose of letting you move windows around within your X11 session. There were no menu systems associated with most window managers; there were no elaborate theme managers or screen savers, and certainly no office applications or file browsers. You couldn't view your files as icons even if you wanted toand you certainly couldn't move them around on your desktop. The desktop used to be nothing more than a space for your windows. The brief experience you've had already with TWM should give you enough of a flavor for what was, at the time that X11 was first being developed, all anyone in the desktop UNIX world wanted.

Times have changed, though. KDE and GNOME have shown that bringing a full-fledged, Windows-like user environment to UNIX is no impossible feat. Now that that has been proven, though, traditional window managers are off the hook, as it werethey no longer have to feel the pressure to provide features that we expect out of commercial desktop operating systems. That being the case, they can focus on what they do best: offering maximum configurability with a minimum of resource consumption and obtrusiveness.

As you saw in the beginning of this chapter, window managers take hold of existing windows and wrap their own window decorations and widgets around them. The windows themselves are managed by X11, the X Server; the window manager gives them the ability to move and interoperate, while X11 handles the back-end tasks of painting their contents. Because the X Server and the window manager are independent processes, you can try a window manager by simply killing the old one and starting a new oneall within the same X11 session.

Installing Window Managers

Some popular window managers, among the dozens currently in use, include the following:

  • TWM A veteran of the old school; minimalist, quirky, and supremely lightweight. The default window manager for FreeBSD until you try some others.

  • Window Maker A NeXTSTEP clone, offering workalikes for NeXT's innovative Dock and Preferences utility.

  • FVWM Easy on the eyes, with support for translucency, thumbnailing, and antialiasing.

  • XFce A clone of Sun's CDE interface, with its traditional utility bar and easy configuration utilities in modular form.

  • Blackbox A minimalist interface that nonetheless gives users a very aesthetically pleasing look and feel and great customizability. As a bonus, it was also developed on FreeBSD.

Each of these window managers, as well as dozens more, is installable from within the x11-wm section of the packages, or in the ports in /usr/ports/x11-wm.

To get an idea of what each window manager is capable of, visit its website; each window manager has a site that's listed in the pkg-descr file within its port directory. Nearly every window manager's home site has a gallery of screenshots and a list of features, and describes the goal of the project, whether it's to offer the smallest memory footprint possible, or to emulate the Amiga OS, or to be the most customizable desktop environment in history. Most window managers are pretty small, though, and naturally they're all free and open-source, so it doesn't hurt to install a few so you can try them all out at one sitting.

Tip

See the "Window Managers for X" site at http://www.xwinman.org for screenshots and comparisons of all the most popular X11 window managers available today.


Choosing a Default Window Manager

When your session is managed by a minimalist window manager, you don't generally have a login manager such as KDM or GDM that launches at boot time and provides its own authentication window. Instead, each user starts up an X11 session by typing startx at the command prompt. This command reads a file called .xinitrc in your home folder; this file contains a command that launches the window manager of your choice. You have to supply that command, and create the file if it doesn't exist already.

After you've decided on what window manager you want to use, you can make sure it's the one you always get when you run startx by putting it into the .xinitrc file using a text editor such as ee. Type ee .xinitrc, and then add this line to invoke FVWM as your window manager:

exec fvwm


Save the file. From now on, when you type startx, your X11 session will start up using FWVM. Simply change this file's contents to change which window manager you want.

Note

KDE and GNOME, because of their more complex natures, have slightly nonintuitive command names you must invoke if you want to launch them from the startx command rather than from KDM or GDM. For KDE, use the following command in .xinitrc:

exec startkde


For GNOME, use the following:

/usr/X11R6/bin/gnome-session



The .xinitrc file is a shell script. You can take advantage of this fact to set up a whole session environment to execute every time you launch X11, as described in Chapter 7, "Advanced X11 Configuration."




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net