{
    "content": [
        {
            "type": "text",
            "text": "# update-mime (info)\n\n## NAME\n\nupdate-mime - create or update MIME information\n\n## SYNOPSIS\n\nupdate-mime [no parameters]\n\n## DESCRIPTION\n\nupdate-mime  updates  the /etc/mailcap file to reflect mime information\nchanged by a Debian package during installation or removal.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OVERRIDING ORDER**\n- **CREATING ENTRIES**\n- **DEPENDENCIES**\n- **DESKTOP ENTRIES**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "update-mime",
        "section": "",
        "mode": "info",
        "summary": "update-mime - create or update MIME information",
        "synopsis": "update-mime [no parameters]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "OVERRIDING ORDER",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "CREATING ENTRIES",
                "lines": 136,
                "subsections": []
            },
            {
                "name": "DEPENDENCIES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESKTOP ENTRIES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "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\nchanged by a Debian package during installation or removal.\n\nOPTIONS\n--local Generate files in the current user's home directory instead  of\nthe /etc directory.  This allows users to create a custom ordering con-\nfiguration and get a complete ~/.mailcap file out of it.  In this local\nmode,  the  order overriding file (see below) will be looked for in the\n~/.mailcap.order file.\n",
                "subsections": []
            },
            "OVERRIDING ORDER": {
                "content": "The order of entries in the /etc/mailcap file can be altered by editing\nthe  /etc/mailcap.order file.  Please see the mailcap.order(5) man page\nfor more information.\n",
                "subsections": []
            },
            "CREATING ENTRIES": {
                "content": "To create entries in the mailcap file, packages need to create  a  file\nin  the /usr/lib/mime/packages directory.  In this file goes the verba-\ntim desired mailcap entries.  In addition to the standard  mailcap  op-\ntions (described below) is a new priority option.  Specifying this will\nprovide for simple ranking of programs within a given  mime  type.   An\nanimation viewer, for example, may be able to display a static picture,\nbut probably wouldn't be the best choice and so would  give  an  option\nlike \"priority=2\".  Priorities range from 0 to 9, with 0 being the low-\nest 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\nentry.  Options are separated by semicolons (;) but must all be on  the\nsame 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\n(they were previously disallowed).  When using \"class/*\", it is  proba-\nbly  a good idea to add a \"priority=[1-4]\" option so specific rules us-\ning the default priority  will  get  chosen  first.   If  using  \"*/*\",\nthough,  you  probably  want  to add a \"priority=0\" option to make that\nrule a \"last resort\".\n\nCommands\n<program-string>\nSpecifies the program to run to view a file of  the  given  con-\ntent-type.   This option setting cannot be omitted.  An implicit\n\"view=\" can be considered before it.  When writing an entry that\nhas no viewer, use a value of false in this space.\n\ncompose=<program-string>\nThe  \"compose\" command may be used to specify a program that can\nbe used to compose a new body or body part in the given  format.\nIts  intended  use is to support mail composing agents that sup-\nport the composition of multiple types of  mail  using  external\ncomposing  agents.   The  result of the composing program may be\ndata that is not yet suitable for mail transport -- that  is,  a\nContent-Transfer-Encoding may need to be applied to the data.\n\ncomposetyped=<program-string>\nThe \"composetyped\" command is similar to \"compose\", but is to be\nused when the composing program needs to  specify  the  Content-\ntype header field to be applied to the composed data.  The \"com-\npose\" option is simpler, and is preferred for use with  existing\n(non-mail-oriented)  programs for composing data in a given for-\nmat.  The \"composetyped\" option is necessary when  the  Content-\ntype information must include auxiliary parameters, and the com-\nposition program must then know enough  about  mail  formats  to\nproduce output that includes the mail type information.\n\nedit=<program-string>\nThe  \"edit\" command may be used to specify a program that can be\nused to edit a body or body part in the given format.   In  many\ncases, it may be identical in content to the \"compose\" command.\n\nprint=<program-string>\nThe \"print\" command may be used to specify a program that can be\nused to print a message or body part in the given format.\n\nModifiers\nThese options are modifiers to all the commands specified on  the  com-\nmand line.\n\ntest=<conditional>\nThe  \"test\"  option  may be used to test some external condition\n(e.g., the machine architecture, or the window system in use) to\ndetermine whether or not the mailcap line applies.  It specifies\na program to be run to test some condition.  If the test  fails,\na  subsequent  mailcap  entry will be sought.  Multiple test op-\ntions are not permitted -- since a test can call a  program,  it\ncan already be arbitrarily complex.\n\nNote:  When  testing for X by looking at the DISPLAY environment\nvariable, please use one 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\nneedsterminal\nThe \"needsterminal\" option, if given, indicates  that  the  com-\nmands must be run on an interactive terminal.  This is needed to\ninform window-oriented user agents that an interactive  terminal\nis needed.  (The decision is not left exclusively to the command\nbecause in some circumstances it may not be  possible  for  such\nprograms  to  tell whether or not they are on interactive termi-\nnals.)  The needsterminal command applies to the  view,  compose\nand  edit commands, if they exist.  Note that this is NOT a test\n-- it is a requirement for the environment in which the  program\nwill  be  executed,  and  will typically cause the creation of a\nterminal window when not executed on either a real terminal or a\nterminal window.\n\ncopiousoutput\nThe  \"copiousoutput\" option, if given, indicates that the output\nfrom the view-command will be an extended stream of  output  and\nis  to be interpreted as advice to the UA (User Agent mail-read-\ning program) that the output should  be  either  paged  or  made\nscrollable.  Note that it is probably a mistake if needsterminal\nand copiousoutput are both specified.\n\nContent-Type Info\nThese options provide additional information about the  given  content-\ntype.\n\ndescription=<string>\nThe  \"description\"  option simply provides a textual description\nthat describes the type of data, to be used optionally  by  mail\nreaders  that  wish to describe the data before offering to dis-\nplay it.\n\ntextualnewlines\nThe \"textualnewlines\" option, if given, indicates that this type\nof  data  is line-oriented and that, if encoded in a binary for-\nmat, all newlines should be converted to canonical  form  (CRLF)\nbefore  encoding,  and  will be in that form after decoding.  In\ngeneral, this is needed only if there is line-oriented  data  of\nsome  type other than text/* or non-line-oriented data that is a\nsubtype of text.\n\nx11-bitmap=<pathname>\nThe \"x11-bitmap\" option names a file, in X11 bitmap  (xbm)  for-\nmat,  which points to an appropriate icon to be used to visually\ndenote the presence of this kind of data.\n\nnametemplate=<string>\nThe \"nametemplate\" option gives a file name format, in which  %s\nwill  be  replaced  by a short unique string to give the name of\nthe temporary file to be passed to the viewing command.  This is\nonly  expected to be relevant in environments where filename ex-\ntensions are meaningful, e.g., one could specify that a GIF file\nbeing passed to a gif viewer should have a name ending in \".gif\"\nby using \"nametemplate=%s.gif\".\n",
                "subsections": []
            },
            "DEPENDENCIES": {
                "content": "Packages that wish to provide MIME access to themselves should not  de-\npend  on, recommend, or suggest mime-support, as the the file they cre-\nate in /usr/lib/mime/packages will cause update-mime  to  be  automati-\ncally run via a Dpkg trigger.\n",
                "subsections": []
            },
            "DESKTOP ENTRIES": {
                "content": "In  addition  to  the  abovementioned mechanism update-mime also parses\ndesktop entries in /usr/share/applications/  to  generate  mailcap  en-\ntries.  These  entries  are  given  a  lower  priority  than  those  in\n/usr/lib/mime/packages.\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\nDebian Project                   12th Feb 2012                  UPDATE-MIME(8)",
                "subsections": []
            }
        }
    }
}