OLD | NEW |
(Empty) | |
| 1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859
-1"><title>xdg-icon-resource</title><meta name="generator" content="DocBook XSL
Stylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vl
ink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-icon-
resource"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2>
<p>xdg-icon-resource — command line tool for (un)installing icon resources
</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis">
<p><code class="command">xdg-icon-resource</code> install [<code class="optio
n">--noupdate</code>] [<code class="option">--novendor</code>] [<code class="opt
ion">--theme <em class="replaceable"><code>theme</code></em></code>] [<code clas
s="option">--context <em class="replaceable"><code>context</code></em></code>] [
<code class="option">--mode <em class="replaceable"><code>mode</code></em></code
>] <code class="option">--size <em class="replaceable"><code>size</code></em></
code> <em class="replaceable"><code>icon-file</code></em> [<em class="replace
able"><code>icon-name</code></em>]</p></div><div class="cmdsynopsis"><p><code cl
ass="command">xdg-icon-resource</code> uninstall [<code class="option">--noup
date</code>] [<code class="option">--theme <em class="replaceable"><code>theme</
code></em></code>] [<code class="option">--context <em class="replaceable"><code
>context</code></em></code>] [<code class="option">--mode <em class="replaceable
"><code>mode</code></em></code>] <code class="option">--size <em class="replace
able"><code>size</code></em></code> <em class="replaceable"><code>icon-name</c
ode></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-icon-r
esource</code> forceupdate [<code class="option">--theme <em class="replaceab
le"><code>theme</code></em></code>] [<code class="option">--mode <em class="repl
aceable"><code>mode</code></em></code>]</p></div><div class="cmdsynopsis"><p><co
de class="command">xdg-icon-resource</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> |
| 2 The xdg-icon-resource program can be used to install icon resources |
| 3 into the desktop icon system in order to illustrate menu entries, |
| 4 to depict desktop icons or to graphically represent file types. |
| 5 </p><p> |
| 6 The desktop icon system identifies icons by name. Depending on the |
| 7 required size, the choice of icon theme and the context in which the |
| 8 icon is used, the desktop icon system locates an appropriate |
| 9 icon resource to depict an icon. Icon resources can be XPM files or |
| 10 PNG files. |
| 11 </p><p> |
| 12 The desktop icon system works according to the |
| 13 XDG Icon Theme Specification at |
| 14 http://www.freedesktop.org/Standards/icon-theme-spec |
| 15 </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> |
| 16 Installs the icon file indicated by <em class="replaceable"><code>ic
on-file</code></em> |
| 17 to the desktop icon system under the name |
| 18 <em class="replaceable"><code>icon-name</code></em>. |
| 19 Icon names do not have an extension. |
| 20 If <em class="replaceable"><code>icon-name</code></em> is not provid
ed the name is |
| 21 derived from <em class="replaceable"><code>icon-file</code></em>. |
| 22 The icon file must have |
| 23 <span class="emphasis"><em>.png</em></span> or <span class="emphasis
"><em>.xpm</em></span> |
| 24 as extension. If a corresponding <span class="emphasis"><em>.icon</e
m></span> |
| 25 file exists in the same location as <em class="replaceable"><code>ic
on-file</code></em> |
| 26 it will be installed as well. |
| 27 </dd><dt><span class="term">uninstall</span></dt><dd> |
| 28 Removes the icon indicated by <em class="replaceable"><code>icon-nam
e</code></em> |
| 29 from the desktop icon system. Note that icon names do not have |
| 30 an extension. |
| 31 </dd><dt><span class="term">forceupdate</span></dt><dd> |
| 32 Force an update of the desktop icon system. This is only useful if |
| 33 the last call to xdg-icon-resource included the <code class="option"
>--noupdate</code> option. |
| 34 </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">--noupdate</code></span></dt><dd> |
| 35 Postpone updating the desktop icon system. If multiple icons are |
| 36 added in sequence this flag can be used to indicate that |
| 37 additional changes will follow and that it is not |
| 38 necassery to update the desktop icon system right away. |
| 39 </dd><dt><span class="term"><code class="option">--novendor</code></sp
an></dt><dd><p> |
| 40 Normally, xdg-icon-resource checks to ensure that an icon file |
| 41 to be installed in the <span class="emphasis"><em>apps</em></span> c
ontext has |
| 42 a proper vendor prefix. This option can be used to disable |
| 43 that check. |
| 44 </p><p> |
| 45 A vendor prefix consists of alpha characters ([a-zA-Z]) and is |
| 46 terminated with a dash ("-"). |
| 47 Companies and organizations are encouraged to use a word |
| 48 or phrase, preferably the organizations name, for which they hold |
| 49 a trademark as their vendor prefix. |
| 50 The purpose of the vendor prefix is to prevent name conflicts. |
| 51 </p></dd><dt><span class="term"><code class="option">--theme</code> <e
m class="replaceable"><code>theme</code></em></span></dt><dd> |
| 52 Installs or removes the icon file as part of |
| 53 <em class="replaceable"><code>theme</code></em>. If no theme is spec
ified the |
| 54 icons will be installed as part of the default <span class="emphasis
"><em>hicolor</em></span> theme. |
| 55 Applications may install icons under multiple themes but should |
| 56 at least install icons for the default <span class="emphasis"><em>hi
color</em></span> theme. |
| 57 </dd><dt><span class="term"><code class="option">--context</code> <em
class="replaceable"><code>context</code></em></span></dt><dd> |
| 58 Specifies the context for the icon. Icons to be used in the |
| 59 application menu and as desktop icon should use |
| 60 <span class="emphasis"><em>apps</em></span> as context which is the
default |
| 61 context. Icons to be used as file icons should use |
| 62 <span class="emphasis"><em>mimetypes</em></span> as context. |
| 63 Other common contexts are <span class="emphasis"><em>actions</em></s
pan>, |
| 64 <span class="emphasis"><em>devices</em></span>, <span class="emphasi
s"><em>emblems</em></span>, |
| 65 <span class="emphasis"><em>filesystems</em></span> and <span class="
emphasis"><em>stock</em></span>. |
| 66 </dd><dt><span class="term"><code class="option">--size</code> <em cla
ss="replaceable"><code>size</code></em></span></dt><dd> |
| 67 Specifies the size of the icon. All icons must be square. |
| 68 Common sizes for icons in the apps context are: |
| 69 16, 22, 32, 48, 64 and 128. |
| 70 Common sizes for icons in the mimetypes context are: |
| 71 16, 22, 32, 48, 64 and 128 |
| 72 </dd><dt><span class="term"><code class="option">--mode</code> <em cla
ss="replaceable"><code>mode</code></em></span></dt><dd><p><em class="replaceable
"><code>mode</code></em> can be |
| 73 <span class="emphasis"><em>user</em></span> or <span class="emphasis
"><em>system</em></span>. |
| 74 In user mode the file is (un)installed for the current user |
| 75 only. In system mode the file is (un)installed for all users |
| 76 on the system. Usually only root is allowed to install in |
| 77 system mode. |
| 78 </p><p> |
| 79 The default is to use system mode when called by root |
| 80 and to use user mode when called by a non-root user. |
| 81 </p></dd><dt><span class="term"><code class="option">--help</code></sp
an></dt><dd> |
| 82 Show command synopsis. |
| 83 </dd><dt><span class="term"><code class="option">--manual</code></span
></dt><dd> |
| 84 Show this manualpage. |
| 85 </dd><dt><span class="term"><code class="option">--version</code></spa
n></dt><dd> |
| 86 Show the xdg-utils version information. |
| 87 </dd></dl></div></div><div class="refsect1" lang="en"><a name="env_var
s"></a><h2>Environment Variables</h2><p> |
| 88 xdg-icon-resource honours the following environment variables: |
| 89 </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEV
EL</span></dt><dd> |
| 90 Setting this environment variable to a non-zero numerical value |
| 91 makes xdg-icon-resource do more verbose reporting on stderr. |
| 92 Setting a higher value increases the verbosity. |
| 93 </dd><dt><span class="term">XDG_UTILS_INSTALL_MODE</span></dt><dd> |
| 94 This environment variable can be used by the user or |
| 95 administrator to override the installation mode. |
| 96 Valid values are <span class="emphasis"><em>user</em></span> and |
| 97 <span class="emphasis"><em>system</em></span>. |
| 98 </dd></dl></div></div><div class="refsect1" lang="en"><a name="exitcod
es"></a><h2>Exit Codes</h2><p> |
| 99 An exit code of 0 indicates success while a non-zero exit code |
| 100 indicates failure. The following failure codes can be returned: |
| 101 </p><div class="variablelist"><dl><dt><span class="term"><code class="option
">1</code></span></dt><dd> |
| 102 Error in command line syntax. |
| 103 </dd><dt><span class="term"><code class="option">2</code></span></dt><
dd> |
| 104 One of the files passed on the command line did not exist. |
| 105 </dd><dt><span class="term"><code class="option">3</code></span></dt><
dd> |
| 106 A required tool could not be found. |
| 107 </dd><dt><span class="term"><code class="option">4</code></span></dt><
dd> |
| 108 The action failed. |
| 109 </dd><dt><span class="term"><code class="option">5</code></span></dt><
dd> |
| 110 No permission to read one of the files passed on the command |
| 111 line. |
| 112 </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-desktop-icon</span>(1)</span>, |
| 113 <span class="citerefentry"><span class="refentrytitle">xdg-desktop-menu</s
pan>(1)</span>, |
| 114 <span class="citerefentry"><span class="refentrytitle">xdg-mime</span>(1)<
/span> |
| 115 </p></div><div class="refsect1" lang="en"><a name="examples"></a><h2>Example
s</h2><p> |
| 116 To install an icon resource to depict a launcher for the application |
| 117 myfoobar, the company ShinyThings Inc. can use: |
| 118 </p><pre class="programlisting"> |
| 119 xdg-icon-resource install --size 64 shinythings-myfoobar.png |
| 120 </pre><p> |
| 121 </p><p> |
| 122 To install an icon for a new application/x-foobar file type one can use: |
| 123 </p><pre class="programlisting"> |
| 124 xdg-icon-resource install --context mimetypes --size 48 ./mime-foobar-48.png app
lication-x-foobar |
| 125 xdg-icon-resource install --context mimetypes --size 64 ./mime-foobar-64.png app
lication-x-foobar |
| 126 </pre><p>This will install two icons with the name application-x-foobar |
| 127 but with different sizes. |
| 128 </p></div></div></body></html> |
OLD | NEW |