blob: 323ef50a19b9e295bcdaaa7b5b345db10e45ed07 (
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
|
.\" ** You probably do not want to edit this file directly **
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "XDG\-DESKTOP\-ICON" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
xdg\-desktop\-icon \- command line tool for (un)installing icons to the desktop
.SH "SYNOPSIS"
.HP 17
\fBxdg\-desktop\-icon\fR install [\fB\-\-novendor\fR] \fIFILE\fR
.HP 17
\fBxdg\-desktop\-icon\fR uninstall \fIFILE\fR
.HP 17
\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"
.TP
install
Installs
\fIFILE\fR
to the desktop of the current user.
\fIFILE\fR
can be a *.desktop file or any other type of file.
.TP
uninstall
Removes
\fIFILE\fR
from the desktop of the current user.
.SH "OPTIONS"
.TP
\fB\-\-novendor\fR
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.
.TP
\fB\-\-help\fR
Show command synopsis.
.TP
\fB\-\-manual\fR
Show this manualpage.
.TP
\fB\-\-version\fR
Show the xdg\-utils version information.
.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:
.TP
Value=1.0
This is a mandatory field to indicate that the *.desktop file follows the 1.0 version of the specification.
.TP
Type=Application
This is a mandatory field that indicates that the *.desktop file describes an application launcher.
.TP
Name=\fIApplication Name\fR
The name of the application. For example
\fIMozilla\fR
.TP
GenericName=\fIGeneric Name\fR
A generic description of the application. For example
\fIWeb Browser\fR
.TP
Comment=\fIComment\fR
Optional field to specify a tooltip for the application. For example
\fIVisit websites on the Internet\fR
.TP
Icon=\fIIcon File\fR
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's 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.
.TP
Exec=\fICommand Line\fR
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.
.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:
.TP
XDG_UTILS_DEBUG_LEVEL
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.
.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:
.TP
\fB1\fR
Error in command line syntax.
.TP
\fB2\fR
One of the files passed on the command line did not exist.
.TP
\fB3\fR
A required tool could not be found.
.TP
\fB4\fR
The action failed.
.TP
\fB5\fR
No permission to read one of the files passed on the command line.
.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
.nf
shinythings\-webmirror.desktop:
[Desktop Entry]
Encoding=UTF\-8
Type=Application
Exec=webmirror
Icon=shinythings\-webmirror
Name=WebMirror
Name[nl]=WebSpiegel
.fi
.sp
.PP
Now the xdg\-desktop\-icon tool can be used to add the webmirror.desktop file to the desktop:
.sp
.nf
xdg\-desktop\-icon install ./shinythings\-webmirror.desktop
.fi
.sp
.PP
To add a README file to the desktop as well, the following command can be used:
.sp
.nf
xdg\-desktop\-icon install ./shinythings\-README
.fi
.sp
.SH "AUTHOR"
Kevin Krammer, Jeremy White.
.br
<kevin.krammer@gmx.at>
.br
<jwhite@codeweavers.com>
|