Next: pop3d, Previous: mail.remote, Up: Programs
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, see
man mime.types
for the description of its syntax. [FIXME:
provide an xref to CUPS]. By default mimeview searches for
mime.types in $prefix/etc/cups/1, 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
The following table summarizes options specific for mimeview:
--no-ask='text/*,image/jpeg'
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/*').
mailcap
files.
If flags are not given, the default ‘9’ is assumed.
command
field is not executed. Instead
mimeview will execute the command specified in
the print
field. If there is nothing in the print field,
the mailcap entry is ignored and the search continues for a matching
mailcap entry that does have a print
field.
Notice, that unlike in metamail -h, this option does not force mimeview to send the output to the printer daemon.
When used with --metamail option, this option passes -h flag to the invocation of metamail.
By default mimeview behaves as if given
--no-interactive option whenever its standard input is not
a tty device.
[1] 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.