OLD | NEW |
(Empty) | |
| 1 <?xml version="1.0"?> |
| 2 <?xml-stylesheet type="text/xsl" |
| 3 href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
"?> |
| 4 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 5 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ |
| 6 ]> |
| 7 <refentry id="xdg-desktop-icon"> |
| 8 <refentryinfo> |
| 9 <title>xdg-desktop-icon Manual</title> |
| 10 <copyright> |
| 11 <year>2006</year> |
| 12 </copyright> |
| 13 <author> |
| 14 <firstname>Kevin</firstname> |
| 15 <surname>Krammer</surname> |
| 16 </author> |
| 17 <address><email>kevin.krammer@gmx.at</email></address> |
| 18 <author> |
| 19 <firstname>Jeremy</firstname> |
| 20 <surname>White</surname> |
| 21 </author> |
| 22 <address><email>jwhite@codeweavers.com</email></address> |
| 23 <releaseinfo>xdg-utils 1.0</releaseinfo> |
| 24 </refentryinfo> |
| 25 |
| 26 <refmeta> |
| 27 <refentrytitle>xdg-desktop-icon</refentrytitle> |
| 28 <manvolnum>1</manvolnum> |
| 29 </refmeta> |
| 30 |
| 31 <refnamediv> |
| 32 <refname>xdg-desktop-icon</refname> |
| 33 <refpurpose>command line tool for (un)installing icons to the desktop</refpu
rpose> |
| 34 </refnamediv> |
| 35 |
| 36 <refsynopsisdiv> |
| 37 <cmdsynopsis> |
| 38 <command>xdg-desktop-icon</command> |
| 39 <arg choice="plain">install</arg> |
| 40 <arg><option>--novendor</option></arg> |
| 41 <arg choice="plain"><replaceable>FILE</replaceable></arg> |
| 42 </cmdsynopsis> |
| 43 <cmdsynopsis> |
| 44 <command>xdg-desktop-icon</command> |
| 45 <arg choice="plain">uninstall</arg> |
| 46 <arg choice="plain"><replaceable>FILE</replaceable></arg> |
| 47 </cmdsynopsis> |
| 48 <cmdsynopsis> |
| 49 <command>xdg-desktop-icon</command> |
| 50 <group choice="req"> |
| 51 <arg choice="plain"><option>--help</option></arg> |
| 52 <arg choice="plain"><option>--manual</option></arg> |
| 53 <arg choice="plain"><option>--version</option></arg> |
| 54 </group> |
| 55 </cmdsynopsis> |
| 56 </refsynopsisdiv> |
| 57 |
| 58 <refsect1 id="description"> |
| 59 <title>Description</title> |
| 60 <para> |
| 61 The xdg-desktop-icon program can be used to install an application launche
r |
| 62 or other file on the desktop of the current user. |
| 63 </para> |
| 64 <para> |
| 65 An application launcher is represented by a *.desktop file. |
| 66 Desktop files are defined by the freedesktop.org Desktop Entry |
| 67 Specification. The most important aspects of *.desktop files |
| 68 are summarized below. |
| 69 </para> |
| 70 </refsect1> |
| 71 <refsect1 id="commands"> |
| 72 <title>Commands</title> |
| 73 <variablelist> |
| 74 <varlistentry> |
| 75 <term>install</term> |
| 76 <listitem> |
| 77 <simpara> |
| 78 Installs <replaceable>FILE</replaceable> to the desktop of the curre
nt user. |
| 79 <replaceable>FILE</replaceable> can be a *.desktop file or any |
| 80 other type of file. |
| 81 </simpara> |
| 82 </listitem> |
| 83 </varlistentry> |
| 84 |
| 85 <varlistentry> |
| 86 <term>uninstall</term> |
| 87 <listitem> |
| 88 <simpara> |
| 89 Removes <replaceable>FILE</replaceable> from the desktop |
| 90 of the current user. |
| 91 </simpara> |
| 92 </listitem> |
| 93 </varlistentry> |
| 94 </variablelist> |
| 95 </refsect1> |
| 96 <refsect1 id="options"> |
| 97 <title>Options</title> |
| 98 <variablelist> |
| 99 <varlistentry> |
| 100 <term><option>--novendor</option></term> |
| 101 <listitem> |
| 102 <simpara> |
| 103 Normally, xdg-desktop-icon checks to ensure that a *.desktop file |
| 104 to be installed has a vendor prefix. This option can be |
| 105 used to disable that check. |
| 106 </simpara> |
| 107 <simpara> |
| 108 A vendor prefix consists of alpha characters ([a-zA-Z]) and is |
| 109 terminated with a dash ("-"). |
| 110 Companies and organizations are encouraged to use a word |
| 111 or phrase, preferably the organizations name, for which they hold |
| 112 a trademark as their vendor prefix. |
| 113 The purpose of the vendor prefix is to prevent name conflicts. |
| 114 </simpara> |
| 115 </listitem> |
| 116 </varlistentry> |
| 117 |
| 118 <varlistentry> |
| 119 <term><option>--help</option></term> |
| 120 <listitem> |
| 121 <simpara> |
| 122 Show command synopsis. |
| 123 </simpara> |
| 124 </listitem> |
| 125 </varlistentry> |
| 126 |
| 127 <varlistentry> |
| 128 <term><option>--manual</option></term> |
| 129 <listitem> |
| 130 <simpara> |
| 131 Show this manualpage. |
| 132 </simpara> |
| 133 </listitem> |
| 134 </varlistentry> |
| 135 |
| 136 <varlistentry> |
| 137 <term><option>--version</option></term> |
| 138 <listitem> |
| 139 <simpara> |
| 140 Show the xdg-utils version information. |
| 141 </simpara> |
| 142 </listitem> |
| 143 </varlistentry> |
| 144 |
| 145 </variablelist> |
| 146 </refsect1> |
| 147 <refsect1 id="desktopfiles"> |
| 148 <title>Desktop Files</title> |
| 149 <para> |
| 150 An application launcher can be added to the desktop by installing a |
| 151 *.desktop file. A *.desktop file consists of a |
| 152 <emphasis>[Desktop Entry]</emphasis> header followed by several |
| 153 <replaceable>Key</replaceable>=<replaceable>Value</replaceable> lines. |
| 154 </para> |
| 155 <para> |
| 156 A *.desktop file can provide a name and description for an application |
| 157 in several different languages. This is done by adding a language |
| 158 code as used by LC_MESSAGES in square brackets behind the |
| 159 <replaceable>Key</replaceable>. This way one can specify different |
| 160 values for the same <replaceable>Key</replaceable> depending on the |
| 161 currently selected language. |
| 162 </para> |
| 163 <para> |
| 164 The following keys are often used: |
| 165 </para> |
| 166 <variablelist> |
| 167 <varlistentry> |
| 168 <term>Value=1.0</term> |
| 169 <listitem> |
| 170 <simpara> |
| 171 This is a mandatory field to indicate that the *.desktop file |
| 172 follows the 1.0 version of the specification. |
| 173 </simpara> |
| 174 </listitem> |
| 175 </varlistentry> |
| 176 |
| 177 <varlistentry> |
| 178 <term>Type=Application</term> |
| 179 <listitem> |
| 180 <simpara> |
| 181 This is a mandatory field that indicates that the *.desktop file |
| 182 describes an application launcher. |
| 183 </simpara> |
| 184 </listitem> |
| 185 </varlistentry> |
| 186 |
| 187 <varlistentry> |
| 188 <term>Name=<replaceable>Application Name</replaceable></term> |
| 189 <listitem> |
| 190 <simpara> |
| 191 The name of the application. |
| 192 For example <emphasis>Mozilla</emphasis> |
| 193 </simpara> |
| 194 </listitem> |
| 195 </varlistentry> |
| 196 |
| 197 <varlistentry> |
| 198 <term>GenericName=<replaceable>Generic Name</replaceable></term> |
| 199 <listitem> |
| 200 <simpara> |
| 201 A generic description of the application. |
| 202 For example <emphasis>Web Browser</emphasis> |
| 203 </simpara> |
| 204 </listitem> |
| 205 </varlistentry> |
| 206 |
| 207 <varlistentry> |
| 208 <term>Comment=<replaceable>Comment</replaceable></term> |
| 209 <listitem> |
| 210 <simpara> |
| 211 Optional field to specify a tooltip for the application. |
| 212 For example <emphasis>Visit websites on the Internet</emphasis> |
| 213 </simpara> |
| 214 </listitem> |
| 215 </varlistentry> |
| 216 |
| 217 <varlistentry> |
| 218 <term>Icon=<replaceable>Icon File</replaceable></term> |
| 219 <listitem> |
| 220 <simpara> |
| 221 The icon to use for the application. This can either be |
| 222 an absolute path to an image file or an icon-name. |
| 223 If an icon-name is provided an image lookup by name is done |
| 224 in the user's current icon theme. The <command>xdg-icon-resource</co
mmand> |
| 225 command can be used to install image files into icon themes. |
| 226 The advantage of using an icon-name instead of an absolute |
| 227 path is that with an icon-name the application icon can be |
| 228 provided in several different sizes as well as in several |
| 229 differently themed styles. |
| 230 </simpara> |
| 231 </listitem> |
| 232 </varlistentry> |
| 233 |
| 234 <varlistentry> |
| 235 <term>Exec=<replaceable>Command Line</replaceable></term> |
| 236 <listitem> |
| 237 <simpara> |
| 238 The command line to start the application. If the application |
| 239 can open files the %f placeholder should be specified. When |
| 240 a file is dropped on the application launcher the %f is replaced |
| 241 with the file path of the dropped file. If multiple files |
| 242 can be specified on the command line the %F placeholder should |
| 243 be used instead of %f. If the application is able to open URLs |
| 244 in addition to local files then %u or %U can be used instead |
| 245 of %f or %F. |
| 246 </simpara> |
| 247 </listitem> |
| 248 </varlistentry> |
| 249 </variablelist> |
| 250 <para> |
| 251 For a complete oveview of the *.desktop file format please |
| 252 visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec |
| 253 </para> |
| 254 </refsect1> |
| 255 <refsect1 id="env_vars"> |
| 256 <title>Environment Variables</title> |
| 257 <para> |
| 258 xdg-desktop-icon honours the following environment variables: |
| 259 </para> |
| 260 <variablelist> |
| 261 <varlistentry> |
| 262 <term>XDG_UTILS_DEBUG_LEVEL</term> |
| 263 <listitem> |
| 264 <simpara> |
| 265 Setting this environment variable to a non-zero numerical value |
| 266 makes xdg-desktop-icon do more verbose reporting on stderr. |
| 267 Setting a higher value increases the verbosity. |
| 268 </simpara> |
| 269 </listitem> |
| 270 </varlistentry> |
| 271 </variablelist> |
| 272 </refsect1> |
| 273 <refsect1 id="exitcodes"> |
| 274 <title>Exit Codes</title> |
| 275 <para> |
| 276 An exit code of 0 indicates success while a non-zero exit code |
| 277 indicates failure. The following failure codes can be returned: |
| 278 </para> |
| 279 <variablelist> |
| 280 <varlistentry> |
| 281 <term><option>1</option></term> |
| 282 <listitem> |
| 283 <simpara> |
| 284 Error in command line syntax. |
| 285 </simpara> |
| 286 </listitem> |
| 287 </varlistentry> |
| 288 <varlistentry> |
| 289 <term><option>2</option></term> |
| 290 <listitem> |
| 291 <simpara> |
| 292 One of the files passed on the command line did not exist. |
| 293 </simpara> |
| 294 </listitem> |
| 295 </varlistentry> |
| 296 <varlistentry> |
| 297 <term><option>3</option></term> |
| 298 <listitem> |
| 299 <simpara> |
| 300 A required tool could not be found. |
| 301 </simpara> |
| 302 </listitem> |
| 303 </varlistentry> |
| 304 <varlistentry> |
| 305 <term><option>4</option></term> |
| 306 <listitem> |
| 307 <simpara> |
| 308 The action failed. |
| 309 </simpara> |
| 310 </listitem> |
| 311 </varlistentry> |
| 312 <varlistentry> |
| 313 <term><option>5</option></term> |
| 314 <listitem> |
| 315 <simpara> |
| 316 No permission to read one of the files passed on the command |
| 317 line. |
| 318 </simpara> |
| 319 </listitem> |
| 320 </varlistentry> |
| 321 </variablelist> |
| 322 </refsect1> |
| 323 <refsect1 id="seealso"> |
| 324 <title>See Also</title> |
| 325 <para><citerefentry><refentrytitle>xdg-icon-resource</refentrytitle> |
| 326 <manvolnum>1</manvolnum> |
| 327 </citerefentry> |
| 328 </para> |
| 329 </refsect1> |
| 330 <refsect1 id="examples"> |
| 331 <title>Examples</title> |
| 332 <para> |
| 333 The company ShinyThings Inc. has developed an application named |
| 334 "WebMirror" and would like to add a launcher for for on the desktop. |
| 335 The company will use "shinythings" as its vendor id. |
| 336 In order to add the application to the desktop there needs to be a |
| 337 .desktop file for the application: |
| 338 <programlisting> |
| 339 shinythings-webmirror.desktop: |
| 340 |
| 341 [Desktop Entry] |
| 342 Encoding=UTF-8 |
| 343 Type=Application |
| 344 |
| 345 Exec=webmirror |
| 346 Icon=shinythings-webmirror |
| 347 |
| 348 Name=WebMirror |
| 349 Name[nl]=WebSpiegel |
| 350 </programlisting> |
| 351 </para> |
| 352 <para>Now the xdg-desktop-icon tool can be used to add the webmirror.desktop
file |
| 353 to the desktop: |
| 354 <programlisting> |
| 355 xdg-desktop-icon install ./shinythings-webmirror.desktop |
| 356 </programlisting> |
| 357 </para> |
| 358 <para>To add a README file to the desktop as well, the following command can
be used: |
| 359 <programlisting> |
| 360 xdg-desktop-icon install ./shinythings-README |
| 361 </programlisting> |
| 362 </para> |
| 363 </refsect1> |
| 364 </refentry> |
OLD | NEW |