General-Purpose Mail Package
|Official GNU Software|
For each file given in its command line,
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,
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
METAMAIL environment variable until it finds an entry
describing the desired file format or until the list of files is
METAMAIL variable is not set,
uses the following default path instead:
$HOME/.mailcap:/usr/local/etc/mailcap:\ /usr/etc/mailcap:/etc/mailcap:\ /etc/mail/mailcap:/usr/public/lib/mailcap
The following table summarizes options specific for
mimeview asks for confirmation before running
interpreter to view a message. If this option is used without
argument, it disables the default behavior for all message
types. Otherwise, if argument type-list is given, it specifies
a comma-separated list of MIME types for which no questions should be
asked. Elements of this list may include shell-style globbing
patterns, e.g. setting
will disable prompting before displaying any textual files, no matter what their subtype is, and before displaying files with type ‘image/jpeg’.
Notice, that when the long form is used, its argument must be separated from the option by a single equal sign, as shown in the example above. When the short form (-a) is used, its argument must follow the option immediately, without any intervening whitespace, e.g. -a'text/*').
Enables debugging output. Flags is a sequence of characters specifying the desired debugging level. Following characters are meaningful in flags:
Enables debugging of mime.types parser
Enables debugging of mime.types lexical analyzer (warning: produces very copious output)
Prints basic information about actions to be executed and reports about exit status of executed commands.
Additionally displays each file name along with its MIME type
Additionally traces the process of looking up the matching entry
Additionally, enables debugging of mime.types parser (‘g’).
Additionally, enables debugging of mime.types lexer (‘l’).
The same as 4, currently.
If flags are not given, the default ‘2’ is assumed.
metamail to display files, instead of using the internal
mechanisms. If file is specified, it is taken as
metamail command line.
This options tells
mimeview that it should run in
non-interactive mode. In this mode prompting is disabled, and
the normal mailcap
command field is not executed. Instead
mimeview will execute the command specified in
Notice, that unlike in
metamail -h, this option does
mimeview to send the output to the printer
When used with --metamail option, this option passes
-h flag to the invocation of
mimeview behaves as if given
--no-interactive option whenever its standard input is not
a tty device.
Identifies and prints the MIME type for each input file.
Do not do anything, just print what would be done. Implies --debug=1, unless the debugging level is set up explicitly.
Use file as mime.types file. If file is a directory, use file/mime.types
Check syntax of the mime.types file and exit. Command line arguments are ignored.
The following configuration statements affect the behavior of
|debug||See Debug Statement.|
Read file instead of the default mime.types.
Use program to display files.
The exact location is determined at
configuration time by setting environment variable
DEFAULT_CUPS_CONFDIR. On most sites running
should be recommended.
This document was generated on August 5, 2021 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.