Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xfm_mailcap(5) [debian man page]

XFM_MAILCAP(5)								XFM							    XFM_MAILCAP(5)

NAME
xfm_mailcap - mailcap information for usage within xfm or xfmmailcap DESCRIPTION
To determine what command to use to open a file with a specific mime type, xfm(1) uses files in a format similar to the mailcap format. The extensions are special actions to open directories or files to load into the application window and to include other mailcap files, so that the default mailcap databases in ~/.mailcap, /etc/mailcap, /usr/share/etc/mailcap and /usr/local/etc/mailcap can be included. This man page describes which fields are used and the extensions. For general information of the syntax of these files read the man pages mailcap(5) and update-mime(8). While this files are supposed to be read by xfm(1), there also is the program xfmmailcap(1) to ease debugging. GENERAL FORMAT
There is one entry per line. Empty lines and lines starting with a hash (#) are ignored. Each line consists of parts separated by semi- colons (;). The first part is the mime part or the token include. The second part is the view option. This is followed by an arbitrary number of option names, followed by a value after a equal sign, if they have a value. INCLUDES
Lines with a mime-type include or !include are not treated as mailcap specifiers, but cause the filename described by the second argument to be read at this place. I recommend placing the following line at the end of every $HOME/.xfm/xfm_mailcap file: include; /etc/X11/xfm/mailcap OPTIONS USED BY XFM
test The value of this option (after unescaping) is executed using system(3). If it fails, the content of the line is not used for any- thing but increasing the amount of output. Some tests weather a DISPLAY environment variable are set are omitted and considered always true. nametemplate If this option has a value, the filename has to match it when a action is executed. Otherwise it is replaced by a symlink matching it. It has to contain exactly one unescaped occurrence of %s, which is used as wild card for any positive number of characters. edit This is the preferred action to open a file. Unless it is one of the special actions explained below, it has to contain exactly one unescaped occurance of %s, which is replaced by the filename to open, or the filename of a symlink to the file to open in the case the filename might be dangerous or does not match the nametemplate of this line. needsterminal If this option, which normally has no value, is there, the actions specified in this line are executed in an X terminal emulator. SPECIAL ACTIONS
If the action with the highest priority is one the special strings OPEN or LOAD, no shell is spawned and no command executed. Instead the current file window is changed to the selected directory (OPEN) or the file is supposed to be in the xfm(5) format and loaded into the application window(LOAD). FILES
$HOME/.xfm/xfm_mailcap Unless xfm(1) is told to look at a different place via X resource Xfm.mailcapFile, this is the first place xfm looks for a file with the describes format. xfmmailcap(1) always looks here first. /etc/X11/xfm/xfm_mailcap If the first file does not exists, xfm(1) (unless it gets told a different place via the X resource Xfm.systemwideMailcapFile) and xfmmailcap(1) look for this file. It is recommended that the file in the home directory includes this file to get the system wide defaults. SEE ALSO
xfm(1), xfmmailcap(1), mailcap(5), update-mime(8). xfm 20 April, 2006 XFM_MAILCAP(5)

Check Out this Related Man Page

XFM_MAGIC(5)								XFM							      XFM_MAGIC(5)

NAME
xfm_magic - xfm's magic file format DESCRIPTION
xfm(1) and xfmtype(1) read files in this format to determine the mime type of a file, which again is used to determine what command to open it with. The format of the configuration file is the same as the magic(5) with the following additions and differences: include: directive If a line starts with include: the rest of the line is treated as filename of another magic file to be read and processed before pro- cessing this file continues. Included files can be include files again. Thus a user specific file can include: /etc/X11/xfm/xfm_magic to get the system wide xfm defaults and this file again include: /usr/share/file/magic.mime to get the system wide system defaults. mode type field. Similar to long type, but offset is ignored. The test is performed against the st_mode field of the stat structure obtained using stat(2) system call. This allows testing for directories, fifos ... as well as for file permissions. lmode type field. Similar to mode type, but using lstat(2) instead of stat(2). This allows testing for symbolic links. regexp type field. The value field must be a proper regular expression. The bytes starting at offset are matched against it. If the match succeeds, then a regsub(3) is performed on message yielding the final message. If the type field is of the form regexp&nnn where nnn is a positive num- ber, then that number controls the amount of data scanned for the matching, otherwise a compile defined value (currently 256) is used. long and short byte order. xfmtype always reads longs and shorts using MSB-first order. This makes configuration files portable to all architectures, but some entries in original magic(5) files might be wrong. Continuation lines. If a line ends with a backslash character (), it is continued with the following line. The maximum length of a line is 1024 characters (counting also characters in continuation lines). FILES
$HOME/.xfm/xfm_magic Default location xfm(1) looks for a file of this format. (Note that xfmtype(1) only reads files specified with -m on the command line.) /etc/X11/xfm/xfm_magic System wide default file if there is no user specific one. SEE ALSO
xfm(1), xfmtype(1), file(1), magic(5), stat(2), lstat(2). COPYRIGHT
Copyright (c) 1995 CNM-US Copyright (c) 1995 Juan D. Martin AUTHOR
Juan D. Martin (juando@cnm.us.es) (but modified heavily by Bernhard R. Link) xfm 20 April, 2006 XFM_MAGIC(5)
Man Page

Featured Tech Videos