xfm_mime.types(5)

xfm_mime.types5

Suffix based fall back mime type information

Overview

When xfm(1) cannot determine the type of a file using the values in xfm_magic(5), this file is used to guess a type of a file. The file shipped with xfm by default just tells to include the files ~/.mime.types and /etc/mime.types to get the system wide settings.

Format

There is one entry per line. Empty lines and lines starting with a hash (#) are ignored. Prior entries overwrite later ones.

If a line starts with !include or include the rest of the line is treated as a filename to process before continuing with the rest of the file. (If the filename starts with a tilde followed by a slash, the tilde is replaced by the content of the HOME environment variable.)

Other lines contain the name of a mime type followed by an arbitrary number of filename suffixes, separated by spaces or tabs.

A file that got no other type associated by content and whose name ends with a dot followed by the specified suffix, will be treated as type mime type.

Xfm only recognizes suffixes with at most 7 characters.

Examples

Otherwise unidentified files anding in .c are treated as text/x-csrc:
text/x-csrc c
Same with .c++, cpp, cxx or cc as text/x-c++src:
text/x-c++src c++ cpp cxx cc

Files

$HOME/.xfm/xfm_mime.types

Unless xfm(1) is told to look at a different place via X resource Xfm.mimeTypesFile, this is the first place xfm looks for a file with the describes format.

/etc/X11/xfm/xfm_mime.types

If the first file does not exists, xfm(1) (unless it gets told a different place via the X resource Xfm.systemwideMimeTypesFile) looks for this file.

$HOME/.mime.types

General user settings normaly included from /etc/X11/xfm/xfm_mime.types

/etc/mime.types

General system wide settings normaly included from /etc/X11/xfm/xfm_mime.types

Releases

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

  1. 4.0–5.0
  2. 6.0–7

From xfm 1.5.4-3 in Debian 7 (Wheezy). Parsed by carta from the page's man source.