GNU Mailutils Manual (split by node):   Section:   Chapter:FastBack: Programs   Up: Programs   FastForward: Libraries   Contents: Table of ContentsIndex: Function Index

3.15 mimeview

For each file given in its command line, mimeview attempts to autodetect its type and invoke an appropriate file viewer.

To detect the file type, mimeview uses mime.types file. This file is a part of Common UNIX Printing System, mime.types in mime.types man page. By default mimeview searches for mime.types in $prefix/etc/cups/4, however its exact location can be specified at runtime as well (see --mimetypes below).

Once file MIME type is successfully determined, mimeview consults mailcap files in order to determine how to display the file. It does so essentially in the same manner as metamail utility, i.e., it scans all files specified in METAMAIL environment variable until it finds an entry describing the desired file format or until the list of files is exhausted. If METAMAIL variable is not set, mimeview uses the following default path instead:

$HOME/.mailcap:/usr/local/etc/mailcap:\
 /usr/etc/mailcap:/etc/mailcap:\
 /etc/mail/mailcap:/usr/public/lib/mailcap

Footnotes

(4)

The exact location is determined at configuration time by setting environment variable DEFAULT_CUPS_CONFDIR. On most sites running

./configure DEFAULT_CUPS_CONFDIR=/etc/cups

should be recommended.