19.1 Running fvwm2Your Linux distribution may include a reasonably current version of fvwm2; if not, you can download it from http://www.fvwm.org. If you're running GNOME or KDE, the easiest way to switch over to fvwm2 is to edit your X client's startup file to invoke the window manager and then restart X. If you start X from the Linux command line with the startx command, the startup file is .xinitrc; if you start X from one of the graphical display managers (XDM, GDM, or KDM) and you are running Red Hat Linux, the file is probably .Xclients; otherwise, it is .xsession. Here is an excerpt from a simple startup file that has been edited to run fvwm2: xterm -geometry +50+0 & xterm -geometry -0+0& exec fvwm2 fvwm2 provides GNOME support as a compile-time option. As this is being written, the current stable version of fvwm2 is 2.4.15. The next major release, currently in development as the 2.5 series, will also support KDE compliance. In addition, fvwm2 now supports Xinerama as a compile-time option. Xinerama is a feature of recent versions of XFree86 that permits multiple monitors to be treated logically as a single monitor (of course, each of these monitors needs its own video card). 19.1.1 Configuration FilesThe key to how fvwm2 works is the configuration file it reads at startup or restart. The systemwide configuration file is called system.fvwm2rc and usually lives in the directory /etc/X11/fvwm2. The typical system.fvwm2rc file that gets distributed should create a simple but perfectly workable environment. We'll take a look at one in the next section. There's no guarantee that the file on your system will create the same layout, but you'll get the idea. If you want to customize fvwm2 to suit your needs, you need to make a copy of system.fvwm2rc called .fvwm2rc and put it in your home directory. This personal configuration file takes precedence over the systemwide file. You can edit your .fvwm2rc file to adapt the window manager to your needs. There are a few simple rules for editing your .fvwm2rc file. First, any line that begins with a pound sign (#) is a comment (i.e., is not interpreted as part of the window manager definition). Second, a plus sign (+) at the beginning of a line means to repeat the first terms from the previous line. Section 19.5.2, later in this chapter, illustrates the use of this syntax. The final thing to keep in mind is that life will be simpler if you weave your own definitions into the file, respecting its current contents and their order. So, for instance, if you decide to define some function keys, put your new lines in the section of the file that already deals with keys. In terms of fvwm2 customization, there's some good news and some bad news. The good news is that you can make an extraordinary number of changes to the way fvwm2 looks and operates. That's also the bad news. The window manager has dozens of configuration options, many very handy and easy to use, others complex and even arcane. The sum total can make the configuration file syntax daunting to anyone who isn't accustomed to serious tinkering. In fact, you could get dizzy considering the possibilities. The fvwm2 manpage gives all the configuration options and illustrates their use; you may also want to consult the manpages for the fvwm2 modules, introduced in the next section. The web site http://www.fvwm.org is the definitive source for fvwm2 documentation, news, source code, and updates. This chapter will help you cut to the chase in performing some of the more basic and useful customizations, as well as some tricky but handy upgrades. 19.1.2 A Modular Approachfvwm2 has been designed to allow the interested user to devise new components, known as modules. A typical module is the Pager (FvwmPager), which provides a map of the desktop space and a way to navigate it, as we'll see a little later in the chapter. The Pager is a default module in just about any desktop environment. FvwmWinList is another useful module. Though not as ubiquitous as the Pager, it is just as useful. The module displays the WinList, which is a small window that provides a list of all the windows running on all pages of all desktops. The WinList is another navigation tool, allowing you to switch the pointer focus to any application you have running and switch the screen view so that you can use that application. We'll talk more about this later. A module is actually a separate program from fvwm2 but works in concert with it, passing commands to be executed to the window manager. Most configurations of fvwm2 have a Root menu with an FvwmModules submenu from which you can start certain of these programs. (Naturally, the list of modules on the menu is configurable.) You might also edit your .fvwm2rc file to run modules in other ways (when you type certain keys, when other events happen, etc.). Since a module is a separate program, users can write their own modules without adversely affecting fvwm2. Note, however, that you must configure fvwm2 to start the module's process; you cannot start a module from the command line. Note also that while some modules, like the Pager, are intended to be used for the entire session, others simply perform a function and exit (e.g., RefreshWindow). Since modules are programs in their own right, many of them have their own manpages too. |