The Fvwm/Perl 5 Module Interface

Jump to:
System Requirements
Getting the Software
Sample Applications
Manual Page

What is it?

X11::Fvwm is an extension for Perl 5 providing access to the module API of Fvwm2. This extension requires Perl 5.002 or later, and Fvwm 2.0.45 or later to run. It is also strongly suggested that the Tk extension (version 400.202 or later) also be installed.

System requirements

Obtaining X11::Fvwm

All versions, alpha and beta releases as well as (hopefully) stable releases will be handled through CPAN, the Comprehensive Perl Archive Network. The current release version is 0.4, beta 2. You may get it from:

CPAN Server at the Perl Institute: X11-Fvwm-0.4.tar.gz
Through the CPAN Multiplexer at Perl.COM: X11-Fvwm-0.4.tar.gz

The second beta looks very stable. It includes some patches that were rolled in to Fvwm version 2.0.46. A new release of Fvwm will come out soon that is better suited to operating with post-45 versions of Fvwm 2.X.

Things currently already ready-to-go in 0.4 include tentative support for the X11::Xforms GUI package, at least one more sample script and better manual pages, especially for, which didn't actually have a page in 0.2.

Installing the Package

X11::Fvwm uses perl's own MakeMaker facility to build and install. Actual steps taken by the user should be minimal:

	zcat X11-Fvwm-X.Y.tar.gz | tar xvf -
	cd X11::Fvwm
	perl Makefile.PL
	make test
	(assuming all tests pass)
	make install   # may require super-user permissions

One thing you will have to know ahead of time is the path to your Fvwm sources. The compiled portion of X11::Fvwm uses the files fvwm.h and module.h from the fvwm/ directory in the distribution. This path defaults to /usr/local/src/fvwm, but can be altered either by editing Makefile.PL or by invoking make as:

	make FVWMSRCDIR=/new/path

Note that this is not the path all the way to the header files. The C code expects to find a subdirectory called fvwm under the above path.


Several examples are distributed with this package. All reside in the scripts directory. Some are merely illustrative, but others are meant to be useful applications on their own. Some of these samples are described here:


The PerlTkWL sample application is a replacement for the FvwmWinList module. Written in Perl with the Tk extension (version 400.202, based on Tk 4.2), this application is currently 1400 lines of code, including comments and whitespace (the FvwmWinList module has 1804 in C modules and header files) The sample image you see here uses the following configuration lines in the .fvwm2rc file:

*PerlTkWLFont                   6x10
*PerlTkWLForeground             gray30
*PerlTkWLBackground             AntiqueWhite
*PerlTkWLActiveForeground       AntiqueWhite
*PerlTkWLActiveBackground       gray30
*PerlTkWLFocusForeground        Gold1
*PerlTkWLFocusBackground        NavyBlue
*PerlTkWLIconForeground         black
*PerlTkWLIconBackground         #e2beaf
*PerlTkWLAction                 Click1 Focus,Iconify -1,Focus
*PerlTkWLAction                 Click2 Iconify 1
*PerlTkWLAction                 Click3 Module "FvwmIdent" FvwmIdent
*PerlTkWLStyle                  graphic
*PerlTkWLSortStyle              alpha,iconlast
*PerlTkWLUseMiniIcons           yes
*PerlTkWLMiniIcon               tkInfo jbook1.xpm,TkMan mini.xman.xpm
*PerlTkWLMiniIcon               Netscape mini.netscape.xpm,lrom mini.lrom.xpm
*PerlTkWLMiniIcon               xmag jmag.xpm,xpaint jpaint.xpm
*PerlTkWLMiniIcon               TkMail jmail.xpm,elm jmail.xpm
*PerlTkWLMiniIcon               FvwmPager mini.fvwm.xpm,xload jgraph.xpm
*PerlTkWLMiniIcon               XTerm mini.xterm.xpm,wabi win.xpm
*PerlTkWLMiniIcon               hpcalc jcalc.xpm,Canvas jpaint.xpm
*PerlTkWLMiniIcon               ptkmines mine.xpm

You can view the source for the utility here, or the manual page explaining the configuration options here. This is in the distribution scripts directory under the name PerlTkWL.


The TkPerlConsole sample application combines the functionality of the FvwmConsole and FvwmDebug modules from the "extras" directory of Fvwm2. The sample image you see here includes the debug tracer windows. To see the console only, click here.

The TkPerlConsole app is 563 lines of code (which includes the manual page in-lined using Perl's POD format), compared to approximately 1070 lines in the combined C module and headers files from both FvwmConsole and FvwmDebug.

Click here to view the source code. Click here to view the man page.

Manual Page

The manual page is it's own page: CLICK HERE to view it.

Last modified: Thu Mar 20 11:30:44 PST 1997