Basic FVWM Configuration

If you've recently set up fvwm and are using the default system.fvwmrc, you'll find that clicking the left mouse button anywhere in the root window brings up a pop-up menu. Not all of those entries will be valid for your system. Here's how to change them.
A Word about Styles

One powerful feature of fvwm is that it allows the user to define Styles for any or all applications. The idea is actually a fairly simple one: you can designate how an application window appears and several of its behaviors by setting up a style for it. This can include such things as whether it has a title bar, the size of the window border, whether it has resize handles, what icon it is associated with, and so forth. One such style option, as you might imagine, is color.

The syntax for a Style entry is actually quite simple and might look like:

Style "xterm"  Title, Handles, HandleWidth 7, Icon rxterm.xpm

That is, it begins with the word Style and is followed by the name of the program enclosed in double quotes—in this example, the xterm program. What follows is a comma-separated list of the various style options that you may wish to apply to the program.

Let's suppose you wanted to change the color of an application window to a simple black text on gray background. Simple enough, although it's important to make two points: first, the Styles color entry only sets the colors of the decorative window frames that fvwm puts around the program window—it doesn't change the colors of the application itself. Second, the colors are used when the window is non-selected (that is, it doesn't have the input focus). When the window is selected, the HiForeColor / HiBackColor combination set the color scheme. That said, to change the color scheme when the application window is non-selected you could add an entry such as:

Style "xterm"  Color black/gray, Title, Handles, Icon rxterm.xpm

The syntax is simply the reserved word Color followed by the foreground color name or hex number, a forward slash, and the background color name or hex number. You could also designate each color using the reserved words ForeColor and BackColor:

Style "xterm"  ForeColor black, BackColor gray, Icon rxterm.xpm

Either method will work.

One more quick point about modules and we're done! As previously mentioned, fvwm allows additional functionality to be added using modules such as FvwmPager or the GoodStuff modules. The foreground and background colors of the modules themselves (and not just the decorative window frames as we've been discussing up until this point) can be set using an entry such as:

*GoodStuffFore    black
*GoodStuffBack    turquoise

Configuration lines for modules must begin with the asterisk (*) character, as seen in the example above. To specify the foreground color the module name is given with the Fore suffix. The background color designation uses the Back suffix. In the example above you can see we've changed the color combination to black text on a turquoise background. Again, you can use either the color name or the hexadecimal notation for specifying the color to use.

Well, that should get you going! Obviously, there is a lot more to color customization than the brief overview presented here. For the curious and adventurous, let me refer you to the manual pages for X and fvwm, and the excellent book X-Windows System Administrator's Guide (volume 8 in the X-Windows series) by O'Reilly & Associates publishing. Chapter 6 of this fine reference has a fuller discussion of color and the X-Windows system, including the X-Windows Color Management System (Xcms) that was implemented beginning with release 5. Enjoy!

John Fisk (fiskjm@ctrvax.vanderbilt.edu) After three years as a General Surgery resident and Research Fellow at the Vanderbilt University Medical Center, he decided to “hang up the stethoscope” and pursue a career in Medical Information Management. He's currently a full time student at the Middle Tennessee State University and hopes to complete a graduate degree in Computer Science before entering a Medical Informatics Fellowship. In his dwindling free time he and his wife Faith enjoy hiking and camping in Tennessee's beautiful Great Smoky Mountains. An avid Linux fan since his first Slackware 2.0.0 installation a year and a half ago.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix