xfm(1)

xfm1

X file and applications manager

Usage

xfm [options ...]

Overview

Xfm is a file and applications manager program for the X window system. It provides virtually all of the features that you would expect in a file manager - move around your directory tree in multiple windows, move, copy or delete files, and launch programs with simple mouse operations. Directory displays are updated automatically in regular intervals when the contents of the directory changes. The integrated application manager provides a kind of ``shelf'' onto which you can place your favorite applications, as well as the files and directories you are currently working with. It also allows you to access different groups of applications and files. User-definable file types let you specify a command to be executed when double-clicking on a file or dropping other files onto it. Last not least, xfm can automatically mount and unmount special devices like floppies as you open and close the corresponding directories (mount points).

Options

Xfm accepts all the usual toolkit options. Furthermore, the following options let you print xfm's version number and control which windows should be displayed at startup.

-version

Print the version number and exit.

-appmgr

Only display the application manager window.

-filemgr

Only display the file manager window.

If both -appmgr and -filemgr are specified, then the applications and one file manager window will be displayed, which is also the default. If only -filemgr is specified, the application manager will not be available in this session.

Usage

Most of it should be fairly obvious. There is one application window and zero or more file windows in which directories (also termed folders) are displayed. In order to perform an action, you either select items and then invoke a menu operation, or you drag items from a file window to a second (maybe the same) file window or the application window. You can also double-click on an item to start a corresponding action (like launching an application, editing a file, or changing directories), and press the right menu button on an item to bring up a menu containing operations for a single file or application. Pressing the right button on the background of the application window displays the application menu. File operations are accessed from the file window menu bar as usual.

The left-hand mouse button selects an item (and deselects all others in the same window). The second button toggles the selected state of an item.

A string containing the paths of the selected file items can be requested by other applications using the standard selection mechanism (PRIMARY selection). To provide visual feedback, the file window that owns the selection paints its status line using a special highlight color. You can then paste the list of selected files in some other window such as an xterm.

You can drag with the left-hand button to another window (or another icon, in general a valid destination will be highlighted with a border when the cursor is over it) to move files from one directory to another. The second button used in the same way will copy files. You can also drag around items in the application window; again, the left mouse button moves, and the second button copies the selected items to a new position. Applications can be launched by dropping files on them; and installing files and programs in the application manager can be done by dropping files on the background of the application window. Finally, new file windows can be opened by simply dragging a directory icon to the root window.

The action taken when double-clicking on a file depends on the type of the file. If it is a directory, it is displayed in the file window. If it is an executable, the program is started. Other files are opened in the default editor (specified by the editor resource), unless another action is given in the xfm_mailcap file (see CONFIGURATION below).

The output of child processes invoked by xfm is captured in a special log window. This window provides buttons for clearing the window contents and for hiding the window. You can also specify whether you want the window to pop up automagically when new output is available (Auto Popup option, enabled by default), and explicitly show the window using the Show log option of the View menu.

Directories can be displayed in three different forms: tree (display subdirectories in tree-like form), icon (display directories and files as icons) and text (similar to ls -l). These options are selected from the View menu. In the tree form, clicking on the arrows takes you up or down one level.

Directory displays are updated automatically in regular intervals when the contents of the directory changes. You can also explicitly request a folder update by double-clicking on the directory name field of the corresponding file window.

A menu of recently visited directories can be popped up by pressing the right mouse button on the directory name field of the file window.

Resources

Various aspects of xfm can be configured by changing corresponding resource settings in the application defaults file. Some important resources are listed below:

highlightColor

The color used for highlighting selected items, as well as the status line of the file window which owns the primary selection (if any).

bitmapPath
pixmapPath

The path on which to search for bitmap and pixmap icons, respectively.

iconPath

The path to look for pixmap icons for the file types.

applicationDataFile
devFile
magicFile

The names of the application and configuration files used by xfm (see CONFIGURATION). Normally, these files will be located in ~/.xfm.

systemwideApplicationDataFile
systemwideDevFile
systemwideMagicFile

These files are used, if the corresponding described before are not found. This allows changeable system wide defaults while users are still able to overwrite them.

applicationDataDir

The directory in which the application files for new application groups are located (see the Install group option of the application menu), usually ~/.xfm. Application groups changed are also copied here, when the original file cannot be written to.

If it does not exists, it will be generated when needed.

applicationDataClip

The ``clip'' file used in Cut/Copy/Paste operations in the application window, usually ~/.xfm/.XfmClip.

If it begins with applicationDataDir, this will be generated when xfm starts.

doubleClickTime

Set the time interval in milliseconds for which a sequence of two mouse clicks should be interpreted as a double click. Default: 300.

updateInterval

Set the time interval in milliseconds in which to perform automatic folder updates. Default: 10000.

confirmXXX

Resources to request confirmation for various operations. XXX can be any one of Deletes, DeleteFolder, Copies, Moves, Overwrite and Quit. By default these are all enabled.

editor

The command and leadings arguments with which xfm invokes your favorite editor.

viewer

The command and leading arguments with which xfm invokes your favorite viewer.

xTerminal

The command and leading arguments with which xfm starts a command within and xterm. (e.g. xterm -e)

xTerminalAlone

The command with which xfm runs an X terminal emulator. (e.g. xterm)

shell

Specifies the shell to use for running commands. (If not set, $SHELL is used instead. If that also does not exists /bin/sh is used.)

There are way too many available resources to list them all in this manual page, so please take a look at the application defaults file for more information.

Configuration

Besides the application resources, xfm can be configured by means of four different files, which are usually named xfm_dev, xfm_magic, xfm_mime.types and xfm_mailcap, and are by default searched for in the ~/.xfm directory or in /etc/X11/xfm. Moreover, there is a number of so-called application files, from which xfm determines the contents of the application window, like the Apps file which usually describes the contents of the main application group. All these files are plain ASCII files which can be edited using any text editor. (Note that application files are also written by xfm itself whenever the contents of the application window changes.) Any line in these files which starts with a hash sign (#) is interpreted as a comment; empty lines are ignored.

Magic headers

xfm can determine file types using the magic numbers contained in the files.

The magic numbers are described in a configuration file whose path is obtained from the magicFile or systemwideMagicFile resource, by default ~/.xfm/xfm_magic respectively /etc/X11/xfm/xfm_magic. The format of the file is the same as that of the magic(5) file, with some extensions described in xfm_magic(1). The program xfmtype(5) can be used to test this.

Suffix types

If no file type could be obtained using the magic values, xfm falls back to determine the type of a file by its suffix. The rules it used are described in a configuration file whose path is obtained from the mimeTypesFile or systemwideMimeTypesFile resource, by default ~/.xfm/xfm_mime.types respectively /etc/X11/xfm/xfm_mime.types. The format of the file is described in the xfm_mime.types(5) man page.

Opening files

xfm determines how to open files consulting the file whose path is obtained from the mailcapFile or systemwideMailcapFile resource, by default ~/.xfm/xfm_mailcap respectively /etc/X11/xfm/xfm_mailcap. The format of the file is described in the xfm_mailcap(5) man page.

Device configuration

The device configuration file, xfm_dev, lets you specify which mount points xfm should keep track of, and which actions to perform in order to mount and unmount the corresponding file systems. This allows you to access file systems on special devices such as floppies, CD-Roms, etc. in a transparent way. See xfm_dev(5) for the format of this file.

Application files

Application files are used to specify the contents of the application window. Normally, these files are not altered with a text editor, but are updated by xfm whenever the contents of the application window changes. An understanding of the application data is necessary, however, if you want to edit an existing or create a new entry using the Install, Install group and Edit options of the application menu. The format of those files is described in the xfm(5) man page.

Xfm provides a number of operations which let you manipulate application groups in a convenient manner. The items in the application window can be moved and copied using drag and drop as usual. The Cut, Copy and Paste options of the application menu provide a means to move and copy application items between different application files. Moreover, xfm keeps a stack of application files loaded from a file or the application window via a LOAD action. The Back button at the bottom of the application window lets you return to the previous group of applications, and the Main button reloads your startup application file (and empties the stack). Finally, the Install group option of the application menu allows you to create entries for new application groups easily. You only have to specify the name of the group, the name of the corresponding application file, and the name of the icon file. The remaining fields of the entry are filled in by xfm automatically.

Files

~/.xfm

Standard location for xfm configuration and application files (see CONFIGURATION above).

/etc/X11/xfm

Standard location for system wide configuration files used when no user specific are available.

Caveats and bugs

Xfm catches the TERM signal to gracefully terminate the program, unmounting all open file systems which have been mounted by xfm. However, some window and session managers may not send TERM signals to their client applications when terminating an X session. Therefore it might be necessary to explicitly quit xfm or manually close file windows mounted by xfm before exiting X.

Do not specify a relative path in the directory field of an application item, because when you execute a push action on the application the current directory might not always be what you expect. This will probably be fixed in a future release. ;-)

Due to recent changes, it will propably no longer work with any shell without a minimum of POSIX compatibility.

Releases

4 releases since Debian 4.0 (Etch); the text changed 1 time.

  1. 4.0–5.0
  2. 6.0–7