{
    "mode": "man",
    "parameter": "update-mime",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/update-mime/8/json",
    "generated": "2026-05-30T06:07:01Z",
    "synopsis": "update-mime [no parameters]",
    "sections": {
        "NAME": {
            "content": "update-mime - create or update MIME information\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "update-mime [no parameters]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "update-mime  updates  the  /etc/mailcap  file to reflect mime information changed by a Debian\npackage during installation or removal.\n\n\nOPTIONS\n--local Generate files in the current user's home directory instead of  the  /etc  directory.\nThis  allows  users  to  create a custom ordering configuration and get a complete ~/.mailcap\nfile out of it.  In this local mode, the order overriding file (see below) will be looked for\nin the ~/.mailcap.order file.\n\n",
            "subsections": []
        },
        "OVERRIDING ORDER": {
            "content": "The  order of entries in the /etc/mailcap file can be altered by editing the /etc/mailcap.or‐\nder file.  Please see the mailcap.order(5) man page for more information.\n\n",
            "subsections": []
        },
        "CREATING ENTRIES": {
            "content": "To  create  entries  in  the  mailcap  file,  packages  need  to  create  a   file   in   the\n/usr/lib/mime/packages  directory.   In  this file goes the verbatim desired mailcap entries.\nIn addition to the standard mailcap options (described  below)  is  a  new  priority  option.\nSpecifying this will provide for simple ranking of programs within a given mime type.  An an‐\nimation viewer, for example, may be able to display a static picture, but  probably  wouldn't\nbe the best choice and so would give an option like \"priority=2\".  Priorities range from 0 to\n9, with 0 being the lowest and 9 being the highest.  If the priority  option  is  omitted,  a\nvalue of 5 is used.\n\nThe  following  are standard options that can be specified in the mailcap entry.  Options are\nseparated by semicolons (;) but must all be on the same line.  Each line should look like:\n\nmime/type; viewer; option; another=val; etc; priority=5\n\nMime types of the form \"class/*\" and even \"*/*\" are now acceptable (they were previously dis‐\nallowed).   When using \"class/*\", it is probably a good idea to add a \"priority=[1-4]\" option\nso specific rules using the default priority will get chosen first.  If using \"*/*\",  though,\nyou probably want to add a \"priority=0\" option to make that rule a \"last resort\".\n",
            "subsections": [
                {
                    "name": "Commands",
                    "content": ""
                },
                {
                    "name": "<program-string>",
                    "content": "Specifies  the  program  to run to view a file of the given content-type.  This option\nsetting cannot be omitted.  An implicit \"view=\" can be  considered  before  it.   When\nwriting an entry that has no viewer, use a value of false in this space.\n"
                },
                {
                    "name": "compose=<program-string>",
                    "content": "The  \"compose\"  command may be used to specify a program that can be used to compose a\nnew body or body part in the given format.  Its intended use is to support  mail  com‐\nposing  agents  that  support the composition of multiple types of mail using external\ncomposing agents.  The result of the composing program may be data  that  is  not  yet\nsuitable for mail transport -- that is, a Content-Transfer-Encoding may need to be ap‐\nplied to the data.\n"
                },
                {
                    "name": "composetyped=<program-string>",
                    "content": "The \"composetyped\" command is similar to \"compose\", but is to be used when the compos‐\ning  program  needs to specify the Content-type header field to be applied to the com‐\nposed data.  The \"compose\" option is simpler, and is preferred for use  with  existing\n(non-mail-oriented) programs for composing data in a given format.  The \"composetyped\"\noption is necessary when the Content-type information must include  auxiliary  parame‐\nters,  and the composition program must then know enough about mail formats to produce\noutput that includes the mail type information.\n"
                },
                {
                    "name": "edit=<program-string>",
                    "content": "The \"edit\" command may be used to specify a program that can be used to edit a body or\nbody  part  in the given format.  In many cases, it may be identical in content to the\n\"compose\" command.\n"
                },
                {
                    "name": "print=<program-string>",
                    "content": "The \"print\" command may be used to specify a program that can be used to print a  mes‐\nsage or body part in the given format.\n"
                },
                {
                    "name": "Modifiers",
                    "content": "These options are modifiers to all the commands specified on the command line.\n"
                },
                {
                    "name": "test=<conditional>",
                    "content": "The  \"test\"  option may be used to test some external condition (e.g., the machine ar‐\nchitecture, or the window system in use) to determine whether or not the mailcap  line\napplies.  It specifies a program to be run to test some condition.  If the test fails,\na subsequent mailcap entry will be sought.  Multiple test options are not permitted --\nsince a test can call a program, it can already be arbitrarily complex.\n\nNote:  When  testing  for X by looking at the DISPLAY environment variable, please use\none of:\n\ntest=test -z \"$DISPLAY\"     (no X)\nor    test=test -n \"$DISPLAY\"     (have X)\n\nMany programs recognize these strings and optimize for them.\n"
                },
                {
                    "name": "needsterminal",
                    "content": "The \"needsterminal\" option, if given, indicates that the commands must be  run  on  an\ninteractive  terminal.   This  is needed to inform window-oriented user agents that an\ninteractive terminal is needed.  (The decision is not left exclusively to the  command\nbecause in some circumstances it may not be possible for such programs to tell whether\nor not they are on interactive terminals.)  The needsterminal command applies  to  the\nview, compose and edit commands, if they exist.  Note that this is NOT a test -- it is\na requirement for the environment in which the program will be executed, and will typ‐\nically cause the creation of a terminal window when not executed on either a real ter‐\nminal or a terminal window.\n"
                },
                {
                    "name": "copiousoutput",
                    "content": "The \"copiousoutput\" option, if given, indicates that the output from the  view-command\nwill  be  an  extended  stream  of output and is to be interpreted as advice to the UA\n(User Agent mail-reading program) that the output  should  be  either  paged  or  made\nscrollable.  Note that it is probably a mistake if needsterminal and copiousoutput are\nboth specified.\n"
                },
                {
                    "name": "Content-Type Info",
                    "content": "These options provide additional information about the given content-type.\n"
                },
                {
                    "name": "description=<string>",
                    "content": "The \"description\" option simply provides a textual description that describes the type\nof  data,  to be used optionally by mail readers that wish to describe the data before\noffering to display it.\n"
                },
                {
                    "name": "textualnewlines",
                    "content": "The \"textualnewlines\" option, if given, indicates that this type of data is  line-ori‐\nented  and  that,  if  encoded in a binary format, all newlines should be converted to\ncanonical form (CRLF) before encoding, and will be in that form  after  decoding.   In\ngeneral,  this  is  needed only if there is line-oriented data of some type other than\ntext/* or non-line-oriented data that is a subtype of text.\n"
                },
                {
                    "name": "x11-bitmap=<pathname>",
                    "content": "The \"x11-bitmap\" option names a file, in X11 bitmap (xbm) format, which points  to  an\nappropriate icon to be used to visually denote the presence of this kind of data.\n"
                },
                {
                    "name": "nametemplate=<string>",
                    "content": "The  \"nametemplate\" option gives a file name format, in which %s will be replaced by a\nshort unique string to give the name of the temporary file to be passed to the viewing\ncommand.   This  is only expected to be relevant in environments where filename exten‐\nsions are meaningful, e.g., one could specify that a GIF file being passed  to  a  gif\nviewer should have a name ending in \".gif\" by using \"nametemplate=%s.gif\".\n"
                }
            ]
        },
        "DEPENDENCIES": {
            "content": "Packages  that  wish to provide MIME access to themselves should not depend on, recommend, or\nsuggest mime-support, as the the file they create in /usr/lib/mime/packages  will  cause  up‐‐\ndate-mime to be automatically run via a Dpkg trigger.\n\n",
            "subsections": []
        },
        "DESKTOP ENTRIES": {
            "content": "In  addition  to  the  abovementioned  mechanism  update-mime  also parses desktop entries in\n/usr/share/applications/ to generate mailcap entries. These entries are given a lower  prior‐\nity than those in /usr/lib/mime/packages.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "mailcap.order(5), deb-triggers(1), RFC-2046, RFC-1524\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "update-mime was written by Brian White <bcwhite@pobox.com>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "update-mime is in the public domain (the only true \"free\").\n\n\n\nDebian Project                              12th Feb 2012                             UPDATE-MIME(8)",
            "subsections": []
        }
    },
    "summary": "update-mime - create or update MIME information",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "mailcap.order",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mailcap.order/5/json"
        },
        {
            "name": "deb-triggers",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/deb-triggers/1/json"
        }
    ]
}