OLD | NEW |
(Empty) | |
| 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859
-1"><title>xdg-desktop-icon</title><meta name="generator" content="DocBook XSL S
tylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vli
nk="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-deskto
p-icon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p
>xdg-desktop-icon — command line tool for (un)installing icons to the desk
top</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsi
s"><p><code class="command">xdg-desktop-icon</code> install [<code class="opt
ion">--novendor</code>] <em class="replaceable"><code>FILE</code></em> </p></di
v><div class="cmdsynopsis"><p><code class="command">xdg-desktop-icon</code> un
install <em class="replaceable"><code>FILE</code></em> </p></div><div class="c
mdsynopsis"><p><code class="command">xdg-desktop-icon</code> { <code class="opt
ion">--help</code> | <code class="option">--manual</code> | <code class="o
ption">--version</code> }</p></div></div><div class="refsect1" lang="en"><a name
="description"></a><h2>Description</h2><p> |
| 2 The xdg-desktop-icon program can be used to install an application launche
r |
| 3 or other file on the desktop of the current user. |
| 4 </p><p> |
| 5 An application launcher is represented by a *.desktop file. |
| 6 Desktop files are defined by the freedesktop.org Desktop Entry |
| 7 Specification. The most important aspects of *.desktop files |
| 8 are summarized below. |
| 9 </p></div><div class="refsect1" lang="en"><a name="commands"></a><h2>Command
s</h2><div class="variablelist"><dl><dt><span class="term">install</span></dt><d
d> |
| 10 Installs <em class="replaceable"><code>FILE</code></em> to the deskt
op of the current user. |
| 11 <em class="replaceable"><code>FILE</code></em> can be a *.desktop fi
le or any |
| 12 other type of file. |
| 13 </dd><dt><span class="term">uninstall</span></dt><dd> |
| 14 Removes <em class="replaceable"><code>FILE</code></em> from the desk
top |
| 15 of the current user. |
| 16 </dd></dl></div></div><div class="refsect1" lang="en"><a name="options
"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code
class="option">--novendor</code></span></dt><dd><p> |
| 17 Normally, xdg-desktop-icon checks to ensure that a *.desktop file |
| 18 to be installed has a vendor prefix. This option can be |
| 19 used to disable that check. |
| 20 </p><p> |
| 21 A vendor prefix consists of alpha characters ([a-zA-Z]) and is |
| 22 terminated with a dash ("-"). |
| 23 Companies and organizations are encouraged to use a word |
| 24 or phrase, preferably the organizations name, for which they hold |
| 25 a trademark as their vendor prefix. |
| 26 The purpose of the vendor prefix is to prevent name conflicts. |
| 27 </p></dd><dt><span class="term"><code class="option">--help</code></sp
an></dt><dd> |
| 28 Show command synopsis. |
| 29 </dd><dt><span class="term"><code class="option">--manual</code></span
></dt><dd> |
| 30 Show this manualpage. |
| 31 </dd><dt><span class="term"><code class="option">--version</code></spa
n></dt><dd> |
| 32 Show the xdg-utils version information. |
| 33 </dd></dl></div></div><div class="refsect1" lang="en"><a name="desktop
files"></a><h2>Desktop Files</h2><p> |
| 34 An application launcher can be added to the desktop by installing a |
| 35 *.desktop file. A *.desktop file consists of a |
| 36 <span class="emphasis"><em>[Desktop Entry]</em></span> header followed by
several |
| 37 <em class="replaceable"><code>Key</code></em>=<em class="replaceable"><cod
e>Value</code></em> lines. |
| 38 </p><p> |
| 39 A *.desktop file can provide a name and description for an application |
| 40 in several different languages. This is done by adding a language |
| 41 code as used by LC_MESSAGES in square brackets behind the |
| 42 <em class="replaceable"><code>Key</code></em>. This way one can specify di
fferent |
| 43 values for the same <em class="replaceable"><code>Key</code></em> dependin
g on the |
| 44 currently selected language. |
| 45 </p><p> |
| 46 The following keys are often used: |
| 47 </p><div class="variablelist"><dl><dt><span class="term">Value=1.0</span></d
t><dd> |
| 48 This is a mandatory field to indicate that the *.desktop file |
| 49 follows the 1.0 version of the specification. |
| 50 </dd><dt><span class="term">Type=Application</span></dt><dd> |
| 51 This is a mandatory field that indicates that the *.desktop file |
| 52 describes an application launcher. |
| 53 </dd><dt><span class="term">Name=<em class="replaceable"><code>Applica
tion Name</code></em></span></dt><dd> |
| 54 The name of the application. |
| 55 For example <span class="emphasis"><em>Mozilla</em></span> |
| 56 </dd><dt><span class="term">GenericName=<em class="replaceable"><code>
Generic Name</code></em></span></dt><dd> |
| 57 A generic description of the application. |
| 58 For example <span class="emphasis"><em>Web Browser</em></span> |
| 59 </dd><dt><span class="term">Comment=<em class="replaceable"><code>Comm
ent</code></em></span></dt><dd> |
| 60 Optional field to specify a tooltip for the application. |
| 61 For example <span class="emphasis"><em>Visit websites on the Interne
t</em></span> |
| 62 </dd><dt><span class="term">Icon=<em class="replaceable"><code>Icon Fi
le</code></em></span></dt><dd> |
| 63 The icon to use for the application. This can either be |
| 64 an absolute path to an image file or an icon-name. |
| 65 If an icon-name is provided an image lookup by name is done |
| 66 in the user's current icon theme. The <span><strong class="command">
xdg-icon-resource</strong></span> |
| 67 command can be used to install image files into icon themes. |
| 68 The advantage of using an icon-name instead of an absolute |
| 69 path is that with an icon-name the application icon can be |
| 70 provided in several different sizes as well as in several |
| 71 differently themed styles. |
| 72 </dd><dt><span class="term">Exec=<em class="replaceable"><code>Command
Line</code></em></span></dt><dd> |
| 73 The command line to start the application. If the application |
| 74 can open files the %f placeholder should be specified. When |
| 75 a file is dropped on the application launcher the %f is replaced |
| 76 with the file path of the dropped file. If multiple files |
| 77 can be specified on the command line the %F placeholder should |
| 78 be used instead of %f. If the application is able to open URLs |
| 79 in addition to local files then %u or %U can be used instead |
| 80 of %f or %F. |
| 81 </dd></dl></div><p> |
| 82 For a complete oveview of the *.desktop file format please |
| 83 visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec |
| 84 </p></div><div class="refsect1" lang="en"><a name="env_vars"></a><h2>Environ
ment Variables</h2><p> |
| 85 xdg-desktop-icon honours the following environment variables: |
| 86 </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEV
EL</span></dt><dd> |
| 87 Setting this environment variable to a non-zero numerical value |
| 88 makes xdg-desktop-icon do more verbose reporting on stderr. |
| 89 Setting a higher value increases the verbosity. |
| 90 </dd></dl></div></div><div class="refsect1" lang="en"><a name="exitcod
es"></a><h2>Exit Codes</h2><p> |
| 91 An exit code of 0 indicates success while a non-zero exit code |
| 92 indicates failure. The following failure codes can be returned: |
| 93 </p><div class="variablelist"><dl><dt><span class="term"><code class="option
">1</code></span></dt><dd> |
| 94 Error in command line syntax. |
| 95 </dd><dt><span class="term"><code class="option">2</code></span></dt><
dd> |
| 96 One of the files passed on the command line did not exist. |
| 97 </dd><dt><span class="term"><code class="option">3</code></span></dt><
dd> |
| 98 A required tool could not be found. |
| 99 </dd><dt><span class="term"><code class="option">4</code></span></dt><
dd> |
| 100 The action failed. |
| 101 </dd><dt><span class="term"><code class="option">5</code></span></dt><
dd> |
| 102 No permission to read one of the files passed on the command |
| 103 line. |
| 104 </dd></dl></div></div><div class="refsect1" lang="en"><a name="seealso
"></a><h2>See Also</h2><p><span class="citerefentry"><span class="refentrytitle"
>xdg-icon-resource</span>(1)</span> |
| 105 </p></div><div class="refsect1" lang="en"><a name="examples"></a><h2>Example
s</h2><p> |
| 106 The company ShinyThings Inc. has developed an application named |
| 107 "WebMirror" and would like to add a launcher for for on the desktop. |
| 108 The company will use "shinythings" as its vendor id. |
| 109 In order to add the application to the desktop there needs to be a |
| 110 .desktop file for the application: |
| 111 </p><pre class="programlisting"> |
| 112 shinythings-webmirror.desktop: |
| 113 |
| 114 [Desktop Entry] |
| 115 Encoding=UTF-8 |
| 116 Type=Application |
| 117 |
| 118 Exec=webmirror |
| 119 Icon=shinythings-webmirror |
| 120 |
| 121 Name=WebMirror |
| 122 Name[nl]=WebSpiegel |
| 123 </pre><p> |
| 124 </p><p>Now the xdg-desktop-icon tool can be used to add the webmirror.deskto
p file |
| 125 to the desktop: |
| 126 </p><pre class="programlisting"> |
| 127 xdg-desktop-icon install ./shinythings-webmirror.desktop |
| 128 </pre><p> |
| 129 </p><p>To add a README file to the desktop as well, the following command ca
n be used: |
| 130 </p><pre class="programlisting"> |
| 131 xdg-desktop-icon install ./shinythings-README |
| 132 </pre><p> |
| 133 </p></div></div></body></html> |
OLD | NEW |