FVWM Configuration and Tweaking

image link-topic-sf0.jpg

FVWM configuration, plus a few aspects of X configuration that tend to get done at the same time.

1. My .Xresources File

The .Xresources file in your home directory acts as an override to allow you to control the appearance and behavior of things in the X Window System. In Arch Linux, these systemwide defaults are located in files in


It can be useful to examine these app-defaults files, as sometimes they include resources not properly documented elsewhere.

The .Xresources way of doing things is the successor to the older .Xdefaults method/file. The primary difference (simplifying greatly) is that to get the old-style .Xdefaults to work, you just had the file. To get an .Xresources file to work, you need to get it read into a database. To ensure that this is done at X Window startup, add an "xrdb" line to your ~/.xinitrc file before the "exec fvwm" line. So:

xrdb ~/.Xresources 
exec fvwm 

Here it my .Xresources file as a file: dot-Xresources

(Of course you should rename it ".Xresources" if you just grab the file to use it.)

At present, I'm using it to control:

It seems to me that the appearance of windows and window decorations is best controlled not in .Xresources but in the configuration file for your window manager (e.g., .fvwm2rc for FVWM).

2. My .fvwm2rc File

I keep this in ~/.fvwm/.fvwm2rc (it works as just ~/.fvwm2rc, but keeping all FVWM stuff in ~/.fvwm is cleaner).

Here it is as a file: dot-fvwm2rc

(You should rename it ".fvwm2rc" if you just grab the file to use it.)

While you're certainly welcome to use my .fvwm2rc file (or bits and pieces of it) under the GNU GPL 3+, I doubt very much that many people will wish to copy the rather minialist visual style it defines. I think I've finally figured out what this style is: Goth Mondrian. Rectilinear and basic black.

3. An FvwmScripts Example (DayDate)

The .fvwm2rc configuration above requires an FvwmScript language script, "~/.fvwm/FvwmScript-DayDate". It's a relatively simple script which displays the day of the week and the date. I use it in conjunction with xclock in a set of FvwmButtons.

Here it is as a file: FvwmScript-DayDate

4. Fonts for Digital Lettering

The matter is discussed quite well in the Arch Linux documentation at: https://wiki.archlinux.org/index.php/Font_Configuration

Quick notes:

You can specify a specific kind of digital lettering within a font in two ways: XLFD and Xft.

The old fashioned way is with an X Logical Font Description (XLFD). This is a bit finicky, but always works (provided the font is installed). To list all installed fonts in XLFD format, use xlsfont. Here's an example of an XLFD (from my .fvwm2rc file):


# misc = digital "foundry" name 
# fixed = digital lettering family name ("fixed", "Linux Biolinum", etc.) 
# medium = weight 
# r = slant (roman, italic, ...) 
# normal = set width 
# first '*' means any additional style 
# 10 = pixel size 
# next '*' would be point size in tenths of a point 
# (if you could actually define it in most digital lettering; 
# but I am a typefounder, so I'm just getting snippy here) 
# ... 
# iso10646-1 = the character set encoding 

The newer way is to use Xft. This requires Xft to be installed. I think that it is picked up with the Arch Linux "font-config" package, which is in turn prerequisite for many text applications (so it probably is present). To list all installed fonts in Xft format, use fc-list. Here is an example of a simplified Xft use (from my FvwmScript-DayDate script):

xft:Linux Biolinum:pixelsize=15 

There is a sequence for fallbacks if the specified font of digital lettering is not installed (in this example a from the ttf-linux-libertine package), but of course it's best to make sure that it is installed.

5. Automounting USB Devices Using devmon

There are several ways to set up the automounting of USB sticks in Arch Linux. See https://wiki.archlinux.org/index.php/USB_Storage_Devices and https://wiki.archlinux.org/index.php/Udisks At the moment, I'm using devmon. See: http://igurublog.wordpress.com/downloads/script-devmon

devmon is installed as a part of the "udevil" package in Arch Linux:

sudo pacman -S udevil 

devmon should be started after FVWM starts. There is a hook in the StartFunction (in .fvwm2rc) to do this, but we have to be careful not to start multiple copies of devmon either when restarting FVWM or starting it for a second time from a single login session. To avoid this, I've adapted a short bash shell script which checks and only starts one: CheckAndStartDevmon-dot-sh

(Note: The real name of this file is "CheckAndStartDevmon.sh", and if you use it you should rename it to that. I had to adopt the awkward "-dot-sh" name used above because if I used ".sh" Firefox (at least, and probably other browsers) would try to download it when you clicked on it rather than simply opening it as a raw ASCII text file.)

I put this script in my ~/.fvwm directory (just a handy place to put it) and invoke it from my .fvwm2rc file. Here's the snippet from .fvwm2rc that does it:

# See: http://www.fvwm.org/documentation/manpages/unstable/fvwm.php 
AddToFunc StartFunction 
+ I FvwmButtons 
+ I Exec ~/.fvwm/CheckAndStartDevmon.sh & 

Once it's running, devmon will automatically mount USB devices.

To see what is presently mounted, use:

df -vh 

Unmounting is done from the command line. See: http://igurublog.wordpress.com/downloads/script-devmon for a full explanation. One useful command is:

devmon --unmount-removable 

This may be done as your normal user (no need for sudo).

Note that in this devmon invocation "--unmount" is uNmount rather than the more conventional (for UNIX) "umount".

Select Resolution: 0 [other resolutions temporarily disabled due to lack of disk space]