1UPDATE-DESKTOP-DATABASE(1) General Commands Manual UPDATE-DESKTOP-DATABASE(1)
2
3
4
6 update-desktop-database - Build cache database of MIME types handled by
7 desktop files
8
10 update-desktop-database [-q|--quiet] [-v|--verbose] [DIRECTORY...]
11
13 The update-desktop-database program is a tool to build a cache database
14 of the MIME types handled by desktop files.
15
16 The cache database contains the list of MIME types that can be handled
17 by desktop files, as well as, for each MIME type, a list of desktop
18 files that can handle this MIME type. This cache database ease the work
19 of applications that need to find an application that can open a docu‐
20 ment of a specific MIME type: those applications will not have to parse
21 all the desktop files existing on the system, and can instead parse
22 this cache database.
23
24 If no DIRECTORY is specified as argument, the desktop files that will
25 be processed are the ones installed in $XDG_DATA_DIRS/applications.
26
27 If both the --quiet and --verbose options are used, then --verbose will
28 be ignored.
29
31 The following options are supported:
32
33 -q, --quiet
34 Do not display any information about processing and updating
35 progress.
36
37 -v, --verbose
38 Display more information about processing and updating progress.
39
41 If an invalid MIME type is met, it will be ignored and the creation of
42 the cache database will continue.
43
44 The format of the cache database is a simple desktop entry format, with
45 a MIME Cache group, containing one key per MIME type. The key name is
46 the MIME type, and the key value is the list of desktop file that can
47 handle this MIME type.
48
49 The order of the desktop files found for a MIME type is not signifi‐
50 cant. Therefore, an external mechanism must be used to determine what
51 is the preferred desktop file for a MIME type.
52
54 Here is a simple example of a cache database:
55
56 [MIME Cache]
57 application/x-shellscript=gedit.desktop;
58 text/plain=gedit.desktop;gvim.desktop;
59 video/webm=totem.desktop;
60
61 This cache database is created with three desktop files, each contain‐
62 ing a MimeType key:
63
64 gedit.desktop: MimeType=text/plain;application/x-shellscript;
65 gvim.desktop: MimeType=text/plain;
66 totem.desktop: MimeType=video/webm;
67
69 $XDG_DATA_DIRS/applications/mimeinfo.cache
70
71 This file is the cache database created by update-desktop-data‐
72 base.
73
75 If you find bugs in the update-desktop-database program, please report
76 these on https://bugs.freedesktop.org.
77
78
79
80 FREEDESKTOP.ORG UPDATE-DESKTOP-DATABASE(1)