UPDATE-DESKTOP-DATABASE(1)
โจ NAME โจ
okay so bestie, update-desktop-database โ it builds a cache database of MIME types handled by desktop files. that's the whole vibe ๐
๐ธ SYNOPSIS ๐ธ
update-desktop-database [-q|--quiet] [-v|--verbose] [DIRECTORY...]
๐ DESCRIPTION ๐
so update-desktop-database is the little tool that builds a cache database of the MIME types handled by desktop files. it's giving "backend bestie doing the quiet work so everything else looks effortless" ๐ซถ
what's actually in that cache database? two things, no cap:
- the list of MIME types that can be handled by desktop files
- and for each MIME type, the list of desktop files that can handle that MIME type
why do we care?? because it makes life so much easier for apps that need to find an app to open a document of a specific MIME type. without this, they'd have to parse all the desktop files existing on the system ๐ญ with it, they just parse this cache database instead. iconic behaviour honestly.
if you don't pass any DIRECTORY as an argument, the desktop files that get processed are the ones installed in $XDG_DATA_DIRS/applications. default queen ๐
and if you use both --quiet and --verbose at the same time?? then --verbose will be ignored. periodt. ๐
โจ OPTIONS โจ
the following options are supported:
-q,--quietโ do not display any information about processing and updating progress. silent mode, no thoughts head empty ๐คซ-v,--verboseโ display more information about processing and updating progress. tell me EVERYTHING ๐ฅ
๐ฆ NOTES ๐ฆ
if an invalid MIME type is met, it will be ignored and the creation of the cache database will continue. she does not stop for drama ๐
the format of the cache database is a simple desktop entry format, with a MIME Cache group, containing one key per MIME type. the key name is the MIME type, and the key value is the list of desktop file that can handle this MIME type.
the order of the desktop files found for a MIME type is not significant. so an external mechanism must be used to determine what is the preferred desktop file for a MIME type. no ranking here, everyone's equal ๐
๐ EXAMPLE ๐
here's a simple example of a cache database:
[MIME Cache]
application/x-shellscript=gedit.desktop;
text/plain=gedit.desktop;gvim.desktop;
video/webm=totem.desktop;
this cache database is created with three desktop files, each containing a MimeType key:
gedit.desktop: MimeType=text/plain;application/x-shellscript;
gvim.desktop: MimeType=text/plain;
totem.desktop: MimeType=video/webm;
look at her go ๐งโจ
๐ FILES ๐
$XDG_DATA_DIRS/applications/mimeinfo.cacheโ this file is the cache database created byupdate-desktop-database. the main character file, lowkey.
๐ BUGS ๐
if you find bugs in the update-desktop-database program, please report these on https://bugs.freedesktop.org. tell them everything, they're listening ๐ซถ
ok that's the whole page bestie, go forth and cache ๐
FREEDESKTOP.ORG made this one, and it's filed under UPDATE-DESKTOP-DATABASE(1) in the General Commands Manual โ so like, freedesktop dot org and the manual page name, that's the whole sign-off. mwah ๐โญ
๐ฆ where this page comes from
- alpine 3.24: desktop-file-utils-doc 0.28-r0 ยท GPL-2.0-or-later
- arch rolling: desktop-file-utils 0.28-1 ยท GPL-2.0-or-later
- centos-stream 10: desktop-file-utils 0.26-15.el10 ยท GPL-2.0-or-later
- centos-stream 9: desktop-file-utils 0.26-6.el9 ยท GPLv2+
- debian bookworm: desktop-file-utils 0.26-1 ยท GPL-2.0-or-later
- debian trixie: desktop-file-utils 0.28-1 ยท GPL-2.0-or-later
- fedora 43: desktop-file-utils 0.28-2.fc43 ยท GPL-2.0-or-later
- fedora 44: desktop-file-utils 0.28-5.fc44 ยท GPL-2.0-or-later
- nixos 26.05: desktop-file-utils 0.28
- nixpkgs unstable: desktop-file-utils 0.28
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: desktop-file-utils 0.28-160000.2.2 ยท GPL-2.0-or-later
- ubuntu jammy: desktop-file-utils 0.26-1ubuntu3 ยท GPL-2.0-or-later
- ubuntu noble: desktop-file-utils 0.27-2build1 ยท GPL-2.0-or-later
- ubuntu questing: desktop-file-utils 0.28-1
- ubuntu resolute: desktop-file-utils 0.28-1build1 ยท GPL-2.0-or-later
- ubuntu stonking: desktop-file-utils 0.28-1build1 ยท GPL-2.0-or-later
- (C) 2010 Vincent Untz (vuntz@gnome.org)
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms