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.

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState