xfm 1.3

xfm converted this file manager skeptic. After reading this review, you too may be swayed.
Configuring the File Manager

Many of the double-click/drag—drop operations are pre-configured in xfmrc based on the following format:

file_name:icon:push-action:drop-action

Xfm recognizes file names three ways: by the file name itself (e.g., core or Makefile), by its extension (*.c means c source files), or by its prefix (README*). The most common pattern used for the file_name is *.suffix, which, to have it recognize C files, is *.c, with the * permitting any file name ending in .c to be recognized. The push-action (activated by double clicking the icon) is what you most likely will change in the xfmrc file. For example, I changed the push-action on *.gif files to xv rather than xpaint. I also added:

*.au:xfm_au.xpm:cat $* >/dev/audio:
*.dat:xfm_data.xpm::

The first plays au files (audio files) when they are double clicked (read the Sound HOWTO, if you haven't configured sound), while the second merely associates the xfm_data icon to data files that I have created for executable programs.

Drop actions are those that occur when a file is dragged onto the icon. I don't have any drop actions defined for my File Manager window.

Configuring the Applications Manager

The programs and icons that constitute the Applications manager are dictated by the xfm-apps file. The entries in that file have a somewhat different form:

name:directory:filename:icon:push-action:drop-action

name is the title that appears in the Applications window, icon is the name of the icon to use, push-action is what to do when the icon is double-clicked, and drop is what happens when a file is dropped on the icon. A simple example is

PSPrinter:::printer.xpm::exec lpr $*

Double clicking this printer icon does nothing, while dropping a PostScript file on it from the file manager window results in the file being printed. The remaining entries in this file look like:

Xterm:::xterm.xpm:exec color_xterm -sl 600 -sb -fn
*     7x14 -j -ls -e tcsh:$*
Xclipboard:::clipboard.xbm:exec xclipboard:
Scilab:::math4.xpm:exec scilab:
Graphics::.xfm/xfm-graphics:xfm_appmgr.xpm:LOAD:
System::.xfm/xfm-system:xfm_apps.xpm:LOAD:
Calendar:::calendar.xpm:exec xcalendar:
CD:/cdrom::cdrom.xpm:OPEN: (*This line should not be broken)

Toolbox, Graphics and System are icons that change the Applications window to another containing a different set of application icons. For example, I made a simple graphics tool box with the following entry in xfm-apps:

Graphics::.xfm/xfm-graphics:xfm_apps.xpm:LOAD:

The LOAD command loads the .xfm/xfm-graphics file below:

Apps::.xfm/xfm-apps:xfm_apps.xpm:LOAD:
XFig:::draw.xpm:exec xfig: exec xfig -P -e ps -startf 16 $*
XPaint:::xpaint.xpm:exec xpaint:exec xpaint $*
XV:::xv.xpm:exec xv:exec xv $*
mpeg:::movie.xpm::exec mpeg_play -loop $*

The Apps line gets me back to the previous window: xfm-apps.

In the other applications file, System, I have in .xfm/system

Apps::.xfm/xfm-apps:xfm_apps.xpm:LOAD:
Xsysinfo::::xsysinfo:
TOP::::exec xterm -e top:
who:::view.xpm:exec who|xless:
lpq::::exec lpq |xless:

By piping the last two commands to xless, an xwindow is created that displays the results of the Unix commands.

Dialog boxes allow the input of command line parameters, such as:

LaTeX::::(latex %Latex_file\:%;beep):(latex $*;beep)
grep:::grep.xpm::grep '%Regular expression\:%' $*

The percent signs delimit the comment for the dialog box (with the \ escaping the :). The beep is to tell me when the operation is done; it is defined as echo -n '^G'.

Changing the Defaults

If you prefer a different default editor than emacs, then you need to add an entry to the .Xdefaults file in your root directory. The xfm man page lists resources that you can change. I changed two by adding Xfm*defaultEditor: textedit and Xfm*updateInterval: 3000. (Be sure to run xrdb .Xdefaults to get the changes implemented if you want them before you next start X.) The update interval change was to refresh the directories more often than the default 10000 milliseconds. You can also change the default directory paths to the pixmap files; this may be important if your pixmaps are not in the default location (add Xfm*pixmapPath: your_path Alternatively, to make changes for all users, root can change options in the Xfm file in /usr/X386/lib/X11/app-defaults.

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix