TheNextLevel Window Manager

If you've bought a shiny new copy of Red Hat Linux, you will have noticed that your default window manager is something called TheNextLevel. If you're using something like fvwm or AfterStep, or even Enlightenment or even WindowMaker, some of what I'll be talking about may apply. TheNextLevel--TNL for short--is simply a combination of enhancements to fvwm95, which has its origins in fvwm. Most modern window managers have a lot in common with good old fvwm. So you can learn something about what is possible with fvwm just by looking closely at TNL.

Why TheNextLevel

TNL extends fvwm through the use of the m4 macro package. During the X Window System start up, many environment variables are configured dynamically by TNL. This is handy because administrators and users often change their environments, and dynamic start ups can identify changed paths and altered resources. Static startups, on the other hand, will not probe these changed resources and can mislead you through bogus menu picks and non-existent functions. The macro package can add a sanity check to your window manager.

It all started in 1996 when Red Hat Software had a desktop contest where everyone who cared to sent in a screen shot of their own ``killer desktops'' with resource files that Red Hat could duplicate. There were many extremely cool runners up who could have won, but Greg Bardos at Duke University had the right combination of practicality and flexibility, combined with a tasteful presentation and a powerful combination of tools, to win the overall competition with his entry. Red Hat further enhanced his entry, made some changes specific to their distribution, and made TNL the default window manager for Red Hat Linux 4.0. Now that RHL 4.2 is out, TNL is still the default window manager.

Customizing TNL

The biggest criticism RHL gets from new users is that TNL is difficult to customize. Well, I have to agree, it is much more sophisticated than plain old fvwm. With fvwm you simply copy .system.fvwmrc into your home directory, customize that and rename it to .fvwmrc, and off you go. There's quite a bit more to customizing TNL.

The documentation is normally found in /usr/doc/TheNextLevel. You can start with your web browser of choice, say Lynx (which should run on even brand new systems): lynx /usr/doc/TheNextLevel/index.html

That should get you started in reading about the basics.

The other file location you should know about is /etc/X11/TheNextLevel. In this directory there are a mass of dotfiles. You'll need to list the directory with the -a switch: ls -a These are the files you'll be working with beyond the basics. After you read all the documentation in /usr/doc/TheNextLevel/index.html you'll know how to modify /etc/X11/.fvwm2rc.programs, which is the file that the startup macros read to configure your program menus. (Only programs that actually exist on your system will appear even if they appear in this file. But they must be added to this file for you to choose them from the applications menu.)

Beyond the Basics

There are a few customizations that may not be easy to find in the documentation. Fortunately, the resource files in /etc/X11/TheNextLevel have excellent documentation inside them. If you try: more /etc/X11/TheNextLevel/.fvwm2rc.defines you'll see what I mean. Just read the notes and you'll see how you can alter the current settings to your taste.

For example, system sounds are turned off by default. The sound directory by default is /usr/local/lib/sounds, and you can put *.au files in there and map them to events such as closing windows or starting applications. (Map the events in the .fvwm2rc.modules file, but turn on sounds in the .fvwm2rc.defines file.) It will be every bit as slick as Windows 95; you just have take the time to configure it to your tastes. You can even create themes and save them as static .fvwm2rc files in your home directory or as alternate .fvwm2rc.defines files in your /etc/X11/TheNextLevel/.fvwm2rc.defines files in your TheNextLevel directory. (Be careful to not lose your original files, however. Rename them carefully! I'd recommend the single .fvwm2rc in your home directory approach for themes because it's simpler, but you lose some of the dynamic configuration at startup by doing this. With more experience, you can choose themes dynamically at startup by further hacks to the m4 startup macros. This is not for beginners!

Another useful file to modify is the .fvwm2rc.init file in /etc/X11/TheNextLevel. These are the functions that start when you start the X Window System, which will start your customized window manager by default. Here you can define things like what color your backround is, or whether you want to use a background graphic on the root window, what programs you want to start, any geometry specifics for special applications, and so on.

The .fvwm2rc.modules file also contains some other useful information you can modify. For example, your task bar by default displays a small envelope next to the clock to show you when you have new mail. You can add a line to your FvwmTaskBar module that will start your favorite mail client by double-clicking on that icon. Add the following command to the end of FvwmTaskBar stanza:

*FvwmTaskBarMailCommand Exec nxterm -e pine

You can substitute your favorite e-mail program for pine, which happens to be my favorite. This stanza is right before the part of the file where you set up your system sounds.

Conclusion

You can really go crazy learning this window manager because there's so much to it. I like it because it's very flexible and it still looks decent when you're running 8-bit color in X. That's what I run on my laptop, which I'm using to write this article, by the way. TNL also introduces you to the flexibility of both the X Window System and Unix in general. TNL is complicated for the new user to learn, but once you are comfortable with it, you'll be happy you made the effort. And if you don't want to make the effort, just comment out all the fvwm2rc type statements in your .Xclients file in your home directory!



David S. Jackson
Wed Sep 10 07:49:55 PDT 1997