[ Friday, 15 September 2006, michuk ]
FVWM-Crystal is an eye-candy, functional and ultra-fast desktop environment for GNU/Linux, based on FVWM. Crystal can be used even on very old machines, thus it is a noticeable alternative to popular desktop choices like XFCE or Fluxbox.
Author: Borys Musielak
FVWM is one of the oldest window managers for the X Window System. It is actually so old that even the creators don’t remember what the first letter of the acronym stands for. FVWM acronym is often evaluated to “Flexible Virtual Window Manager”. If you like, you can however put any other word there. Some examples include: “Fine”, “Freaky”, “Favorite”, “Furious”, “Functional”, etc .
FVWM is known for its configurability. It provides a countless number of options making it possible to personalize your desktop to a very large extent. It even has it own scripting language and a shell (called FVWM console) which can be exploited by advanced users to interactively change the desktop looks and behavior. For programmers, there is an API available for creating new applets for FVWM, written in Perl.
The default FVWM looks is very minimalistic. There is just a blank desktop and a menu accessed with a right mouse button. In order to appreciate this great window manager you need to visit the FVWM-themes website, where you can see multiple screenshots of modified FVWM desktops, as well as download numerous themes. Here are just a few interesting examples:
- FWVM which Windows XP looks and FVWM with MacOS looks – themes by user sa from xmission.com
- Smokey and Artic – original themes created by Pierre Eric Marchandet, with transparency enabled
- Another interesting theme created by Tril from ironphoenix.org, using a matrix of virtual desktops (3×3) and WindowMaker-like docks.
FVWM-Crystal, which is the subject of this article, has been originally created as an FVWM theme as well. However, it evolved to something much more complex. Currently Crystal is integrated with a bunch of external tools like music players, desktop toolbars, file managers, terminals and more, so we decided to call it a minimalistic desktop environment with FVWM as the window manager. Following this path, it should be compared with GNOME or XFCE rather than Fluxbox, WindowMaker and such. But, to be precise, it’s actually something in between.
Good question, like a politician would say. We have dozens of window managers for X and a few full-featured desktop environments. Why should you care for yet another not very popular program doing the same thing? Well, there are a couple of reasons why, actually.
- FVWM-Crystal is fast. It boots-up a few times quicker than GNOME or KDE and takes up a dozen times less memory. This is however a feature of most lightweight window managers. Nothing too fancy.
- FVWM-Crystal looks really great. The whole desktop is transparent by default, including application panels, clock and menus. There are some great themes available, as well, making the desktop look like Windows or MacOS. It has its own original Crystal look as well. This is something already.
- FVWM-Crystal is convenient, thanks to very configurable shortcuts, well-selected functionality and neat integration with lots of external applications, like file managers (ROX-Filer, Nautilus), tray panels (trayer, habak), multimedia players (XMMS, mpd or Quod Libet) and many more.
- FVWM-Crystal is highly configurable. You can alter almost any desktop function: windows buttons, main menu and sub-menus, virtual desktops, shortcuts, mouse behavior and everything else you can think of – including the layout and the meaning of buttons – with just a few mouse clicks.
Crystal is a pure pleasure to use. With a file manager like Nautilus of ROX-Filer, it really makes a consistent and full-featured desktop for every-day work. But… let’s quit that marketing-talk for a while and just describe the actual features offered by Crystal.
For file management we have a choice of ROX-Filer and Nautilus. Of course we could employ another file manager as well, or just do without one. Still, I suggest trying ROX, since it nicely fits with the Crystal way of doing things. It’s very responsive, looks nice and offers quite a lot of functionality. The key features of ROX-Filer are as follows:
- intensive usage of drag & drop,
- an option to assign many actions to file types,
- quick navigation using both mouse and keyboard, e.g. pressing / (slash button) triggers a window in which we can enter the folder name (with names completion!) which we want to visit,
- bookmarks with frequently user folders,
- folders and files recently open or altered are marked bold,
- fast and easy permission management (also recursive) for files and folders,
- quick folder size calculation.
Trayer is an external app which functions as a notification area (also known as systray). It is fully compatible with GNOME and quite compatible with KDE, which makes it a universal place to hold icons of all GUI applications which are currently running in background (like instant messengers, music players, Beagle search client, update manager and many more). The icons look pretty nicely on the transparent panel which makes an impression that it is a natural part of the desktop (which it actually is).
Multimedia player integration
FVWM-Crystal provides a special way of dealing with music players. It has a unique menu for song management which is compatible with quite a few Linux multimedia players. Currently it supports MPD, XMMS (xmms-shell required), XMMS2, Quod Libet and cdcd. The multimedia panel provides options to control volume, manage playlist, turn shuffle mode on/off and do other things typical to audio players. All of those can be accessed both using mouse and keyboard (the default shortcuts for music management can be found in components/bindings/Music).
Virtual desktops is what FVWM is famous for. Desktop switching is as fast as it could be. The virtual desktop applet is quite aesthetic (and transparent, obviously). It shows thumbnails of all applications opened on each desktop (including their current sizes). Using just one button (middle mouse by default) we can move apps between desktops. Alternative ways include: using a defined key binding or just dragging the window to the edge of the current desktop which automatically moves it to the one it borders on.
In short, FVWM-Crystal is prepared to handle virtual desktops in any required way, both using mouse and keyboard. The actual behavior is up to the user.
Two of the default Crystal recipes: Top-Down and Top-Line allow for windows thumbnails. This means that when you minimize a window, Crystal automatically creates a neat-looking thumbnail of it and places it on your desktop. This is a nice alternative to windows panels with all minimized windows. Of course you can use either of these solutions or even both at the same time.
Thanks to a special recipe: Default with ACPI, we can be constantly informed about the current status of the battery and processor temperature on notebook computers. Of course, in order for these functions to work, proper kernel modules need to be activated. But this is not an issue anymore, since most of the modern distros (like Ubuntu or openSUSE) come with such kernels preconfigured.
So, we covered the key features of FVWM-Crystal already. Let’s now move to the practical part of setting up our new desktop. In the following sections, you will learn how to install, configure and use Crystal on a daily basis.
Installation of Crystal requires a few steps. You certainly need the latest FVWM snapshot. FVWM is available in almost all popular Linux distributions. The package is usually called fvwm or fvwm2. If it is not in the repositories of your distro, you may need to download the sources from the project’s website and compile them manually. For proper functioning of FVWM-Crystal you need at least FVWM 2.5.13 (or a more recent version if available). Except for FVWM, you also need a few external apps to get going. Not all of them are required, but it’s good to install everything so that you can test Crystal with full functionality first, and remove the unwanted features later on.
Requirements (the complete list):
- FVWM – version 2.5.13 or higher
- Python – for some scripts
- ImageMagick –
convertare used in Crystal for thumbnails and desktop screenshots
- ROX-Filer or Nautilus – for icons on the desktop (additional wallpaper program not needed)
- XScreenSaver – a screen saver
- trayer – a systray (notification area)
- configured sudo and optionally gksudo – for running text/graphical programs using root privileges and reboot/shutdown computer options in the Exit menu
- terminal emulator – xterm, aterm, Eterm, mrxvt, urxvt, Eterm, gnome-terminal, konsole or xfce4-terminal
- GDM (gdmflexiserver) – for shutdown/reboot/new login commands in the Exit menu
- program for setting a wallpaper – Esetroot, hsetroot or habak
- music player – Music Player Daemon (+ mpc), X MultiMedia System (+ xmms-shell and XMMSFind), XMMS2, Quod Libet or cdcd
Most of those programs are probably already in your repos. If you are using Ubuntu or Debian, you can simply issue the following command to get all the software you may need for Crystal:
sudo apt-get install fvwm python imagemagick rox-filer\\ xscreensaver trayer gksu aterm habak mpd mpc
In other distros the command will looks slightly different and perhaps the package names might be different as well.
So, when you already have all the required dependencies, it’s time to get Crystal. For that, you can visit FVWM-Crystal download section and grab the latest version. Currently (as of writing this article) it is version 3.0.4. When the tarball is downloaded, all we have to do is unpacking and installing:
tar xvzf fvwm-crystal-3.0.4.tar.gz cd fvwm-crystal-3.0.4 sudo make install
Optionally, you can also copy the
addons/fvwm-crystal.desktop file to folder
/usr/share/xsessions/, so that FVWM-Crystal appears in the list of desktops in your favorite session manager (GDM/KDM). We recommend to look through the rest of the files in
addons folder as well and apply the suggestions according to your needs. Read more about those files in the next section.
Crystal introduced a few one-click configuration options available straight from the main menu. You can change the windows style, color theme, recipe, desktop wallpaper, screen-saver and the default applications (music player, terminal, etc) using the System menu (the one with a Crystal image). From the same menu one can also make a screenshot (with or without a delay, saved in
~/.fvwm-crystal/screenshots by default), log out or reboot/shutdown the system.
For all remaining configuration options, manual editing of configuration files is required. The good part of this is that the Crystal config files are very well documented. It’s fairly easy to learn how to use them for adjusting the desktop look and feel. Still, the lack of advanced configuration wizard (known from GNOME, KDE, or even IceWM) is a little problem, especially for the newcomers.
Coming back to the configuration files, the Crystal configuration is located in
/usr/local/share/fvwm-crystal/fvwm. Personal settings are located in
~/.fvwm-crystal. It’s a good practice to copy each file you need to edit from the system-wide folder to the corresponding location in
~/.fvwm-crystal, so that you always know which files has been modified. This way you also keep the original configuration for all users and you can switch back to it any moment you want (by simply removing
The FVWM-Crystal configuration is divided into a few folders:
- Applications – contains a list of programs to be displayed in the Crystal menu,
- colorsets – the color sets describe the color of foreground text, menu items, shadows and transparency level of each component,
- components – this is the place where all the low-level stuff can be configured, more details about this folder later on in this article,
- decorations – window decorations and scripts for different button models (FVWM-Crystal, MS Windows, MacOS, OS/2, NextStep),
- icons – icons of the applications, used in the menu, on the applications panel, on the window bar and in the virtual desktops applet,
- locale – translation files for desktop and menu (in different languages),
- preferences – personal settings (which we can also change using the Crystal menu mentioned before) including the list of apps to be launched during the X window system startup,
- recipes – recipes are FVWM scripts which describe the desktop layout – things like the main menu, clock, applications panel, virtual desktop applet, etc,
- scripts – scripts used by Crystal, by default we have here some scripts used by the MPD application,
- wallpapers – one of the places where Crystal expects to find the desktop wallpapers, another two are
The folders which are especially interesting are
preferences. They consist of those configuration options that are usually most frequently used.
All key bindings are defined in
components/bindings. The first thing I do after installing Crystal is changing the default desktop switching key in file
Pager-Horizontal, since I’m used to
ALT + 1-10 combination.
Another important file is
preferences/Startup. This is the place where you can put all the apps you want started on Crystal boot-up. I usually enable the Ubuntu’s update-manager, Beagle search daemon and messengers: Skype and Psi (Jabber). Sample configuration is provided with Crystal. It’s enough to comment out (remove ‘#’ sign) the required lines.
There is one more file which can be very useful – it’s
userconfig in home Crystal root (
~/.fvwm-crystal). You can put any FVWM command there, but it’s good to keep this file clean and modify the appropriate ones, leaving userconfig for quick hacks only. Here is a sample userconfig I use.
Before launching FVWM-Crystal for the first time it’s good to take a look at the
addons folder located together with the sources. There are four files there and here is what they are responsible for:
- fvwm-crystal.desktop – contains FVWM-Crystal desktop description, after placing it in
/usr/share/xsessions/we’ll be able to choose Crystal as one of the desktops in our session manager (kdm, gdm or xdm)
- sudo – this is a sample sudo configuration (
/etc/sudoersfile), when applied, the user will be granted permission to reboot/shutdown the system straight from the Crystal menu. Before replacing the
/etc/sudoerscontent with this sample configuration it is required to change the
User_Aliasoption by providing all users who should be granted such permissions
- Xresources – we can copy this file to our home folder and rename it to
.Xresources(a dot at the beginning); this file configures the terminal emulators used in FVWM (by adjusting things like colors, fonts and encoding). The terminals are configured for Latin1 encoding by default. If we need another encoding (like UTF-8) we need to manually correct it in this file.
- Xsession – if you don’t use a session manager, then copy this file to your home folder, renaming it to
.Xsession. Crystal will be loaded automatically when issued the
startxcommand in the console.
One crucial remark at the end. The documentation provided in folder
doc (together with the sources) is really worth reading. It’s not too long and consist of things that are useful, especially when you are going to try Crystal for the first time.
Tips & tricks
We already described what Crystal is, why it is worth using, how to get it and how to adjust it to our needs. Finally, we would like to provide you with these few tips and tricks – things that make Crystal even more pleasant to use. And you can impress your girlfriend by using them, too
Using FVWM-Crystal without knowing the shortcuts is like driving a car without touching the clutch. In other words, to get the most out of Crystal, you need to learn the basic shortcuts. Otherwise you may be surprised because the meaning of mouse buttons and keys in some situations are totally different from what you are used to from KDE, GNOME or even Fluxbox.
- Right mouse button click on desktop – opens up a terminal
- Middle mouse button click on desktop – turns on and off the feature to switch desktops by moving the mouse cursor to the edge of the screen
- ALT+TAB –
- ALT+F1 – ALT+F10 – switching between virtual desktops 1-10
- ALT+Escape – switching between the two recently used desktops (cool stuff)
- Num-5 – change of focus between the two recent apps (even cooler stuff!)
- ALT+` – opens and closes QuakeConsole window – a nice virtual terminal (which can be xterm, aterm or mrxvt, depending on our choice) – the terminal comes out of nowhere and shows up in the top part of the desktop
- ALT+Shift+` – opens up a new terminal window (xterm, aterm, mrxvt, Eterm or gnome-terminal)
- ALT+; – opens up and closes FvwmConsole – a place where we can watch FVWM logs, as well as issue commands and FVWM scripts – I usually use it for launching custom apps
- ALT+Menu – triggers a menu show up (the Diamond menu with all the applications, etc)
- ALT+= maximizes current window (back and forth)
- ALT+Backspace minimizes the current window to a desktop icon
- ALT+Shift+Backspace closes the current window
- ALT+Shift+= – full screen (and back to normal size)
- ALT+z/b – previous/next track in the music player
- ALT+x/c/v – start/pause/stop playing
- ALT+./, – mixer volume up/down
Of course these are just the most common shortcuts. For more, see
doc/Keyboard bindings.txt in the sources folder of FVWM-Crystal.
The default setting for window focus in Crystal may be quite astonishing. Clicking on some window does not automatically put it to the front. You need to click on the window title or use the left Alt button to make bring it to the top. This is intentional behavior. It’s especially useful when with instant messengers – we can chat and do other things at the same time, without bothering with the windows coming up front unexpectedly. A special key binding (numeric ’5′) triggers a change of focus between the web browser/word processor and the chat window. This way we can use both app without bothering with the mouse.
Working in such environment can be frustrating at the beginning since nothing seems to work as expected. However, after getting used to it, we gain much better control over our desktop and are able to work faster.
Of course if you don’t like this behavior, it’s easy to change it and get back to the regular GNOME/KDE way of working with windows.
FVWM-Crystal and UTF-8
If you use UTF-8 encoding in your system (and this is the default in some distros like Ubuntu or Fedora Core), you will need to manually edit a few configuration files so that the Unicode-specific letters show up as they should. Everywhere you encounter a line like that:
Font "xft:Tahoma:pixelsize=13", you should change it to something like
Font "xft:Tahoma:encoding=iso10646-1:pixelsize=13" and save the file. I created a patch to FVWM-Crystal which does this automatically. You can take a look at this article for more details: FVWM-Crystal and UTF-8.
Changes in FVWM-Crystal 3.0.4
The review covers the latest version of Crystal, 3.0.4. There has been a few changes in this release compared to 3.0.3. The main differences are:
- Crystal configuration has moved from ~/.fvwm to ~/.fvwm-crystal,
- Additional package has been added for minimal installs: fvwm-crystal-minimal. It includes just a few recipes, window decorations, etc.
- New recipes “MicroClear”, based on “Clear”, “Light” and “SideLine”
- Crystal now recognizes UTF-8 environment and properly sets fonts in the menus (for window decorations you still need to patch it yourself)
- Hungarian translation
You can also read the NEWS file to get more information.
FVWM-Crystal is a great desktop solution suitable both for users of older computers and those who just prefer speed and clean looks over “bloat” and graphical wizards. Crystal is also a good choice for those who like to adjust every possible part of the desktop to their needs and are not afraid of touching configuration files. FVWM-Crystal is efficient and very elegant. It sure has it’s drawbacks (like the troublesome UTF-8 support) but it’s still worth trying if you are bored with Fluxbox or XFCE. The more desktops, the more options we have – and we should be happy we have the choice, after all.
- FVWM-Crystal: transparent desktop for your Linux box – project’s home page
- FVWM-Crystal screenshots: on project’s website and on Softpedia
- Blog of Maciej Delmanowski, FVWM-Crystal creator
- FVWM-Crystal sur une Ubuntu Dapper Drake [in French]
- FVWM Crystal and UTF-8 – a patch to enable Unicode in Crystal
Subscribe to RSS feed for this article!
Sorry, the comment form is closed at this time.