MSSL Basic User Note #9:

An Introduction to FVWM

Philip J. Smith 17/04/96 V0.5

This document:



The configuration section of this document assumes you already know some basic Unix and can use an editor.

When you first look at your Linux Workstation (configured as an X-Term), if nobody is logged on already, you will see a logon screen. This asks for your username and password on mssly3. The program here is xdm. After logging on, the fvwm window manager will start. This has many features. If you would prefer it to look and behave more like DecWindows you can see the configuration section of this document which will tell you how to copy a file. Further modifications will require you to edit this copied file.


FVWM is the Feeble Virtual Window Manager. It is anything but feeble. It has many options and a number of modules making it probably the best window manager available. It is free and you don't have to wait until the third quarter of 1994!

Fvwm written by Robert Nation, based upon twm, and is a modern fully-featured virtual window manager.

Virtual means that the desktop you work on is larger than the desktop you see: at any time you see a fraction of the available desktop. If this is too much for you it is easy to turn off this and other features to make fvwm easier to use but after a little practice, the features really become useful.

For more information about fvwm see the FVWM Homepage (
or see a site with FVWM Configuration Examples (

If these are slow, try a (maybe not quite so recent) copy of the FVWM configuration examples locally (http://mssls7/fvwm/).

For for more information on fvwm and its modules see the man pages:

or just use man from the command line:
	man fvwm
etc., which will bring up a text version of the man page.


Modules are just programs written specifically to run with fvwm. More detailed information can be found here.


The pager is the module which lets you move around your virtual desktop. It appears as a window showing a small grid. Clicking on one of the panes with the left or middle mouse buttons in this grid moves the desktop to that region of the virtual desktop. You'll see the view in front of you suddenly jump to another region. Clicking with the right mouse button moves the desktop not just to a different pane but to any region inside the virtual desktop (i.e. between panes).

You can also grab a window (which show up as coloured rectangles in the pager) with the middle mouse button and drag it to another region. You can even drag it out of the pager alltogether onto your desktop (into the `real world').

With the default configuration there are two `Desks' each with four panes.

The keyboard shortcuts for moving around the desktop are:

These don't move to another Desk - you need the mouse for that.


Goodstuff is the rectangle of buttons in the bottom-right corner of the screen. Some of these can be pressed (with any mouse button) to activate the application they represent and some are just applications that have been `swallowed' into Goodstuff. For example if you click on Netscape then after a few seconds, Netscape will start up. However, the xload and the clock are there just to look at.

You can change the Goodstuff buttons to run different applications.

Goodstuff is `sticky' meaning it stays on your desktop even if you move to another region of the virtual desktop (see later for how to do this).

Clicking on the desktop - Menus

If you click on the desktop (not on a window) with the mouse buttons you get one of three menus (one for each mouse button).

Utilities menu

The left button produces the Utilities menu. This consists of
Creates a window running the application top so you can see what's using the CPU.
Brings up a calculator.
An X version of the Linux manual pages.
A magnifier.
A strange clock. (Uses quite a lot of memory.)
A music CD player. (Uses quite a lot of memory.)
A menu for the available modules.
A menu for the available applications.
A menu for the available xterms (windows you type into). You'll probably use Large Color Xterm most of the time. Colour ones are best - the Unix command ls will give a colour display then.
A menu for the available games.
A menu for the available screensavers.
A menu for the available screen lock program types.
Exit Fvwm
A menu to restart and exit fvwm.
Refresh Screen
To redraw the screen (if it gets corrupted).

Window Ops Menu

Click on the desktop (not a window) with the middle mouse button and you will get the Window Operations Menu. This has the following options:

Use this to change the cursor into a `move' cursor (four arrows) which can then be held down on a window to move it
Use this to change the cursor into a `resize' cursor (four arrows) which can then be held down on a window to resize it
Use this to change the cursor into a `raise' cursor (a large dot) which can then be used to click on a window to raise it
As above but lower
Use to (de)iconify a window
Use to make a window stick when you move around the virtual desktop
Use to maximize a window
(Un)Maximize Vertical
Maximize vertically
Use to turn the cursor into a skull and cross-bones which can then be clicked on a window to delete it with extreme prejudice (harder than the delete below). You can also use the Kill button in the Goodstuff bar to do the same.
Use to turn the cursor into a skull and cross-bones which can then be clicked on a window to delete it.


It lists the windows on the desktop (excluding the ones marked `WindowListSkip'). Press the right mouse button to run the FvwmWinList module. This can also be run from the Utilities-Modules menu (hold left mouse button and go down to Modules, then to FvwmWinList, then let go). You can then release the mouse button on one of the window names and that window will be selected. This is useful if you have lost a window or you don't want to move desktop or go looking around.

Clicking on windows





Goodstuff bar

The buttons on the Goodstuff bar are as follows (left to right, top row then bottom row):
Use this to change the cursor into a skull and cross-bones which can then be used to click on a window to destroy it.
telnets to mssly3
telnets mssla3
Runs a calculator - you can type in the numbers as well as clicking on them - it is quicker
Runs an X-windows program to choose the keyboard type (normal PC or DEL-like LK)
Runs Netscape - the World Wide Web browser which is also used for user help on most topics
A music CD player
Starts Netscape with hypertext Unix, Linux and applications help
Shows you the system load average (the last 8 min approx)
Shows you the time
The pager module


fvwm first looks for the file .fvwm in the user's home directory (~ or /home1/XXX or $HOME), i.e. the file
If this does not exist, fvwm will look for the system startup file
(which is actually the same file as /usr/X11/lib/X11/fvwm/system.fvwmrc and /usr/lib/X11/fvwm/system.fvwmrc).

These files are written in a particular format for fvwm to read but they are also very easy for the human to read too.

To customize your fvwm setup, you should copy one of the system setup files. If you would like to start from the default setup, copy system.fvwmrc:

	cp   /usr/X11R6/lib/X11/fvwm/system.fvwmrc   ~/.fvwmrc

If you would like to start from the DecWindows/Motif Window Manager look-alike setup which is simpler and has many options disabled, copy system.fvwmrc.mwm:

	cp   /usr/X11R6/lib/X11/fvwm/system.fvwmrc.mwm   ~/.fvwmrc

Then you can edit your setup file to suit your taste:

	emacs  ~/.fvwmrc
or whatever your favourite editor is.

You will have to restart fvwm for changes to take effect.

Comment lines are preceded by a hash `#'.
To uncomment a line is to remove the hash(es) at the start of the line.
To comment a line is to put a hash at the start of the line.


These are pretty self-explanatory. Look for `color' and change the colour name. Possible colours are listed in /usr/X11R6/lib/X11/rgb.txt. If the colour you want is not there, use its rgb number like the examples in the fvwmrc startup files.

If you want to change the colours of the xterms you can use the -fg and -bg options. If you want to change them allm you will have to change them in numerous places in the .fvwmrc file: one in the InitFunction section, some in the shells section and some in the configuration of the Goodstuff module.


After the colours come the fonts. The line beginning
	Font ...
defines the font used for the menus. You can select a new font with the XWindows application xfontsel. A typical fonts look like be

There are also WindowFont and Iconfont for window text and icon text.

Focus stuff

AutoRaise. If you would like your windows to automatically raise to the top of the others when they are active, uncomment the Autoraise line. The number following this is the number of milliseconds before autoraising. 750 is good.

ClickToFocus. If you would like to have to click on a window for it to become active (rather than just moving the mouse over it), uncomment the ClickToFocus line.

Icon Stuff

IconBox defines the region in which the icons will tend to appear when windows are iconized.

Miscellaneous Stuff

EdgeScroll. Setting this to other than `0 0' allows you to scroll off the side of your desktop onto an adjoining part of the virtual desktop. So you move your mouse to far to the right and you end up on a pane to the right of the one you were on. This is off by default because it can be annoying.

Window Placement

RandomPlacement makes new windows come up without intervention, anywhere.

SmartPlacement makes new windows come up in blank regions if possible.

StubbornPlacement makes windows come up away from icons.

NoPPosition makes windows ignore their built-in positions and come up where fvwm wants them to rather than where they want to.

Style and Borders

If you want wider borders on windows, change the Borderwidth and HandleWidth parameters in the
	Style "*"
option to a larger number.

New applications can have style lines entered here. NoTitle removes the title bar; NoHandles removes the size-handles; Sticky makes the window stick to the desktop when you move around the virtual desktop; WindowListSkip removes the window from Fvwm's WindowList; BorderWidth 0 removes the border.


The things to do at startup are in here.


These things are done when fvwm is restarted (`Utilities'-`Exit Fvwm'-`Yes, Restart Fvwm').


The menu definitions follow. These can be edited by looking at the examples.


The mouse button definitions define what functions are bound to particular key and mouse combinations (like shift-left_mouse_button).

Keyboard Shortcuts

The keyboard shortcuts may be edited and it should be easy to see how by example.


Next comes the module confogurations.

Goodstuff has a

	*Goodstuff text icon Exec "name" app &
line for each application where text is the text you want to appear as a title in the Goodstuff button; icon is the bitmap or pixmap to use on the button; "name" is the name of the application to look for with the Style line; and app is the command itself.

No-Clutter Window-Identifier Pager FvwmWinList all have a section defining fonts etc.

Other configuration files: .cshrc, .profile, .Xmodmap

DISPLAY and xhost

To plot to a display other to the one you are sitting at you must do a
	setenv DISPLAY msslXX:0.0
where msslXX is the computer whose display you wish to plot to (so this would be setenv DISPLAY mssll1:0.0 to display to mssll1. You can make an alias for this to make it easier: just put a line
	alias s1 'setenv DISPLAY mssll1:0.0'
in your ~/.cshrc file and then you only have type
to have the same effect.

You must also have permission to plot to this display and to get this you must type

	xhost +msslYY
on the computer you are plotting to where msslYY is the computer you are plotting from (sitting at).

Because you will probably want a few computers to always be able to plot to your display, you can put an xhost line in your ~/.profile file. Edit this (creating a new file if necessary) and put in lines looking something like:

	if [ "$DISPLAY" != "" ]
	    xhost +mssly3 +mssla3
where mssly3 and mssla3 are the computers you would like to be allowed to plot to your display.

It is possible to say `xhost +' to allow everyone to plot but DO NOT DO THIS as it is a Lab. security risk and is not allowed.

Conditional expressions

If you find you need to do something different for Linux than for DEC-Unix in your .cshrc, .fvwmrc or .xinitrc files you can put a conditional expression in there. Say you want to have `edit' to run `jed' in DEC-Unix and `emacs' in Linux, you would write:
	if ( $OSTYPE != "linux" ) then
		alias edit emacs	# Linux specific
		alias edit jed		# Non-Linux specific
where $OSTYPE == "linux" is true if you are running Linux and false if you are running DEC-Unix.


If you want a keyboard key to actually send a different key or swap two keys round you can do this in your ~/.Xmodmap file. There is already a command to add mappings to emulate the DEC VT terminal alternate keypad:
or, the X version:
If you want to use the lk-style keymap permanently type:
	cp /usr/local/etc/config-files/.Xmodmap   ~
If you want any other mappings, put them in your own .Xmodmap file:
	emacs ~/.Xmodmap
(Use xev to get the keycode and xmodmap to check.) Your own .Xmodmap file will get processed after the system one.

If you want your Backspace key to generate BackSpace (Control_h), instead of the default Delete, then use:

	keycode 14 = BackSpace
in your .Xmodmap file.

If you would like X to interchange Delete and Backspace:

	keysym BackSpace = Delete
	keysym Delete = BackSpace
If you would like to do this temporarily type:
	xmodmap -e "keysym BackSpace = Delete" -e "keysym Delete = BackSpace"
If you would like to switch Caps Lock and Control on the keyboard:
	remove Lock = Caps_Lock
	remove Control =  Control_L
	keysym Control_L  =  Caps_Lock
	keysym  Caps_Lock  = Control_L
	add Lock = Caps_Lock
	add Control = Control_L

Backspace is the key to the right of `=' key. The DO key is Pause.
The HELP key is Scroll Lock.
There is no keypad comma key.

5 Ways to Kill Windows

  1. Quit the window properly using the quit/exit/close button belonging to the window itself.
  2. Click on the bar at the top left of the window with any mouse button and go down to destroy or close.
  3. Double click on the bar at the top left of the window with any mouse button.
  4. `Bomb' the window (or its icon) using the Goodstuff Kill button or using the middle-mouse-button destroy or delete options.
  5. Do a ps at the command line, find the process id and kill the process with
    	kill -9 <pid>
    	kill -9 1234

Cut and Paste and Scrolling

Thsse X features and aren't under the control of fvwm itself but they worth a mention here anyway.

Cut and Paste

You can select a region of text in an xterm by clicking on the xterm with the left mouse button and dragging the cursor to another position. The selected text is highlighted. You can then insert this text at the text-cursor location by clicking with the middle mouse button.

If you are pasting to an X application like emacs then you insert the text at the mouse cursor position (as opposed to the text cursor position) by clicking on that location with the middle mouse button.


To scroll a window with a scroll bar use: The keyboard short-cuts are:

And Finally ...


To set the colour of the desktop use:
	xsetroot -solid darkslategrey
for example. The colour (darkslategrey in this case) is chosen from the /usr/X11R6/lib/X11/rgb.txt file.

To display a pixmap on the desktop use:

	xpmroot pixmapfile.xpm
And to display an image use
	xv -root -quit image.gif
One of the above can be put into the InitFunction of your .fvwmrc file.

However if the module Backer is being used (it is by default) you should search for

	*FvwmBackerDesk 0 ... something ...
	*FvwmBackerDesk 1 ... something ...
and change the "... something ..." to the command you would like, e.g.,
	*FvwmBackerDesk 0 xsetroot -solid darkslategrey
	*FvwmBackerDesk 1 xv -root -quit picture.gif &
It is best to use the first option (xsetroot) and particularly to use a grey because this will not use up valuable colours from your colour table. Using a colourful image (say with xv) can reduce the number of colours available for other applications.

Colour and mouse

Often, the cursor will have to be moved into a window for that window's colour table to become active. This is normal. Also if too many colours are used by applications, new applications may complain about not being able to get a particular colour or colours. This too is normal. Just close the offending applications.

If there are still too few colours available, kill Goodstuff (e.g., click on the Goodstuff Bomb icon twice).

To make Netscape use a private colour map (i.e. to leave more colours free for other applications), which is the default for the standard setup, use

	Netscape -install
(this does make the screen `flash' when moving the mouse).

To change the mouse speed use the Unix command xset (see

	man xset
for details).

Errors, Warnings and What to do when Something goes Wrong

If the screen gets corrupted in some way (parts of windows or lines where they shouldn't be) do a Refresh Screen on the Utilities Menu (left mouse button on the desktop).

If X windows really gets confused, use restart fvwm (look for the Exit Fvwm sub-menu of the Utilities menu and if that doesn't work, exit fvwm.

You should never need to and you should not reboot. This should be done by a Linux system manager (Alisdair, Phil, Andy) because they can find out if and why it needs rebooting, they can check if anyone or anything is running important processes on the machine and they can shutdown the system with minimum damage to files. Most of the time the problem will probably be with the network, servers, etc. causing the machine to hang and rebooting won't do any good anyway.


Don't kill things unless you have to - try to close them in the normal manner (with an exit or quit option).

It is best to exit or logout xterms because then you will be warned of stopped jobs (see a Unix manual). If you just kill an xterm or quit the window manager, you will not be warned.

Be careful not to exit fvwm when you don't want to. You have to go through two menus to actually quit so this shouldn't happen too often. Don't press Control-Alt-backspace

The background and window borders belong to fvwm and the window contents to the XWindows application. This is why you can restart the window manager without harming the windows themselves.

Do not reboot: you could

If you know what you are doing there is a configure account (see ATP/ARD).

Do not turn off except in an emergency (e.g., fire).

Remember to set you Netscape home page. This is done by the user. The default home page is in the US so change it to http://www/ using the following:

	Preferences ...
	Window and Link Styles
	Home Page Location
and use Blank Page.

Known bugs

Other bugs or fixes should be mailed to the computer group.

P.J.Smith ---