1XDG-DESKTOP-ICON(1) xdg-desktop-icon Manual XDG-DESKTOP-ICON(1)
2
3
4
6 xdg-desktop-icon - command line tool for (un)installing icons to the
7 desktop
8
10 xdg-desktop-icon install [--novendor] FILE
11
12 xdg-desktop-icon uninstall FILE
13
14 xdg-desktop-icon {--help | --manual | --version}
15
17 The xdg-desktop-icon program can be used to install an application
18 launcher or other file on the desktop of the current user.
19
20 An application launcher is represented by a *.desktop file. Desktop
21 files are defined by the freedesktop.org Desktop Entry Specification.
22 The most important aspects of *.desktop files are summarized below.
23
25 install
26 Installs FILE to the desktop of the current user. FILE can be a
27 *.desktop file or any other type of file.
28
29 uninstall
30 Removes FILE from the desktop of the current user.
31
33 --novendor
34 Normally, xdg-desktop-icon checks to ensure that a *.desktop file
35 to be installed has a vendor prefix. This option can be used to
36 disable that check.
37
38 A vendor prefix consists of alpha characters ([a-zA-Z]) and is
39 terminated with a dash ("-"). Companies and organizations are
40 encouraged to use a word or phrase, preferably the organizations
41 name, for which they hold a trademark as their vendor prefix. The
42 purpose of the vendor prefix is to prevent name conflicts.
43
44 --help
45 Show command synopsis.
46
47 --manual
48 Show this manual page.
49
50 --version
51 Show the xdg-utils version information.
52
54 An application launcher can be added to the desktop by installing a
55 *.desktop file. A *.desktop file consists of a [Desktop Entry] header
56 followed by several Key=Value lines.
57
58 A *.desktop file can provide a name and description for an application
59 in several different languages. This is done by adding a language code
60 as used by LC_MESSAGES in square brackets behind the Key. This way one
61 can specify different values for the same Key depending on the
62 currently selected language.
63
64 The following keys are often used:
65
66 Type=Application
67 This is a mandatory field that indicates that the *.desktop file
68 describes an application launcher.
69
70 Name=Application Name
71 The name of the application. For example Mozilla
72
73 GenericName=Generic Name
74 A generic description of the application. For example Web Browser
75
76 Comment=Comment
77 Optional field to specify a tooltip for the application. For
78 example Visit websites on the Internet
79
80 Icon=Icon File
81 The icon to use for the application. This can either be an absolute
82 path to an image file or an icon-name. If an icon-name is provided
83 an image lookup by name is done in the user's current icon theme.
84 The xdg-icon-resource command can be used to install image files
85 into icon themes. The advantage of using an icon-name instead of an
86 absolute path is that with an icon-name the application icon can be
87 provided in several different sizes as well as in several
88 differently themed styles.
89
90 Exec=Command Line
91 The command line to start the application. If the application can
92 open files the %f placeholder should be specified. When a file is
93 dropped on the application launcher the %f is replaced with the
94 file path of the dropped file. If multiple files can be specified
95 on the command line the %F placeholder should be used instead of
96 %f. If the application is able to open URLs in addition to local
97 files then %u or %U can be used instead of %f or %F.
98
99 For a complete overview of the *.desktop file format please visit
100 http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec
101
103 xdg-desktop-icon honours the following environment variables:
104
105 XDG_UTILS_DEBUG_LEVEL
106 Setting this environment variable to a non-zero numerical value
107 makes xdg-desktop-icon do more verbose reporting on stderr. Setting
108 a higher value increases the verbosity.
109
111 An exit code of 0 indicates success while a non-zero exit code
112 indicates failure. The following failure codes can be returned:
113
114 1
115 Error in command line syntax.
116
117 2
118 One of the files passed on the command line did not exist.
119
120 3
121 A required tool could not be found.
122
123 4
124 The action failed.
125
126 5
127 No permission to read one of the files passed on the command line.
128
130 xdg-icon-resource(1)
131
133 The company ShinyThings Inc. has developed an application named
134 "WebMirror" and would like to add a launcher for for on the desktop.
135 The company will use "shinythings" as its vendor id. In order to add
136 the application to the desktop there needs to be a .desktop file for
137 the application:
138
139 shinythings-webmirror.desktop:
140
141 [Desktop Entry]
142 Encoding=UTF-8
143 Type=Application
144
145 Exec=webmirror
146 Icon=shinythings-webmirror
147
148 Name=WebMirror
149 Name[nl]=WebSpiegel
150
151 Now the xdg-desktop-icon tool can be used to add the webmirror.desktop
152 file to the desktop:
153
154 xdg-desktop-icon install ./shinythings-webmirror.desktop
155
156 To add a README file to the desktop as well, the following command can
157 be used:
158
159 xdg-desktop-icon install ./shinythings-README
160
161
163 Kevin Krammer
164 Author.
165
166 Jeremy White
167 Author.
168
170 Copyright © 2006
171
172
173
174xdg-utils 1.0 05/14/2019 XDG-DESKTOP-ICON(1)