310 lines
10 KiB
HTML
310 lines
10 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of UPDATE-MIME</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>UPDATE-MIME</H1>
|
|
Section: Update MIME Programs (8)<BR>Updated: 12th Feb 2012<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
update-mime - create or update MIME information
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>update-mime</B>
|
|
|
|
[no parameters]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>update-mime</B>
|
|
|
|
updates the
|
|
<B>/etc/mailcap</B>
|
|
|
|
file to reflect mime information changed by a Debian package during
|
|
installation or removal.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H3>OPTIONS</H3>
|
|
|
|
<B>--local</B>
|
|
|
|
Generate files in the current user's home directory instead of the
|
|
<I>/etc</I>
|
|
|
|
directory. This allows users to create a custom ordering configuration and get
|
|
a complete
|
|
<I>~/.mailcap</I>
|
|
|
|
file out of it. In this local mode, the order overriding file (see below)
|
|
will be looked for in the
|
|
<I>~/.mailcap.order</I>
|
|
|
|
file.
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OVERRIDING ORDER</H2>
|
|
|
|
The order of entries in the
|
|
<I>/etc/mailcap</I>
|
|
|
|
file can be altered by editing the
|
|
<I>/etc/mailcap.order</I>
|
|
|
|
file. Please see the
|
|
<B><A HREF="/cgi-bin/man/man2html?5+mailcap.order">mailcap.order</A>(5)</B>
|
|
|
|
man page for more information.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>CREATING ENTRIES</H2>
|
|
|
|
To create entries in the mailcap file, packages need to create a file
|
|
in the
|
|
<I>/usr/lib/mime/packages</I>
|
|
|
|
directory. In this file goes the verbatim desired mailcap entries.
|
|
In addition to the standard mailcap options (described below) is a new
|
|
<I>priority</I>
|
|
|
|
option. Specifying this will provide for simple ranking of programs
|
|
within a given mime type. An animation viewer, for example, may be
|
|
able to display a static picture, but probably wouldn't be the best
|
|
choice and so would give an option like "priority=2". Priorities
|
|
range from 0 to 9, with 0 being the lowest and 9 being the highest.
|
|
If the
|
|
<I>priority</I>
|
|
|
|
option is omitted, a value of 5 is used.
|
|
<P>
|
|
The following are standard options that can be specified in the
|
|
mailcap entry. Options are separated by semicolons (;) but must all
|
|
be on the same line. Each line should look like:
|
|
<P>
|
|
<BR> mime/type; viewer; option; another=val; etc; priority=5
|
|
<P>
|
|
Mime types of the form "class/*" and even "*/*" are now acceptable
|
|
(they were previously disallowed). When using "class/*", it is
|
|
probably a good idea to add a "priority=[1-4]" option so specific
|
|
rules using the default priority will get chosen first. If using
|
|
"*/*", though, you probably want to add a "priority=0" option to make
|
|
that rule a "last resort".
|
|
<A NAME="lbAH"> </A>
|
|
<H3>Commands</H3>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B><program-string></B>
|
|
|
|
<DD>
|
|
Specifies the program to run to view a file of the given content-type.
|
|
<B>This option setting cannot be omitted.</B>
|
|
|
|
An implicit "view=" can be considered before it. When writing an
|
|
entry that has no viewer, use a value of
|
|
<I>false</I>
|
|
|
|
in this space.
|
|
<DT id="2"><B>compose=<program-string></B>
|
|
|
|
<DD>
|
|
The "compose" command may be used to specify a program that can be
|
|
used to compose a new body or body part in the given format. Its
|
|
intended use is to support mail composing agents that support the
|
|
composition of multiple types of mail using external composing agents.
|
|
The result of the composing program may be data that is not yet
|
|
suitable for mail transport -- that is, a Content-Transfer-Encoding
|
|
may need to be applied to the data.
|
|
<DT id="3"><B>composetyped=<program-string></B>
|
|
|
|
<DD>
|
|
The "composetyped" command is similar to "compose", but is to be used
|
|
when the composing program needs to specify the Content-type header
|
|
field to be applied to the composed data. The "compose" option is
|
|
simpler, and is preferred for use with existing (non-mail-oriented)
|
|
programs for composing data in a given format. The "composetyped"
|
|
option is necessary when the Content-type information must include
|
|
auxiliary parameters, and the composition program must then know
|
|
enough about mail formats to produce output that includes the mail
|
|
type information.
|
|
<DT id="4"><B>edit=<program-string></B>
|
|
|
|
<DD>
|
|
The "edit" command may be used to specify a program that can be used
|
|
to edit a body or body part in the given format. In many cases, it
|
|
may be identical in content to the "compose" command.
|
|
<DT id="5"><B>print=<program-string></B>
|
|
|
|
<DD>
|
|
The "print" command may be used to specify a program that can be used to
|
|
print a message or body part in the given format.
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H3>Modifiers</H3>
|
|
|
|
These options are modifiers to all the commands specified on the
|
|
command line.
|
|
<DL COMPACT>
|
|
<DT id="6"><B>test=<conditional></B>
|
|
|
|
<DD>
|
|
The "test" option may be used to test some external condition (e.g.,
|
|
the machine architecture, or the window system in use) to determine
|
|
whether or not the mailcap line applies. It specifies a program to be
|
|
run to test some condition. If the test fails, a subsequent mailcap
|
|
entry will be sought. Multiple test options are not permitted --
|
|
since a test can call a program, it can already be arbitrarily
|
|
complex.
|
|
<P>
|
|
<B>Note:</B>
|
|
|
|
When testing for X by looking at the
|
|
<I>DISPLAY</I>
|
|
|
|
environment variable, please use one of:
|
|
<P>
|
|
<BR> test=test -z "$DISPLAY" (no X)
|
|
<BR> or test=test -n "$DISPLAY" (have X)
|
|
<P>
|
|
Many programs recognize these strings and optimize for them.
|
|
<DT id="7"><B>needsterminal</B>
|
|
|
|
<DD>
|
|
The "needsterminal" option, if given, indicates that the commands must
|
|
be run on an interactive terminal. This is needed to inform window-oriented
|
|
user agents that an interactive terminal is needed. (The decision is
|
|
not left exclusively to the command because in some circumstances it
|
|
may not be possible for such programs to tell whether or not they are
|
|
on interactive terminals.) The needsterminal command applies to the
|
|
view, compose and edit commands, if they exist. Note that this is NOT
|
|
a test -- it is a requirement for the environment in which the program
|
|
will be executed, and will typically cause the creation of a terminal
|
|
window when not executed on either a real terminal or a terminal
|
|
window.
|
|
<DT id="8"><B>copiousoutput</B>
|
|
|
|
<DD>
|
|
The "copiousoutput" option, if given, indicates that the output from the
|
|
view-command will be an extended stream of output and is to be
|
|
interpreted as advice to the UA (User Agent mail-reading program) that
|
|
the output should be either paged or made scrollable. Note that it is
|
|
probably a mistake if needsterminal and copiousoutput are both
|
|
specified.
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>Content-Type Info</H3>
|
|
|
|
These options provide additional information about the given
|
|
content-type.
|
|
<DL COMPACT>
|
|
<DT id="9"><B>description=<string></B>
|
|
|
|
<DD>
|
|
The "description" option simply provides a textual description that
|
|
describes the type of data, to be used optionally by mail readers that
|
|
wish to describe the data before offering to display it.
|
|
<DT id="10"><B>textualnewlines</B>
|
|
|
|
<DD>
|
|
The "textualnewlines" option, if given, indicates that this type
|
|
of data is line-oriented and that, if encoded in a binary format, all
|
|
newlines should be converted to canonical form (CRLF) before encoding,
|
|
and will be in that form after decoding. In general, this is needed
|
|
only if there is line-oriented data of some type other than text/* or
|
|
non-line-oriented data that is a subtype of text.
|
|
<DT id="11"><B>x11-bitmap=<pathname></B>
|
|
|
|
<DD>
|
|
The "x11-bitmap" option names a file, in X11 bitmap (xbm) format,
|
|
which points to an appropriate icon to be used to visually denote the
|
|
presence of this kind of data.
|
|
<DT id="12"><B>nametemplate=<string></B>
|
|
|
|
<DD>
|
|
The "nametemplate" option gives a file name format, in which %s will be
|
|
replaced by a short unique string to give the name of the temporary
|
|
file to be passed to the viewing command. This is only expected to be
|
|
relevant in environments where filename extensions are meaningful,
|
|
e.g., one could specify that a GIF file being passed to a gif viewer
|
|
should have a name ending in ".gif" by using "nametemplate=%s.gif".
|
|
</DL>
|
|
<A NAME="lbAK"> </A>
|
|
<H2>DEPENDENCIES</H2>
|
|
|
|
Packages that wish to provide MIME access to themselves should
|
|
<B>not</B>
|
|
|
|
depend on, recommend, or suggest
|
|
<B>mime-support,</B>
|
|
|
|
as the the file they create in
|
|
<I>/usr/lib/mime/packages</I>
|
|
|
|
will cause
|
|
<B>update-mime</B>
|
|
|
|
to be automatically run via a Dpkg trigger.
|
|
<P>
|
|
<A NAME="lbAL"> </A>
|
|
<H2>DESKTOP ENTRIES</H2>
|
|
|
|
In addition to the abovementioned mechanism
|
|
<B>update-mime</B>
|
|
|
|
also parses desktop entries in /usr/share/applications/ to generate
|
|
mailcap entries. These entries are given a lower priority than those
|
|
in /usr/lib/mime/packages.
|
|
<P>
|
|
<A NAME="lbAM"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+mailcap.order">mailcap.order</A></B>(5), <A HREF="/cgi-bin/man/man2html?1+deb-triggers">deb-triggers</A><B>(1), RFC-2046, RFC-1524</B>
|
|
|
|
<A NAME="lbAN"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<B>update-mime</B>
|
|
|
|
was written by Brian White <<A HREF="mailto:bcwhite@pobox.com">bcwhite@pobox.com</A>>
|
|
<A NAME="lbAO"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
<B>update-mime</B>
|
|
|
|
is in the public domain (the only true "free").
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="14"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="15"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="16"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
</DL>
|
|
<DT id="17"><A HREF="#lbAF">OVERRIDING ORDER</A><DD>
|
|
<DT id="18"><A HREF="#lbAG">CREATING ENTRIES</A><DD>
|
|
<DL>
|
|
<DT id="19"><A HREF="#lbAH">Commands</A><DD>
|
|
<DT id="20"><A HREF="#lbAI">Modifiers</A><DD>
|
|
<DT id="21"><A HREF="#lbAJ">Content-Type Info</A><DD>
|
|
</DL>
|
|
<DT id="22"><A HREF="#lbAK">DEPENDENCIES</A><DD>
|
|
<DT id="23"><A HREF="#lbAL">DESKTOP ENTRIES</A><DD>
|
|
<DT id="24"><A HREF="#lbAM">SEE ALSO</A><DD>
|
|
<DT id="25"><A HREF="#lbAN">AUTHOR</A><DD>
|
|
<DT id="26"><A HREF="#lbAO">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:18 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|