summaryrefslogtreecommitdiff
path: root/scripts/html/xdg-desktop.html
blob: 3e96d88d4a101d6049307a7cde9480fe1b059749 (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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-desktop</title><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-desktop"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-desktop &#8212; command line tool for (un)installing icons to the desktop</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-desktop</code>   install  [<code class="option">--vendor <em class="replaceable"><code>vendor-id</code></em></code>]  <em class="replaceable"><code>FILE</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop</code>   uninstall  [<code class="option">--vendor <em class="replaceable"><code>vendor-id</code></em></code>]  <em class="replaceable"><code>FILE</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop</code>  { <code class="option">--help</code>  |   <code class="option">--manual</code>  |   <code class="option">--version</code> }</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
      The xdg-desktop program can be used to install an application launcher
      or other file on the desktop of the current user.
    </p><p>
      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.
    </p></div><div class="refsect1" lang="en"><a name="commands"></a><h2>Commands</h2><div class="variablelist"><dl><dt><span class="term">install</span></dt><dd>
	    Installs <em class="replaceable"><code>FILE</code></em> to the desktop of the current user.
	  </dd><dt><span class="term">uninstall</span></dt><dd>
	    Removes <em class="replaceable"><code>FILE</code></em> from the desktop
            of the current user.
	  </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">--vendor</code> <em class="replaceable"><code>vendor-id</code></em></span></dt><dd>
	    Adds <em class="replaceable"><code>vendor-id</code></em> as a prefix when installing desktop
            files.
	  </dd><dt><span class="term"><code class="option">--help</code></span></dt><dd>
	    Show command synopsis.
	  </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
	    Show this manualpage.
	  </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
            Show the xdg-utils version information.
          </dd></dl></div></div><div class="refsect1" lang="en"><a name="desktopfiles"></a><h2>Desktop Files</h2><p>
      An application launcher can be added to the desktop by installing a
      *.desktop file. A *.desktop file consists of a
      <span class="emphasis"><em>[Desktop Entry]</em></span> header followed by several
      <em class="replaceable"><code>Key</code></em>=<em class="replaceable"><code>Value</code></em> lines.
    </p><p>
      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 
      <em class="replaceable"><code>Key</code></em>. This way one can specify different
      values for the same <em class="replaceable"><code>Key</code></em> depending on the
      currently selected language.
    </p><p>
      The following keys are often used:
    </p><div class="variablelist"><dl><dt><span class="term">Value=1.0</span></dt><dd>
	    This is a mandatory field to indicate that the *.desktop file
	    follows the 1.0 version of the specification.
	  </dd><dt><span class="term">Type=Application</span></dt><dd>
	    This is a mandatory field that indicates that the *.desktop file
	    describes an application launcher.
	  </dd><dt><span class="term">Name=<em class="replaceable"><code>Application Name</code></em></span></dt><dd>
	    The name of the application.
	    For example <span class="emphasis"><em>Mozilla</em></span>
	  </dd><dt><span class="term">GenericName=<em class="replaceable"><code>Generic Name</code></em></span></dt><dd>
	    A generic description of the application.
	    For example <span class="emphasis"><em>Web Browser</em></span>
	  </dd><dt><span class="term">Comment=<em class="replaceable"><code>Comment</code></em></span></dt><dd>
	    Optional field to specify a tooltip for the application. 
	    For example <span class="emphasis"><em>Visit websites on the Internet</em></span>
	  </dd><dt><span class="term">Icon=<em class="replaceable"><code>Icon File</code></em></span></dt><dd>
	    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 <span><strong class="command">xdg-icon</strong></span>
	    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.
	  </dd><dt><span class="term">Exec=<em class="replaceable"><code>Command Line</code></em></span></dt><dd>
	    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.
	  </dd></dl></div><p>
      For a complete oveview of the *.desktop file format please
      visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec
    </p></div><div class="refsect1" lang="en"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
      An exit code of 0 indicates success while a non-zero exit code
      indicates failure. The following failure codes can be returned:
    </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
	    Error in command line syntax.
	  </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
	    One of the files passed on the command line did not exist.
	  </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
	    A required tool could not be found. 
	  </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
	    The action failed. 
	  </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</span>(1)</span>
    </p></div><div class="refsect1" lang="en"><a name="examples"></a><h2>Examples</h2><p>
      TBD
    </p></div></div></body></html>