1
.\" Hey, Emacs! This is an -*- nroff -*- source file.
2
.\" Update-mime and this manpage were written by Brian White and
3
.\" have been placed in the public domain (the only true "free").
5
.TH UPDATE-MIME 8 "16th Aug 1998" "Debian Project" "Update MIME Programs"
7
update\-mime \- create or update MIME information
16
file to reflect mime information changed by a Debian package during
17
installation or removal.
19
The order of entries in the
21
file can be altered by editing the
23
file. Please see the mailcap.order(5) man page for more information.
25
To create entries in the mailcap file, packages need to create a file
27
.I /usr/lib/mime/packages
28
directory. In this file goes the verbatim desired mailcap entries.
29
In addition to the standard mailcap options (described below) is a new
31
option. Specifying this will provide for simple ranking of programs
32
within a given mime type. An animation viewer, for example, may be
33
able to display a static picture, but probably wouldn't be the best
34
choice and so would give an option like "priority=2". Priorities
35
range from 0 to 9, with 0 being the lowest and 9 being the highest.
38
option is omitted, a value of 5 is used.
40
The following are standard options that can be specified in the
41
mailcap entry. Options are separated by semicolons (;) but must all
42
be on the same line. Each line should look like:
44
mime/type; viewer; option; another=val; etc; priority=5
46
Mime types of the form "class/*" and even "*/*" are now acceptable
47
(they were previously disallowed). When using "class/*", it is
48
probably a good idea to add a "priority=[1-4]" option so specific
49
rules using the default priority will get chosen first. If using
50
"*/*", though, you probably want to add a "priority=0" option to make
51
that rule a "last resort".
54
.BI view=<program-string>
55
Specifies the program to run to view a file of the given content-type.
56
Actually, the "view=" must be omitted and the viewer program must be
57
the second value on the line (after the mime type).
58
.B This option connot be omitted.
59
When writing an entry that has no viewer, use a value of
63
.BI compose=<program-string>
64
The "compose" command may be used to specify a program that can be
65
used to compose a new body or body part in the given format. Its
66
intended use is to support mail composing agents that support the
67
composition of multiple types of mail using external composing agents.
68
The result of the composing program may be data that is not yet
69
suitable for mail transport -- that is, a Content-Transfer-Encoding
70
may need to be applied to the data.
72
.BI composetyped=<program-string>
73
The "composetyped" command is similar to "compose", but is to be used
74
when the composing program needs to specify the Content-type header
75
field to be applied to the composed data. The "compose" option is
76
simpler, and is preferred for use with existing (non-mail-oriented)
77
programs for composing data in a given format. The "composetyped"
78
option is necessary when the Content-type information must include
79
auxiliary parameters, and the composition program must then know
80
enough about mail formats to produce output that includes the mail
83
.BI edit=<program-string>
84
The "edit" command may be used to specify a program that can be used
85
to edit a body or body part in the given format. In many cases, it
86
may be identical in content to the "compose" command.
88
.BI print=<program-string>
89
The "print" command may be used to specify a program that can be used to
90
print a message or body part in the given format.
92
These options are modifiers to all the commands specified on the
95
.BI test=<conditional>
96
The "test" option may be used to test some external condition (e.g.,
97
the machine architecture, or the window system in use) to determine
98
whether or not the mailcap line applies. It specifies a program to be
99
run to test some condition. If the test fails, a subsequent mailcap
100
entry will be sought. Multiple test options are not permitted --
101
since a test can call a program, it can already be arbitrarily
105
When testing for X by looking at the
107
environment variable, please use one of:
109
test=test -z "$DISPLAY" (no X)
110
or test=test -n "$DISPLAY" (have X)
112
Many programs recognize these strings and optimize for them.
115
The "needsterminal" option, if given, indicates that the commands must
116
be run on an interactive terminal. This is needed to inform window-
117
oriented user agents that an interactive terminal is needed. (The
118
decision is not left exclusively to the command because in some
119
circumstances it may not be possible for such programs to tell whether
120
or not they are on interactive terminals.) The needsterminal command
121
applies to the view, compose and edit commands, if they exist. Note
122
that this is NOT a test -- it is a requirement for the environment in
123
which the program will be executed, and should typically cause the
124
creation of a terminal window when not executed on either a real
125
terminal or a terminal window.
128
The "copiousoutput" option, if given, indicates that the output from the
129
view-command will be an extended stream of output and is to be
130
interpreted as advice to the UA (User Agent mail-reading program) that
131
the output should be either paged or made scrollable. Note that it is
132
probably a mistake if needsterminal and copiousoutput are both
134
.SS Content-Type Info
135
These options provide additional information about the given
138
.BI description=<string>
139
The "description" option simply provides a textual description that
140
describes the type of data, to be used optionally by mail readers that
141
wish to describe the data before offering to display it.
144
The "textualnewlines" option, if given, indicates that this type
145
of data is line-oriented and that, if encoded in a binary format, all
146
newlines should be converted to canonical form (CRLF) before encoding,
147
and will be in that form after decoding. In general, this is needed
148
only if there is line-oriented data of some type other than text/* or
149
non-line-oriented data that is a subtype of text.
151
.BI x11-bitmap=<pathname>
152
The "x11-bitmap" option names a file, in X11 bitmap (xbm) format,
153
which points to an appropriate icon to be used to visually denote the
154
presence of this kind of data.
156
.BI nametemplate=<string>
157
The "nametemplate" option gives a file name format, in which %s will be
158
replaced by a short unique string to give the name of the temporary
159
file to be passed to the viewing command. This is only expected to be
160
relevant in environments where filename extensions are meaningful,
161
e.g., one could specify that a GIF file being passed to a gif viewer
162
should have a name ending in ".gif" by using "nametemplate=%s.gif".
164
Packages that wish to provide MIME access to themselves should
166
depend on, recommend, or suggest
168
Instead, they should just put something like the following in the
177
\& if [ -x /usr/sbin/update-mime ]; then
182
.BR mailcap.order "(5), RFC-2046, RFC-1524"
185
was written by Brian White <bcwhite@pobox.com>
188
is in the public domain (the only true "free").