blob: 0b062d2e5ca611583fa3135d41ee01e4eb22bfaa (
plain)
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
'\" t
.\" Title: xdg-desktop-icon
.\" Author: Kevin Krammer
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 12/31/2010
.\" Manual: xdg-desktop-icon Manual
.\" Source: xdg-utils 1.0
.\" Language: English
.\"
.TH "XDG\-DESKTOP\-ICON" "1" "12/31/2010" "xdg-utils 1.0" "xdg-desktop-icon Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
xdg-desktop-icon \- command line tool for (un)installing icons to the desktop
.SH "SYNOPSIS"
.HP \w'\fBxdg\-desktop\-icon\fR\ 'u
\fBxdg\-desktop\-icon\fR install [\fB\-\-novendor\fR] \fIFILE\fR
.HP \w'\fBxdg\-desktop\-icon\fR\ 'u
\fBxdg\-desktop\-icon\fR uninstall \fIFILE\fR
.HP \w'\fBxdg\-desktop\-icon\fR\ 'u
\fBxdg\-desktop\-icon\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
.SH "DESCRIPTION"
.PP
The xdg\-desktop\-icon program can be used to install an application launcher or other file on the desktop of the current user\&.
.PP
An application launcher is represented by a *\&.desktop file\&. Desktop files are defined by the freedesktop\&.org Desktop Entry Specification\&. The most important aspects of *\&.desktop files are summarized below\&.
.SH "COMMANDS"
.PP
install
.RS 4
Installs
\fIFILE\fR
to the desktop of the current user\&.
\fIFILE\fR
can be a *\&.desktop file or any other type of file\&.
.RE
.PP
uninstall
.RS 4
Removes
\fIFILE\fR
from the desktop of the current user\&.
.RE
.SH "OPTIONS"
.PP
\fB\-\-novendor\fR
.RS 4
Normally, xdg\-desktop\-icon checks to ensure that a *\&.desktop file to be installed has a vendor prefix\&. This option can be used to disable that check\&.
.sp
A vendor prefix consists of alpha characters ([a\-zA\-Z]) and is terminated with a dash ("\-")\&. Companies and organizations are encouraged to use a word or phrase, preferably the organizations name, for which they hold a trademark as their vendor prefix\&. The purpose of the vendor prefix is to prevent name conflicts\&.
.RE
.PP
\fB\-\-help\fR
.RS 4
Show command synopsis\&.
.RE
.PP
\fB\-\-manual\fR
.RS 4
Show this manualpage\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Show the xdg\-utils version information\&.
.RE
.SH "DESKTOP FILES"
.PP
An application launcher can be added to the desktop by installing a *\&.desktop file\&. A *\&.desktop file consists of a
\fI[Desktop Entry]\fR
header followed by several
\fIKey\fR=\fIValue\fR
lines\&.
.PP
A *\&.desktop file can provide a name and description for an application in several different languages\&. This is done by adding a language code as used by LC_MESSAGES in square brackets behind the
\fIKey\fR\&. This way one can specify different values for the same
\fIKey\fR
depending on the currently selected language\&.
.PP
The following keys are often used:
.PP
Value=1\&.0
.RS 4
This is a mandatory field to indicate that the *\&.desktop file follows the 1\&.0 version of the specification\&.
.RE
.PP
Type=Application
.RS 4
This is a mandatory field that indicates that the *\&.desktop file describes an application launcher\&.
.RE
.PP
Name=\fIApplication Name\fR
.RS 4
The name of the application\&. For example
\fIMozilla\fR
.RE
.PP
GenericName=\fIGeneric Name\fR
.RS 4
A generic description of the application\&. For example
\fIWeb Browser\fR
.RE
.PP
Comment=\fIComment\fR
.RS 4
Optional field to specify a tooltip for the application\&. For example
\fIVisit websites on the Internet\fR
.RE
.PP
Icon=\fIIcon File\fR
.RS 4
The icon to use for the application\&. This can either be an absolute path to an image file or an icon\-name\&. If an icon\-name is provided an image lookup by name is done in the user\*(Aqs current icon theme\&. The
\fBxdg\-icon\-resource\fR
command can be used to install image files into icon themes\&. The advantage of using an icon\-name instead of an absolute path is that with an icon\-name the application icon can be provided in several different sizes as well as in several differently themed styles\&.
.RE
.PP
Exec=\fICommand Line\fR
.RS 4
The command line to start the application\&. If the application can open files the %f placeholder should be specified\&. When a file is dropped on the application launcher the %f is replaced with the file path of the dropped file\&. If multiple files can be specified on the command line the %F placeholder should be used instead of %f\&. If the application is able to open URLs in addition to local files then %u or %U can be used instead of %f or %F\&.
.RE
.PP
For a complete oveview of the *\&.desktop file format please visit http://www\&.freedesktop\&.org/wiki/Standards/desktop\-entry\-spec
.SH "ENVIRONMENT VARIABLES"
.PP
xdg\-desktop\-icon honours the following environment variables:
.PP
XDG_UTILS_DEBUG_LEVEL
.RS 4
Setting this environment variable to a non\-zero numerical value makes xdg\-desktop\-icon do more verbose reporting on stderr\&. Setting a higher value increases the verbosity\&.
.RE
.SH "EXIT CODES"
.PP
An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
.PP
\fB1\fR
.RS 4
Error in command line syntax\&.
.RE
.PP
\fB2\fR
.RS 4
One of the files passed on the command line did not exist\&.
.RE
.PP
\fB3\fR
.RS 4
A required tool could not be found\&.
.RE
.PP
\fB4\fR
.RS 4
The action failed\&.
.RE
.PP
\fB5\fR
.RS 4
No permission to read one of the files passed on the command line\&.
.RE
.SH "SEE ALSO"
.PP
\fBxdg-icon-resource\fR(1)
.SH "EXAMPLES"
.PP
The company ShinyThings Inc\&. has developed an application named "WebMirror" and would like to add a launcher for for on the desktop\&. The company will use "shinythings" as its vendor id\&. In order to add the application to the desktop there needs to be a \&.desktop file for the application:
.sp
.if n \{\
.RS 4
.\}
.nf
shinythings\-webmirror\&.desktop:
[Desktop Entry]
Encoding=UTF\-8
Type=Application
Exec=webmirror
Icon=shinythings\-webmirror
Name=WebMirror
Name[nl]=WebSpiegel
.fi
.if n \{\
.RE
.\}
.PP
Now the xdg\-desktop\-icon tool can be used to add the webmirror\&.desktop file to the desktop:
.sp
.if n \{\
.RS 4
.\}
.nf
xdg\-desktop\-icon install \&./shinythings\-webmirror\&.desktop
.fi
.if n \{\
.RE
.\}
.PP
To add a README file to the desktop as well, the following command can be used:
.sp
.if n \{\
.RS 4
.\}
.nf
xdg\-desktop\-icon install \&./shinythings\-README
.fi
.if n \{\
.RE
.\}
.sp
.SH "AUTHORS"
.PP
\fBKevin Krammer\fR
.RS 4
Author.
.RE
.PP
\fBJeremy White\fR
.RS 4
Author.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2006
.br
|