man-pages/man1/update-desktop-database.1.html
2021-03-31 01:06:50 +01:00

132 lines
3.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of UPDATE-DESKTOP-DATABASE</TITLE>
</HEAD><BODY>
<H1>UPDATE-DESKTOP-DATABASE</H1>
Section: User Commands (1)<BR>Updated: FREEDESKTOP.ORG<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
update-desktop-database - Build cache database of MIME types handled by
desktop files
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>update-desktop-database [-q|--quiet] [-v|--verbose] [DIRECTORY...]</B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The <I>update-desktop-database</I> program is a tool to build a cache
database of the MIME types handled by desktop files.
<P>
The cache database contains the list of MIME types that can be handled
by desktop files, as well as, for each MIME type, a list of desktop
files that can handle this MIME type. This cache database ease the work
of applications that need to find an application that can open a
document of a specific MIME type: those applications will not have to
parse all the desktop files existing on the system, and can instead
parse this cache database.
<P>
If no <I>DIRECTORY</I> is specified as argument, the desktop files that
will be processed are the ones installed in
<B>$XDG_DATA_DIRS/applications</B>.
<P>
If both the <I>--quiet</I> and <I>--verbose</I> options are used, then
<I>--verbose</I> will be ignored.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
The following options are supported:
<DL COMPACT>
<DT id="1"><I>-q, --quiet</I>
<DD>
Do not display any information about processing and updating progress.
<DT id="2"><I>-v, --verbose</I>
<DD>
Display more information about processing and updating progress.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>NOTES</H2>
<P>
If an invalid MIME type is met, it will be ignored and the creation of
the cache database will continue.
<P>
The format of the cache database is a simple desktop entry format, with
a <B>MIME Cache</B> 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.
<P>
The order of the desktop files found for a MIME type is not significant.
Therefore, an external mechanism must be used to determine what is the
preferred desktop file for a MIME type.
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLE</H2>
Here is a simple example of a cache database:
<DL COMPACT>
<DT id="3"><DD>
<BR>&nbsp;[MIME&nbsp;Cache]
<BR>&nbsp;application/x-shellscript=gedit.desktop;
<BR>&nbsp;text/plain=gedit.desktop;gvim.desktop;
<BR>&nbsp;video/webm=totem.desktop;
</DL>
<P>
This cache database is created with three desktop files, each containing
a <B>MimeType</B> key:
<DL COMPACT>
<DT id="4"><DD>
<BR>&nbsp;<B>gedit.desktop</B>:&nbsp;MimeType=text/plain;application/x-shellscript;
<BR>&nbsp;<B>gvim.desktop</B>:&nbsp;MimeType=text/plain;
<BR>&nbsp;<B>totem.desktop</B>:&nbsp;MimeType=video/webm;
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>FILES</H2>
<P>
<B>$XDG_DATA_DIRS/applications/mimeinfo.cache</B>
<DL COMPACT>
<DT id="5"><DD>
This file is the cache database created by <I>update-desktop-database</I>.
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>BUGS</H2>
If you find bugs in the <I>update-desktop-database</I> program, please
report these on <A HREF="https://bugs.freedesktop.org.">https://bugs.freedesktop.org.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="9"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="10"><A HREF="#lbAF">NOTES</A><DD>
<DT id="11"><A HREF="#lbAG">EXAMPLE</A><DD>
<DT id="12"><A HREF="#lbAH">FILES</A><DD>
<DT id="13"><A HREF="#lbAI">BUGS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:29 GMT, March 31, 2021
</BODY>
</HTML>