Difference between revisions of "FVWM"

From ArchWiki
Jump to: navigation, search
(Updated, edited, and rearranged material to make the organization more logical)
m (Bringing Out its Power: Use pkg template.)
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Stacking WMs (English)]] {{i18n|FVWM}} FVWM is a stable, powerful, efficient, and ICCCM-compliant multiple virtual desktop window manager for the X Window system. It requires some effort to learn to use it well, since it is almost entirely configured by editing configuration files with a text editor, but those who persist end up with a desktop environment that works exactly the way they want it to work. Development is active, and support is excellent.
+
[[Category:Stacking WMs]] [[it:FVWM]]
 +
[[ru:FVWM]]
 +
[[zh-CN:FVWM]]
 +
FVWM is a stable, powerful, efficient, and ICCCM-compliant multiple virtual desktop window manager for the X Window system. It requires some effort to learn to use it well, since it is almost entirely configured by editing configuration files with a text editor, but those who persist end up with a desktop environment that works exactly the way they want it to work. Development is active, and support is excellent. And for those who wonder, FVWM means Feeble Virtual Window Manager.
  
One should not confuse the fvwm window manager with the project FVWM-Crystal, which can be also found in the Arch repositories. And for those who wonder, FVWM means Feeble Virtual Window Manager.
+
==Installing FVWM==
  
This wiki is by no means complete, but with user participation it can help show the potential of FVWM. The discussion in Arch Forums is [http://bbs.archlinux.org/viewtopic.php?id=82758 here].
+
[[pacman|Install]] the package {{Pkg|fvwm}} which is available in the [[Official Repositories|official repositories]].
  
==Installing FVWM==
+
You can also install {{AUR|fvwm-patched}} from the [[Arch User Repository|AUR]], or if you have archlinuxfr (see [[Unofficial user repositories]]) added to your {{ic|/etc/pacman.conf}} it can be installed with [[pacman]] like a regular package.
  
Install fvwm with the following command: # pacman -S fvwm You can also install the patched version [http://aur.archlinux.org/packages.php?ID=7195 fvwm-patched] (presently out of date) from the [[AUR]], or if you have archlinuxfr (see [[Unofficial user repositories]]) added to your pacman.conf it can be installed so: # pacman -S fvwm-patched
+
==Starting FVWM==
  
==Starting FVWM==
+
FVWM will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add  
fvwm will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add  
+
 
  exec fvwm2  
 
  exec fvwm2  
 
or  
 
or  
 
  exec fvwm
 
  exec fvwm
to your user's .xinitrc.
+
to your user's {{Ic|.xinitrc}}.
  
A sample .xinitrc might be as follows:
+
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.
  
DEFAULT_SESSION=fvwm
+
==Bringing Out its Power==
+
case $1 in
+
fvwm*)
+
        exec ck-launch-session fvwm
+
        ;;
+
awesome)
+
        exec ck-launch-session awesome
+
        ;;
+
*)
+
        exec ck-launch-session $DEFAULT_SESSION
+
        ;;
+
esac
+
  
[[SLiM]] is very good login manager, that does not have many dependencies and acts well with FVWM. SLiM can also be used with multiple environments as well so it makes it very appealing if one need several environments, but want to have a real control of the process.
+
When you start FVWM for the first time, you will get something that looks very blank. When you left-click on the desktop, you will be able to select a very basic configuration for FVWM. Chose the modules you want and you are ready to get started. You will undoubtedly want to do more to create your desktop, so here are some tips:
  
