A New Motif-based Revision of the Xfm File-Manager

by Larry Ayers <layers@vax2.rain.gen.mo.us>
Copyright (c) 1996
Published in Issue #7 of the Linux Gazette


Included with many Linux distributions is the Xfm file-manager, developed by Simon Marlow and Albert Graef. I used and appreciated this program when I first installed Linux, but when I upgraded the xpm libraries (which was necessary to allow many newer programs to function) xfm lost the ability to read icons, and I never could get it to work right. So I began trying out other x-window file-managers; one day a link on the WWW led me to Oliver Mai's home-page. His Motif-based revision of xfm sounded great, with many new features. I immediately downloaded the source package from ftp.x.org, only to find out that the Motif libraries are needed for successful compilation.

Back at Mai's home-page, I noticed that a statically-linked Linux binary was available for download as a uuencoded ascii file directly from the website. It didn't take long to download, and the installation was simply: make install and make install.man.

Since I began to use it the program has become indispensable to me.


Moxfm expands upon the extensive feature set familiar to users of xfm. Oliver Mai has added seamless mounting of cdrom and floppy drives: click on /cdrom and the cdrom drive is mounted and its directory displayed. When you move on to another drive the cdrom is unmounted. This feature will conflict with the default setup of a Slackware installation in which the cd drive is mounted during bootup. A workaround for this is simply editing out the statement:
"if [ -r /etc/rc.d/rc.cdrom ]; then 
 . /etc/rc.d/rc.cdrom 
 fi " 
from the /etc/rc.d/rc.M file.

One of the menu-bar commands which I use all the time is "start xterm" which opens an xterm in whichever directory is currently displayed. Let's say you've just downloaded source-code for something new. In the application window you bring up the Toolbox page, drag the *.tgz file over to the Untgz icon, and open up the newly created directory in the adjacent directory window. After reading the README and INSTALL files, you can bring up an xterm in the current directory and compile the source.

The optional separate application window holds several pages of categorized icons, which are easily editable and can represent applications, files, drives, etc.

Additional directory windows can be opened and drag and drop is well-supported; a limitation of the current beta (0.98) prevents you from moving files between partitions, but the soon-to-arrive version 1 is supposed to support this.

In the best unix tradition all configuration is done with ascii text files. During installation a directory named ".xfm" is created under /etc/X11; this subdirectory contains several "dot-files" which allow extensive customization. One essential file is moxfmdev, which tells moxfm which directories you'd like your floppy and cdrom drives to be mounted upon.

Like fvwm, moxfm can look like an entirely different program at the end of a customization process.

Configuration file entries for the application-window icons can be easily edited by means of a right-mouse-button menu selection; after changing a setting, (perhaps the setting for the icon to be displayed), you can preview the changes and choose whether or not to save them.

In the forthcoming version 1.00, any application, drive, or device icon can be displayed directly on the desktop. The settings for these icons will be directly editable in the same way, and their positioning is variable as well.

Click here to see a screenshot of Moxfm:

Moxfm Desktop

Bugs and Drawbacks

Sound too good to be true? You end up paying for these features with an increased load on your system. Moxfm seems to consistently use 12-14% of total memory and the cpu usage varies from 7% to around 15%.

Startup time is a consideration; on my 80 mhz. 486 with 16 mb. of memory Moxfm takes around five seconds to appear.

Occasionally while trying to read a large directory (like /usr/bin) the program will appear to hang, but if you give it a moment it'll recover. (I usually switch to another desktop so screen-redraw won't be a factor)

Moxfm seems to have trouble with directories like /proc and /dev, which don't contain the usual sort of files. Killing and restarting is the quickest way to deal with situations like these.

I assume some of these glitches will be cured in the next release, but don't let them stop you from trying it out! It's worth the occasional problem.

Personally I like to have a good console-mode file-manager available as well; when working at a text-mode console the Midnight Commander is hard to beat.


If you are fortunate enough to have the Motif libraries on your system you can download the pre-release version 1.00 source-code for Moxfm from Oliver Mai's home-page: Moxfm Website

For those without Motif the statically-linked binary (beta 0.98) is also there. The source code for version 0.98 is also at ftp.x.org/contrib/applications.

By the time you read this version 1 should have been released and hopefully Oliver Mai will have uploaded it to the big ftp sites.

Mr. Mai states that he will make available a statically-linked binary of version 1 soon after the release of the code.

Incidentally, I should mention that Moxfm is GNU software.


Since writing the above I've had the opportunity to try out a preliminary version of moxfm version 1.00, and can report that many of the above drawbacks have been addressed; the speed and stability have improved, and several nifty new features have been added. In addition to the above-mentioned desktop icons, moving files and directories from one drive or partition to another is now supported.

Back up to the Linux Gazette!