1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
.\"
.\" desktop-file-install manual page.
.\" (C) 2010 Vincent Untz (vuntz@gnome.org)
.\"
.TH DESKTOP-FILE-INSTALL 1 FREEDESKTOP.ORG
.SH NAME
desktop-file-install \- Install desktop files
.SH SYNOPSIS
.B desktop-file-install [\-\-delete-original] [\-\-dir=DIR]
.B [\-m MODE|\-\-mode=MODE] [\-\-vendor=VENDOR] [\-\-rebuild-mime-info-cache]
.B [EDITOPTION]... FILE...
.SH DESCRIPTION
The \fIdesktop-file-install\fP program is a tool to install desktop
files. It is mostly useful for developers and packagers. Various
operations to edit the files can be realized thanks to the available
options.
.PP
\fIdesktop-file-install\fP will always try to validate the resulting
desktop file, and if it fails to do so, the installation will be
aborted.
.PP
The list of registered categories and desktop environments is defined in
the Menu specification:
\fIhttp://freedesktop.org/wiki/Specifications/menu-spec\fP.
.SH OPTIONS
The following options are supported:
.TP
.I --delete-original
Delete the source desktop files, leaving only the target files.
Effectively "renames" the desktop files.
.TP
.I --dir=DIR
Install desktop files to the \fIDIR\fP directory.
.TP
.I -m, --mode=MODE
Set the permissions of the destination files to \fIMODE\fP.
.TP
.I --vendor=VENDOR
Add a vendor prefix to the desktop files. If a file already has this
prefix, nothing happens; else, the file will be named
\fIVENDOR\fP-\fIFILE\fP. For example: if \fIVENDOR\fP is
\fBfreedesktop.org\fP and \fIFILE\fP is \fBspecification.desktop\fP, the
result file will be \fBfreedesktop.org-specification.desktop\fP.
.TP
.I --rebuild-mime-info-cache
Rebuild the MIME types application database after installing the desktop
files. See \fIupdate-desktop-database(1)\fP for information about this
database.
.PP
Various options are available to edit the desktop files. All of them can
be specified more than once:
.TP
.I --copy-name-to-generic-name
Copy the value of the \fBName\fP key to the \fBGenericName\fP key. Note
that a desktop file requires a \fBName\fP key to be valid, so this
option will always have an effect.
.TP
.I --copy-generic-name-to-name
Copy the value of the \fBGenericName\fP key to the \fBName\fP key, if
the \fBGenericName\fP key is present.
.TP
.I --remove-key=KEY
Remove the \fIKEY\fP key from the desktop files, if present.
.TP
.I --add-category=CATEGORY
Add \fICATEGORY\fP to the list of categories (key \fBCategories\fP). If
\fICATEGORY\fP was already present in the list, this operation is a
no-op. A non-registered category should be prefixed with \fBX-\fP.
.TP
.I --remove-category=CATEGORY
Remove \fICATEGORY\fP from the list of categories (key
\fBCategories\fP). If \fICATEGORY\fP was not present in the list, this
operation is a no-op.
.TP
.I --add-mime-type=MIME-TYPE
Add \fIMIME-TYPE\fP to the list of MIME types (key \fBMimeType\fP). If
\fIMIME-TYPE\fP was already present in the list, this operation is a
no-op.
.TP
.I --remove-mime-type=MIME-TYPE
Remove \fIMIME-TYPE\fP from the list of MIME types (key \fBMimeType\fP).
If \fIMIME-TYPE\fP was not present in the list, this operation is a
no-op.
.TP
.I --add-only-show-in=ENVIRONMENT
Add \fIENVIRONMENT\fP to the list of desktop environment where the
desktop files should be displayed (key \fBOnlyShowIn\fP). If
\fIENVIRONMENT\fP was already present in the list, this operation is a
no-op. A non-registered desktop environment should be prefixed with
\fBX-\fP. Note that an empty \fBOnlyShowIn\fP key in a desktop file
means that the desktop file will be displayed in all environments.
.TP
.I --remove-only-show-in=ENVIRONMENT
Remove \fIENVIRONMENT\fP from the list of desktop environment where the
desktop files should be displayed (key \fBOnlyShowIn\fP). If
\fIENVIRONMENT\fP was not present in the list, this operation is a
no-op.
.SH ENVIRONMENT
Some environment variables change the behavior of
\fIdesktop-file-install\fP:
.PP
.B DESKTOP_FILE_VENDOR
.IP
This variable can be used as an alternative to the \fI--vendor\fP
option. If the \fI--vendor\fP option is used, this environment variable
will be ignored.
.PP
.B DESKTOP_FILE_INSTALL_DIR
.IP
This variable can be used as an alternative to the \fI--dir\fP
option. If the \fI--dir\fP option is used, this environment variable
will be ignored.
.SH BUGS
If you find bugs in the \fIdesktop-file-install\fP program, please report
these on https://bugs.freedesktop.org.
.SH SEE ALSO
.BR desktop-file-validate(1)
.BR update-desktop-database(1)
|