==Make your FVWM better==
+
*Although it is outdated, the Zensites FVWM beginners guide[http://zensites.net/fvwm/guide/] helps to understand how FVWM functions and how to build '''your''' basic setup.
When you start fvwm, you will get into the blank configuration. However, when you left-click on the desktop, you will be able to select to configure FVWM. Chose the modules you want and you are ready to get started.
+
  
===General Guides===
+
*The Gentoo Linux Wiki has a useful guide on configuration.[http://en.gentoo-wiki.com/wiki/FVWM/Configuration]
Since fvwm comes pretty blank in the beginning, you need to create your desktop from scratch... or almost. So here are some tips:
+
  
*Although it is outdated, the [http://zensites.net/fvwm/guide/ FVWM beginners guide] helps to understand how FVWM functions and how to build '''your''' basic setup.
+
*The FVWM homepage[http://fvwm.org/] includes documentation[http://fvwm.org/documentation/], a FAQ [http://fvwm.org/documentation/faq/], and links to a Wiki[http://fvwmwiki.xteddy.org/]) and the FVWM forums[http://www.fvwmforums.org].
  
*You should also check the [http://fvwm.org/ FVWM homepage] (which includes a [http://fvwm.org/documentation/faq/ FAQ] and a [http://fvwmwiki.xteddy.org/ Wiki]), and the [http://www.fvwmforums.org FVWM forums].
+
*The best way to come up with the desktop you want is probably to check out the configurations in the FVWM forum[http://www.fvwmforums.org/phpBB3/viewforum.php?f=39&sid=468469f95f9a2a90cd9d5a0819d26eec] or at Box-Look.org,[http://www.box-look.org] choose one you like, install it, and modify it to taste.
  
*Check out the configs at http://www.box-look.org.
+
*As you work with what other people have done, you may find it helpful to look at the tips on configuration files by Thomas Adam, the most active FVWM developer.[http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505]
  
*Useful applications are similar to those suggested for [[Openbox]] or [[Fluxbox]].
+
*A page[http://web.archive.org/web/20070912061152/abdn.ac.uk/~u15dm4/fvwm/] in the [http://archive.org/ Internet Archive] is outdated, but seems to be the only significant online documentation for fvwm-patched.
  
===Thomas Adam tips for FVWM2===
+
*FVWM-Crystal, which is also in the Arch repositories as package {{Pkg|fvwm-crystal}}, is an add-on that makes FVWM much easier to configure, although the easier configuration allows much less flexibility than direct editing of configuration files.
Here are some [http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505 tips by Thomas Adam], the most active FVWM developer:
+
  
I am not too good at these things, so bear with me. I've been seeing more and more configs (both in terms of answering questions on these forums, and via IRC, with ad-hoc email, etc.) that seem to be redefining existing functionality for no good reason other than (I assume) ignorance.
+
*[[XdgMenu]] is a useful utility for generating menus.
  
So here's a few things to bear in mind (in no particular order):
+
*Fvwm plays well with [[xcompmgr]] for simple compositing effects.
  
====1. SetEnv.====
+
*Useful applications are similar to those suggested for [[Openbox]] or [[Fluxbox]].
 
+
Ah yes. SetEnv. I would never had imagined how such an insignificant command would annoy me so much, especially through its apparent mis-use. It seems more and more people are defining things like this:
+
 
+
SetEnv fvwm_home $[HOME]/.fvwm
+
 
+
Which is innocent enough, and indeed works. Except for the fact that it's completely unnecessary. FVWM defines for you (which you yourself can change) the environment variable FVWM_USERDIR which by default will point to ~/.fvwm -- so why in hell people seem to think setting "fvwm_home" is doing themselves any good is beyond me.
+
 
+
Now consider for the moment the implications of doing so. By and large it's fine, because you presumably wrote the configuration, right? Well, yes, but what happens when you decide to share your all singing all dancing, brand-new complex function you spent the past two days trying to write? What if it contains a reference to "fvwm_home"? The person deciding to try that function is going to come unstuck because he or she may not have "fvwm_home" defined. You should always rely on using "FVWM_USERDIR" where you need to reference a likely and pre-defined location for personal configuration files.
+
 
+
If you're one of these people whom uses a split configuration file via a series of Read commands, and hence had relied on something like:
+
 
+
Read $[fvwm_home]$[some_other_location]/file1
+
 
+
Read understands (and expands) the variable "$." relative to a path -- so you can use that as well to further increase neutrality.
+
 
+
Not to mention that it leaves endless environment variables defined which might only ever get used once.
+
 
+
====2. InitFunction versus StartFunction versus RestartFunction====
+
 
+
This is really only of importance to the small minority of people running FVWM 2.4. For the rest of you running 2.6 then you need to be made aware of the following:
+
 
+
You do not need to use InitFunction
+
 
+
Gasp! It's true. In FVWM 2.4.X, you do need to use it because the Test command does not include tests for Init, Reboot, etc. However for FVWM 2.5.X, forget InitFunction, and incorporate it into your StartFunction. Here's an example:
+
 
+
DestroyFunc InitFunction
+
AddToFunc  InitFunction
+
+ I Exec exec xsetroot -solid pink
+
+ I Exec exec xconsole
+
 
+
DestroyFunc  StartFunction
+
AddToFunc    StartFunction
+
+ I Module FvwmProxy
+
+ I Module FvwmButtons myBar
+
 
+
Put the two together, and from within your StartFunction you can define what's in InitFunction via the use of the following:
+
 
+
+ I Test (Init) ...
+
 
+
Hence:
+
 
+
DestroyFunc  StartFunction
+
AddToFunc    StartFunction
+
+ I Module FvwmProxy
+
+ I Module FvwmButtons myBar
+
+ I Test (Init) Exec exec xsetroot -solid pink
+
+ I Test (Init) Exec exec xconsole
+
 
+
And that's it. There you have it. You now have a StartFuction which FVWM reads at Init, Reboot and Exit. The same logic applies for RestartFunction:
+
 
+
You do not need to use RestartFunction
+
 
+
What is even more perplexing about this is I have seen a lot of configs which define the following:
+
 
+
DestroyFunc  StartFunction
+
AddToFunc    StartFunction
+
+ I Exec exec xterm -T Wooo -ls
+
 
+
DestroyFunc  RestartFunction
+
AddToFunc    RestartFunction
+
+ I Exec exec xterm -T Woo -ls
+
 
+
Now, guess what this does. That's right, when you reboot FVWM you get two copies of the same xterm running. That's because, again, StartFunction is read by FVWM at initialisation and reboots. FVWM hence re-reads RestartFunction and StartFunction and does the same thing twice. How do you get around this. Easy: remove the definition for RestartFunction entirely. If that application is only intended to be started during a restart (slightly odd scenario) then use:
+
 
+
DestroyFunc  StartFunction
+
AddToFunc    StartFunction
+
+ I Test (Restart) Exec exec xterm -T Woo -ls
+
 
+
====3. Exec exec and the dreaded FvwmCommand versus PipeRead.====
+
 
+
This one baffles me profoundly. The classic observation of this is with some of the many different incantations of Thumbnail functions that exist. Here's a snippet:
+
 
+
DestroyFunc Thumbnail
+
AddToFunc  Thumbnail
+
+ I Exec nice 19...; some_other_shell_commands; FvwmCommand 'WindowStyle foo, bar'
+
 
+
ARGH! What the hell is that all about? For the love of God, learn how to use PipeRead. Please? It's not that hard. Consider what's happening with the above. Exec forces a shell, some idiotic processing goes on (probably running convert a few times) and then FvwmCommand forces FVWM to be told instructions via FIFO. How dull, when all this time PipeRead would have saved you all of the superluousness of it all.
+
 
+
PipeRead forces a shell, but more importantly one is then able to "echo" commands back to FVWM. Not only does this synchronise things (especially if the PipeRead command exists within a function) but it means you do not have to worry about sending commands back indirectly via FvwmCommand. FvwmCommand is only useful if you're calling some external script that doesn't rely on directly ending with FVWM (or where you do not want it to block with PipeRead).
+
 
+
If you ever find yourself writing:
+
 
+
+ I Exec ...; FvwmCommand '....'
+
 
+
You want PipeRead.
+
 
+
====4. I'm too good to use ImagePath.====
+
 
+
This one always makes me laugh, and it comes back to point 1, with SetEnv. Again, most people delight in doing something like this:
+
 
+
SetEnv fvwm_home $[HOME]/.fvwm
+
SetEnv fvwm_images $[HOME]/.images
+
SetEnv fvwm_icons $[fvwm_home]/.icons
+
 
+
Style some_app Icon $[fvwm_icons]/icon.png
+
 
+
When actually all you need to do is this:
+
 
+
# Remove all those damn SetEnv commands
+
ImagePath $[FVWM_USERDIR]/.icons:+
+
 
+
Then you can do stuff like this:
+
 
+
Style some_app Icon icon.png
+
 
+
 
+
And FVWM will know where to look by traversing the directories listed in the ImagePath.
+
 
+
If I think of any more, I'll let you know.
+
 
+
==External Links==
+
  
Links used in this tutorial:
+
== References ==
  
* [http://fvwm.org/ FVWM homepage]
+
# Zensites [http://zensites.net/fvwm/guide/ FVWM beginners guide].
* [http://fvwm.org/documentation/manpages/unstable/ FVWM man pages]
+
# Gentoo Wiki [http://en.gentoo-wiki.com/wiki/FVWM/Configuration configuration guide].
* [http://fvwm.org/documentation/faq/ FVWM FAQ]
+
# [http://fvwm.org/ FVWM Homepage].
* [http://fvwmwiki.xteddy.org/ FVWM Wiki]
+
# FVWM Homepage [http://fvwm.org/documentation/ documentation].
* [http://www.fvwmforums.org FVWM Forums]
+
# FVWM Homepage [http://fvwm.org/documentation/faq/ FAQ].
* [http://www.zensites.net/fvwm/guide/ FVWM beginners guide]
+
# [http://fvwmwiki.xteddy.org/ FVWM Wiki].
* [http://www.box-look.org/ Box-Look]
+
# [http://www.fvwmforums.org FVWM Forums].
 +
# [http://www.fvwmforums.org/phpBB3/viewforum.php?f=39&sid=468469f95f9a2a90cd9d5a0819d26eec Configurations] in the FVWM forum.
 +
# [http://www.box-look.org/ Box-Look].
 +
# Thomas Adam on [http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505 common mistakes in configuration files].
 +
# [http://web.archive.org/web/20070912061152/abdn.ac.uk/~u15dm4/fvwm/ Fvwm Patches] in the [http://archive.org/ Internet Archive].

Revision as of 05:13, 6 December 2012

FVWM is a stable, powerful, efficient, and ICCCM-compliant multiple virtual desktop window manager for the X Window system. It requires some effort to learn to use it well, since it is almost entirely configured by editing configuration files with a text editor, but those who persist end up with a desktop environment that works exactly the way they want it to work. Development is active, and support is excellent. And for those who wonder, FVWM means Feeble Virtual Window Manager.

Installing FVWM

Install the package fvwm which is available in the official repositories.

You can also install fvwm-patchedAUR from the AUR, or if you have archlinuxfr (see Unofficial user repositories) added to your /etc/pacman.conf it can be installed with pacman like a regular package.

Starting FVWM

FVWM will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add

exec fvwm2 

or

exec fvwm

to your user's .xinitrc.

See xinitrc for details, such as preserving the logind (and/or consolekit) session.

Bringing Out its Power

When you start FVWM for the first time, you will get something that looks very blank. When you left-click on the desktop, you will be able to select a very basic configuration for FVWM. Chose the modules you want and you are ready to get started. You will undoubtedly want to do more to create your desktop, so here are some tips:

  • Although it is outdated, the Zensites FVWM beginners guide[1] helps to understand how FVWM functions and how to build your basic setup.
  • The Gentoo Linux Wiki has a useful guide on configuration.[2]
  • The FVWM homepage[3] includes documentation[4], a FAQ [5], and links to a Wiki[6]) and the FVWM forums[7].
  • The best way to come up with the desktop you want is probably to check out the configurations in the FVWM forum[8] or at Box-Look.org,[9] choose one you like, install it, and modify it to taste.
  • As you work with what other people have done, you may find it helpful to look at the tips on configuration files by Thomas Adam, the most active FVWM developer.[10]
  • A page[11] in the Internet Archive is outdated, but seems to be the only significant online documentation for fvwm-patched.
  • FVWM-Crystal, which is also in the Arch repositories as package fvwm-crystal, is an add-on that makes FVWM much easier to configure, although the easier configuration allows much less flexibility than direct editing of configuration files.
  • XdgMenu is a useful utility for generating menus.
  • Fvwm plays well with xcompmgr for simple compositing effects.
  • Useful applications are similar to those suggested for Openbox or Fluxbox.

References

  1. Zensites FVWM beginners guide.
  2. Gentoo Wiki configuration guide.
  3. FVWM Homepage.
  4. FVWM Homepage documentation.
  5. FVWM Homepage FAQ.
  6. FVWM Wiki.
  7. FVWM Forums.
  8. Configurations in the FVWM forum.
  9. Box-Look.
  10. Thomas Adam on common mistakes in configuration files.
  11. Fvwm Patches in the Internet Archive.