summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldo Bastian <waldo.bastian@intel.com>2006-09-11 22:23:54 +0000
committerWaldo Bastian <waldo.bastian@intel.com>2006-09-11 22:23:54 +0000
commit374dadc8e30dbc82d560b055f8b5ba3ff38e9120 (patch)
tree818abeba31ec5dfcc8dfcba0588d3fd23d9730e9
parentdf772a1ad0f2734a63ef8cfeb55b6b83f4008e3b (diff)
Update generated files
-rw-r--r--scripts/html/xdg-desktop-menu.html204
-rw-r--r--scripts/html/xdg-icon-resource.html16
-rw-r--r--scripts/html/xdg-mime.html2
-rw-r--r--scripts/man/xdg-desktop-icon.12
-rw-r--r--scripts/man/xdg-desktop-menu.1176
-rw-r--r--scripts/man/xdg-email.12
-rw-r--r--scripts/man/xdg-icon-resource.114
-rw-r--r--scripts/man/xdg-mime.14
-rw-r--r--scripts/man/xdg-open.12
-rw-r--r--scripts/man/xdg-screensaver.12
-rwxr-xr-xscripts/xdg-desktop-icon8
-rwxr-xr-xscripts/xdg-desktop-menu20
-rwxr-xr-xscripts/xdg-email8
-rwxr-xr-xscripts/xdg-icon-resource145
-rwxr-xr-xscripts/xdg-mime10
-rwxr-xr-xscripts/xdg-open10
-rwxr-xr-xscripts/xdg-screensaver8
-rw-r--r--scripts/xdg-utils-common.in2
18 files changed, 315 insertions, 320 deletions
diff --git a/scripts/html/xdg-desktop-menu.html b/scripts/html/xdg-desktop-menu.html
index 9d5b9c4..daa6e30 100644
--- a/scripts/html/xdg-desktop-menu.html
+++ b/scripts/html/xdg-desktop-menu.html
@@ -1,40 +1,57 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-desktop-menu</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-desktop-menu"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-desktop-menu &#8212; command line tool for (un)installing desktop menu items</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</code> install [<code class="option">--noupdate</code>] [<code class="option">--novendor</code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] { <em class="replaceable"><code>desktop-file</code></em> | <em class="replaceable"><code>menu-file</code></em> | <em class="replaceable"><code>directory-file</code></em> }</p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</code> uninstall [<code class="option">--noupdate</code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] { <em class="replaceable"><code>desktop-file</code></em> | <em class="replaceable"><code>menu-file</code></em> | <em class="replaceable"><code>directory-file</code></em> }</p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</code> forceupdate [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>]</p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</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-menu program can be used to install new items to the
- desktop's application menu.
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-desktop-menu</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="xdg-desktop-menu"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-desktop-menu &#8212; command line tool for (un)installing desktop menu items</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</code> install [<code class="option">--noupdate</code>] [<code class="option">--novendor</code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] <em class="replaceable"><code>directory-file(s)</code></em> <em class="replaceable"><code>desktop-file(s)</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</code> uninstall [<code class="option">--noupdate</code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] <em class="replaceable"><code>directory-file(s)</code></em> <em class="replaceable"><code>desktop-file(s)</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</code> forceupdate [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>]</p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-menu</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-menu program can be used to install new menu entries
+ to the desktop's application menu.
</p><p>
The application menu works according to the
XDG Desktop Menu Specification at
http://www.freedesktop.org/Standards/menu-spec
</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><p>
- Install applications or submenus into the desktop menu system.
+ Install one or more applications in a submenu of
+ the desktop menu system.
+ </p><p><em class="replaceable"><code>directory-file</code></em>:
+ The *.directory file indicated by
+ <em class="replaceable"><code>directory-file</code></em> represents a submenu.
+ The directory file provides the name and icon for a submenu. The
+ name of the directory file is used to identify the submenu.
+ </p><p>
+ If multiple directory files are provided each file will
+ represent a submenu within the menu that preceeds it, creating
+ a nested menu hierarchy (sub-sub-menus).
+ The menu entries themselves will be added to the last submenu.
+ </p><p>
+ Directory files follow the syntax defined by the freedesktop.org
+ Desktop Entry Specification.
</p><p><em class="replaceable"><code>desktop-file</code></em>:
- Installs the *.desktop file indicated by <em class="replaceable"><code>desktop-file</code></em>
- to the menu system. A desktop file represents a single application in the menu.
+ A desktop file represents a single application in the menu.
Desktop files are defined by the freedesktop.org Desktop Entry
Specification. The most important aspects of *.desktop
files are summarized below.
- </p><p><em class="replaceable"><code>menu-file</code></em>:
- Installs the *.menu file indicated by <em class="replaceable"><code>menu-file</code></em>
- to the menu system. A menu file describes the location and contents for
- one or more new submenus. Each submenu must reference a *.directory file.
- </p><p><em class="replaceable"><code>directory-file</code></em>:
- Installs the *.directory file indicated by <em class="replaceable"><code>directory-file</code></em>
- to the menu system. A directory file provides the name and icon for a submenu.
- </p></dd><dt><span class="term">uninstall</span></dt><dd>
+ </p><p>
+ If multiple desktop-files are specified, multiple entries will
+ be added to the same menu. If entries are installed to a menu
+ that has been created with a previous call to
+ <span><strong class="command">xdg-desktop-menu</strong></span> the entries will be
+ installed in addition to any already existing entries.
+ </p></dd><dt><span class="term">uninstall</span></dt><dd><p>
Remove applications or submenus from the desktop menu system
previously installed with <span><strong class="command">xdg-desktop-menu install</strong></span>.
- </dd><dt><span class="term">forceupdate</span></dt><dd>
- Force an update of the menu system. This is only useful if
- the last call to xdg-desktop-menu included the <code class="option">--noupdate</code> option.
- </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>
+ </p><p>
+ A submenu and the associated directory file is only removed
+ when the submenu no longer contains any menu entries.
+ </p></dd><dt><span class="term">forceupdate</span></dt><dd><p>
+ Force an update of the menu system.
+ </p><p>
+ This command is only useful if the last call to
+ xdg-desktop-menu included the <code class="option">--noupdate</code> option.
+ </p></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>
Postpone updating the menu system. If multiple updates to the
menu system are made in sequence this flag can be used to
indicate that additional changes will follow and that it is not
necassery to update the menu system right away.
</dd><dt><span class="term"><code class="option">--novendor</code></span></dt><dd><p>
- Normally, xdg-desktop-menu checks to ensure that any *.desktop,
- *.directory and *.menu files to be installed has
- a vendor prefix. This option can be used to disable that check.
+ Normally, xdg-desktop-menu checks to ensure that any *.directory
+ and *.desktop files to be installed has a vendor prefix.
+ This option can be used to disable that check.
</p><p>
A vendor prefix consists of alpha characters ([a-zA-Z]) and is
terminated with a dash ("-").
@@ -57,7 +74,44 @@
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>
+ </dd></dl></div></div><div class="refsect1" lang="en"><a name="directoryfiles"></a><h2>Directory Files</h2><p>
+ The appearance of submenu in the application menu is
+ provided by a *.directory file. In particular it provides the title
+ of the submenu and a possible icon. A *.directory 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 *.directory file can provide a title (name) for the submenu
+ 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 relevqnt for submenus:
+ </p><div class="variablelist"><dl><dt><span class="term">Value=1.0</span></dt><dd>
+ This is a mandatory field to indicate that the *.directory file
+ follows the 1.0 version of the Desktop Entry specification.
+ </dd><dt><span class="term">Type=Directory</span></dt><dd>
+ This is a mandatory field that indicates that the *.directory file
+ describes a submenu.
+ </dd><dt><span class="term">Name=<em class="replaceable"><code>Menu Name</code></em></span></dt><dd>
+ The title of submenu.
+ For example <span class="emphasis"><em>Mozilla</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 submenu.
+ </dd><dt><span class="term">Icon=<em class="replaceable"><code>Icon File</code></em></span></dt><dd>
+ The icon to use for the submenu. 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-resource</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 submenu icon can be
+ provided in several different sizes as well as in several
+ differently themed styles.
+ </dd></dl></div></div><div class="refsect1" lang="en"><a name="desktopfiles"></a><h2>Desktop Files</h2><p>
An application item in the application menu is represented by a
*.desktop file. A *.desktop file consists of a
<span class="emphasis"><em>[Desktop Entry]</em></span> header followed by several
@@ -105,12 +159,6 @@
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><dt><span class="term">Categories=<em class="replaceable"><code>Categories</code></em></span></dt><dd>
- A list of categories separated by semi-colons. A category is
- a keyword that describes and classifies the application.
- By default applications are organized in the application menu
- based on category. The XDG Desktop Menu Specification defines
- a large number of predefined categories.
</dd><dt><span class="term">MimeType=<em class="replaceable"><code>Mimetypes</code></em></span></dt><dd>
A list of mimetypes separated by semi-colons. This field is
used to indicate which file types the application is able to
@@ -145,40 +193,13 @@
The company ShinyThings Inc. has developed an application named
"WebMirror" and would like to add it to the application menu.
The company will use "shinythings" as its vendor id.
- In order to add the application to the menu there needs to be a
- .desktop file with a suitable <span class="emphasis"><em>Categories</em></span> entry:
-</p><pre class="programlisting">
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
- Categories=Network;WebDevelopment;
-</pre><p>
- </p><p>Now the xdg-desktop-menu tool can be used to add the
- shinythings-webmirror.desktop file to the desktop application menu:
-</p><pre class="programlisting">
-xdg-desktop-menu install ./shinythings-webmirror.desktop
-</pre><p>
- </p><p>
- Note that for the purpose of this example the menu items are available
- in two languages, English and Dutch.
- The language code for Dutch is nl.
- </p><p>
- In the next example the company ShinyThings Inc. wants to add its own
+ In this example the company ShinyThings Inc. will add its own
submenu to the desktop application menu consisting of a
"WebMirror" menu item and a
"WebMirror Admin Tool" menu item.
</p><p>
First the company needs to create two .desktop files that describe
- the two menu items, this time no Categories item is needed:
+ the two menu items:
</p><pre class="programlisting">
shinythings-webmirror.desktop:
@@ -206,15 +227,6 @@ shinythings-webmirror-admin.desktop:
Name[nl]=WebSpiegel Administratie Tool
</pre><p>
</p><p>
- The files can be installed with:
-</p><pre class="programlisting">
-xdg-desktop-menu install --noupdate ./shinythings-webmirror.desktop
-xdg-desktop-menu install --noupdate ./shinythings-webmirror-admin.desktop
-</pre><p>
- </p><p>
- Because multiple items are added the <code class="option">--noupdate</code>
- option has been used.
- </p><p>
In addition a .directory file needs to be created to provide a title and icon
for the sub-menu itself:
</p><pre class="programlisting">
@@ -229,53 +241,35 @@ shinythings-webmirror.directory:
Name[nl]=WebSpiegel
</pre><p>
</p><p>
- This webmirror.directory file can be installed with:
+ These file can now be installed with:
</p><pre class="programlisting">
-xdg-desktop-menu install --noupdate ./shinythings-webmirror.directory
+xdg-desktop-menu install ./shinythings-webmirror.directory \
+ ./shinythings-webmirror.desktop ./shinythings-webmirror-admin.desktop
</pre><p>
</p><p>
+ The menu entries could also be installed one by one:
+</p><pre class="programlisting">
+xdg-desktop-menu install --noupdate ./shinythings-webmirror.directory \
+ ./shinythings-webmirror.desktop
+xdg-desktop-menu install --noupdate ./shinythings-webmirror.directory \
+ ./shinythings-webmirror-admin.desktop
+xdg-desktop-menu forceupdate
+</pre><p>
+ </p><p>
+ Although the result is the same it is slightly more efficient to
+ install all files at the same time.
+ </p><p>
The *.desktop and *.directory files reference icons with the names
webmirror, webmirror-admin and webmirror-menu which should also be
installed. In this example the icons are installed in two different
sizes, once with a size of 22x22 pixels and once with a size
of 64x64 pixels:
</p><pre class="programlisting">
-xdg-icon-resource install --size 22 ./wmicon-22.png shinythings-webmirror.png
-xdg-icon-resource install --size 22 ./wmicon-menu-22.png shinythings-webmirror-menu.png
-xdg-icon-resource install --size 22 ./wmicon-admin-22.png shinythings-webmirror-admin.png
-xdg-icon-resource install --size 64 ./wmicon-64.png shinythings-webmirror.png
-xdg-icon-resource install --size 64 ./wmicon-menu-64.png shinythings-webmirror-menu.png
-xdg-icon-resource install --size 64 ./wmicon-admin-64.png shinythings-webmirror-admin.png
-</pre><p>
- </p><p>
- The last step is to provide a .menu file that links it all
- togther:
-</p><pre class="programlisting">
-shinythings-webmirror.menu:
-
- &lt;!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
- "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd"&gt;
- &lt;Menu&gt;
- &lt;Name&gt;Applications&lt;/Name&gt;
- &lt;Menu&gt;
- &lt;Name&gt;WebMirror&lt;/Name&gt;
- &lt;Directory&gt;shinythings-webmirror.directory&lt;/Directory&gt;
- &lt;Include&gt;
- &lt;Filename&gt;shinythings-webmirror.desktop&lt;/Filename&gt;
- &lt;Filename&gt;shinythings-webmirror-admin.desktop&lt;/Filename&gt;
- &lt;/Include&gt;
- &lt;/Menu&gt;
- &lt;/Menu&gt;
-</pre><p>
- </p><p>
- The shinythings-webmirror.menu file can be installed with:
-</p><pre class="programlisting">
-xdg-desktop-menu install --noupdate ./shinythings-webmirror.menu
-</pre><p>
- </p><p>
- After installing multiple files with <code class="option">--noupdate</code> make sure
- to force an update:
-</p><pre class="programlisting">
-xdg-desktop-menu forceupdate
+xdg-icon-resource install --size 22 ./wmicon-22.png shinythings-webmirror
+xdg-icon-resource install --size 22 ./wmicon-menu-22.png shinythings-webmirror-menu
+xdg-icon-resource install --size 22 ./wmicon-admin-22.png shinythings-webmirror-admin
+xdg-icon-resource install --size 64 ./wmicon-64.png shinythings-webmirror
+xdg-icon-resource install --size 64 ./wmicon-menu-64.png shinythings-webmirror-menu
+xdg-icon-resource install --size 64 ./wmicon-admin-64.png shinythings-webmirror-admin
</pre><p>
</p></div></div></body></html>
diff --git a/scripts/html/xdg-icon-resource.html b/scripts/html/xdg-icon-resource.html
index 0bbd1f5..60dc22b 100644
--- a/scripts/html/xdg-icon-resource.html
+++ b/scripts/html/xdg-icon-resource.html
@@ -15,8 +15,9 @@
</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 the icon file indicated by <em class="replaceable"><code>icon-file</code></em>
to the desktop icon system under the name
- <em class="replaceable"><code>icon-name</code></em>. If
- <em class="replaceable"><code>icon-name</code></em> is not provided the name is
+ <em class="replaceable"><code>icon-name</code></em>.
+ Icon names do not have an extension.
+ If <em class="replaceable"><code>icon-name</code></em> is not provided the name is
derived from <em class="replaceable"><code>icon-file</code></em>.
The icon file must have
<span class="emphasis"><em>.png</em></span>, <span class="emphasis"><em>.xpm</em></span> or
@@ -24,8 +25,9 @@
<span class="emphasis"><em>.icon</em></span> file exists in the same location as <em class="replaceable"><code>icon-file</code></em>
it will be installed as well.
</dd><dt><span class="term">uninstall</span></dt><dd>
- Removes the icon file indicated by <em class="replaceable"><code>icon-name</code></em>
- from the desktop icon system.
+ Removes the icon indicated by <em class="replaceable"><code>icon-name</code></em>
+ from the desktop icon system. Note that icon names do not have
+ an extension.
</dd><dt><span class="term">forceupdate</span></dt><dd>
Force an update of the desktop icon system. This is only useful if
the last call to xdg-icon-resource included the <code class="option">--noupdate</code> option.
@@ -115,8 +117,8 @@ xdg-icon-resource install --size 64 shinythings-myfoobar.png
</p><p>
To install an icon for a new application/x-foobar file type one can use:
</p><pre class="programlisting">
-xdg-icon-resource install --context mimetypes --size 48 ./mime-foobar-48.png application-x-foobar.png
-xdg-icon-resource install --context mimetypes --size 64 ./mime-foobar-64.png application-x-foobar.png
-</pre><p>This will install two icons with the name application-x-foobar.png
+xdg-icon-resource install --context mimetypes --size 48 ./mime-foobar-48.png application-x-foobar
+xdg-icon-resource install --context mimetypes --size 64 ./mime-foobar-64.png application-x-foobar
+</pre><p>This will install two icons with the name application-x-foobar
but with different sizes.
</p></div></div></body></html>
diff --git a/scripts/html/xdg-mime.html b/scripts/html/xdg-mime.html
index cd99a47..be4b082 100644
--- a/scripts/html/xdg-mime.html
+++ b/scripts/html/xdg-mime.html
@@ -135,6 +135,6 @@ shinythings-shiny.xml:
</pre><p>An icon for this new file type must also be installed, for
example with:
</p><pre class="programlisting">
-xdg-icon-resource install --context mimetypes --size 64 text-x-shiny.png
+xdg-icon-resource install --context mimetypes --size 64 shiny-file-icon.png text-x-shiny
</pre><p>
</p></div></div></body></html>
diff --git a/scripts/man/xdg-desktop-icon.1 b/scripts/man/xdg-desktop-icon.1
index 323ef50..3c53983 100644
--- a/scripts/man/xdg-desktop-icon.1
+++ b/scripts/man/xdg-desktop-icon.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-DESKTOP\-ICON" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-DESKTOP\-ICON" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
diff --git a/scripts/man/xdg-desktop-menu.1 b/scripts/man/xdg-desktop-menu.1
index 08facb4..485744e 100644
--- a/scripts/man/xdg-desktop-menu.1
+++ b/scripts/man/xdg-desktop-menu.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-DESKTOP\-MENU" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-DESKTOP\-MENU" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -11,41 +11,47 @@
xdg\-desktop\-menu \- command line tool for (un)installing desktop menu items
.SH "SYNOPSIS"
.HP 17
-\fBxdg\-desktop\-menu\fR install [\fB\-\-noupdate\fR] [\fB\-\-novendor\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] {\fIdesktop\-file\fR \fImenu\-file\fR \fIdirectory\-file\fR}
+\fBxdg\-desktop\-menu\fR install [\fB\-\-noupdate\fR] [\fB\-\-novendor\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fIdirectory\-file(s)\fR \fIdesktop\-file(s)\fR
.HP 17
-\fBxdg\-desktop\-menu\fR uninstall [\fB\-\-noupdate\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] {\fIdesktop\-file\fR \fImenu\-file\fR \fIdirectory\-file\fR}
+\fBxdg\-desktop\-menu\fR uninstall [\fB\-\-noupdate\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fIdirectory\-file(s)\fR \fIdesktop\-file(s)\fR
.HP 17
\fBxdg\-desktop\-menu\fR forceupdate [\fB\-\-mode\ \fR\fB\fImode\fR\fR]
.HP 17
\fBxdg\-desktop\-menu\fR {\fB\-\-help\fR \fB\-\-manual\fR \fB\-\-version\fR}
.SH "DESCRIPTION"
.PP
-The xdg\-desktop\-menu program can be used to install new items to the desktop's application menu.
+The xdg\-desktop\-menu program can be used to install new menu entries to the desktop's application menu.
.PP
The application menu works according to the XDG Desktop Menu Specification at http://www.freedesktop.org/Standards/menu\-spec
.SH "COMMANDS"
.TP
install
-Install applications or submenus into the desktop menu system.
+Install one or more applications in a submenu of the desktop menu system.
.sp
-\fIdesktop\-file\fR: Installs the *.desktop file indicated by
-\fIdesktop\-file\fR
-to the menu system. A desktop file represents a single application in the menu. Desktop files are defined by the freedesktop.org Desktop Entry Specification. The most important aspects of *.desktop files are summarized below.
+\fIdirectory\-file\fR: The *.directory file indicated by
+\fIdirectory\-file\fR
+represents a submenu. The directory file provides the name and icon for a submenu. The name of the directory file is used to identify the submenu.
.sp
-\fImenu\-file\fR: Installs the *.menu file indicated by
-\fImenu\-file\fR
-to the menu system. A menu file describes the location and contents for one or more new submenus. Each submenu must reference a *.directory file.
+If multiple directory files are provided each file will represent a submenu within the menu that preceeds it, creating a nested menu hierarchy (sub\-sub\-menus). The menu entries themselves will be added to the last submenu.
.sp
-\fIdirectory\-file\fR: Installs the *.directory file indicated by
-\fIdirectory\-file\fR
-to the menu system. A directory file provides the name and icon for a submenu.
+Directory files follow the syntax defined by the freedesktop.org Desktop Entry Specification.
+.sp
+\fIdesktop\-file\fR: A desktop file represents a single application in the menu. Desktop files are defined by the freedesktop.org Desktop Entry Specification. The most important aspects of *.desktop files are summarized below.
+.sp
+If multiple desktop\-files are specified, multiple entries will be added to the same menu. If entries are installed to a menu that has been created with a previous call to
+\fBxdg\-desktop\-menu\fR
+the entries will be installed in addition to any already existing entries.
.TP
uninstall
Remove applications or submenus from the desktop menu system previously installed with
\fBxdg\-desktop\-menu install\fR.
+.sp
+A submenu and the associated directory file is only removed when the submenu no longer contains any menu entries.
.TP
forceupdate
-Force an update of the menu system. This is only useful if the last call to xdg\-desktop\-menu included the
+Force an update of the menu system.
+.sp
+This command is only useful if the last call to xdg\-desktop\-menu included the
\fB\-\-noupdate\fR
option.
.SH "OPTIONS"
@@ -54,7 +60,7 @@ option.
Postpone updating the menu system. If multiple updates to the menu system are made in sequence this flag can be used to indicate that additional changes will follow and that it is not necassery to update the menu system right away.
.TP
\fB\-\-novendor\fR
-Normally, xdg\-desktop\-menu checks to ensure that any *.desktop, *.directory and *.menu files to be installed has a vendor prefix. This option can be used to disable that check.
+Normally, xdg\-desktop\-menu checks to ensure that any *.directory and *.desktop files to be installed has a vendor prefix. This option can be used to disable that check.
.sp
A vendor prefix consists of alpha characters ([a\-zA\-Z]) and is terminated with a dash ("\-"). Companies and organizations are encouraged to use a word or phrase, preferably the organizations name, for which they hold a trademark as their vendor prefix. The purpose of the vendor prefix is to prevent name conflicts.
.TP
@@ -75,6 +81,38 @@ Show this manualpage.
.TP
\fB\-\-version\fR
Show the xdg\-utils version information.
+.SH "DIRECTORY FILES"
+.PP
+The appearance of submenu in the application menu is provided by a *.directory file. In particular it provides the title of the submenu and a possible icon. A *.directory file consists of a
+\fI[Desktop Entry]\fR
+header followed by several
+\fIKey\fR=\fIValue\fR
+lines.
+.PP
+A *.directory file can provide a title (name) for the submenu in several different languages. This is done by adding a language code as used by LC_MESSAGES in square brackets behind the
+\fIKey\fR. This way one can specify different values for the same
+\fIKey\fR
+depending on the currently selected language.
+.PP
+The following keys are relevqnt for submenus:
+.TP
+Value=1.0
+This is a mandatory field to indicate that the *.directory file follows the 1.0 version of the Desktop Entry specification.
+.TP
+Type=Directory
+This is a mandatory field that indicates that the *.directory file describes a submenu.
+.TP
+Name=\fIMenu Name\fR
+The title of submenu. For example
+\fIMozilla\fR
+.TP
+Comment=\fIComment\fR
+Optional field to specify a tooltip for the submenu.
+.TP
+Icon=\fIIcon File\fR
+The icon to use for the submenu. 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
+\fBxdg\-icon\-resource\fR
+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 submenu icon can be provided in several different sizes as well as in several differently themed styles.
.SH "DESKTOP FILES"
.PP
An application item in the application menu is represented by a *.desktop file. A *.desktop file consists of a
@@ -116,9 +154,6 @@ command can be used to install image files into icon themes. The advantage of us
Exec=\fICommand Line\fR
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.
.TP
-Categories=\fICategories\fR
-A list of categories separated by semi\-colons. A category is a keyword that describes and classifies the application. By default applications are organized in the application menu based on category. The XDG Desktop Menu Specification defines a large number of predefined categories.
-.TP
MimeType=\fIMimetypes\fR
A list of mimetypes separated by semi\-colons. This field is used to indicate which file types the application is able to open.
.PP
@@ -154,39 +189,9 @@ No permission to read one of the files passed on the command line.
\fBxdg\-mime\fR(1)
.SH "EXAMPLES"
.PP
-The company ShinyThings Inc. has developed an application named "WebMirror" and would like to add it to the application menu. The company will use "shinythings" as its vendor id. In order to add the application to the menu there needs to be a .desktop file with a suitable
-\fICategories\fR
-entry:
-.sp
-.nf
-shinythings\-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF\-8
- Type=Application
-
- Exec=webmirror
- Icon=webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
- Categories=Network;WebDevelopment;
-.fi
-.sp
-.PP
-Now the xdg\-desktop\-menu tool can be used to add the shinythings\-webmirror.desktop file to the desktop application menu:
-.sp
-.nf
-xdg\-desktop\-menu install ./shinythings\-webmirror.desktop
-.fi
-.sp
-.PP
-Note that for the purpose of this example the menu items are available in two languages, English and Dutch. The language code for Dutch is nl.
+The company ShinyThings Inc. has developed an application named "WebMirror" and would like to add it to the application menu. The company will use "shinythings" as its vendor id. In this example the company ShinyThings Inc. will add its own submenu to the desktop application menu consisting of a "WebMirror" menu item and a "WebMirror Admin Tool" menu item.
.PP
-In the next example the company ShinyThings Inc. wants to add its own submenu to the desktop application menu consisting of a "WebMirror" menu item and a "WebMirror Admin Tool" menu item.
-.PP
-First the company needs to create two .desktop files that describe the two menu items, this time no Categories item is needed:
+First the company needs to create two .desktop files that describe the two menu items:
.sp
.nf
shinythings\-webmirror.desktop:
@@ -216,18 +221,6 @@ shinythings\-webmirror\-admin.desktop:
.fi
.sp
.PP
-The files can be installed with:
-.sp
-.nf
-xdg\-desktop\-menu install \-\-noupdate ./shinythings\-webmirror.desktop
-xdg\-desktop\-menu install \-\-noupdate ./shinythings\-webmirror\-admin.desktop
-.fi
-.sp
-.PP
-Because multiple items are added the
-\fB\-\-noupdate\fR
-option has been used.
-.PP
In addition a .directory file needs to be created to provide a title and icon for the sub\-menu itself:
.sp
.nf
@@ -243,59 +236,36 @@ shinythings\-webmirror.directory:
.fi
.sp
.PP
-This webmirror.directory file can be installed with:
+These file can now be installed with:
.sp
.nf
-xdg\-desktop\-menu install \-\-noupdate ./shinythings\-webmirror.directory
+xdg\-desktop\-menu install ./shinythings\-webmirror.directory \\
+ ./shinythings\-webmirror.desktop ./shinythings\-webmirror\-admin.desktop
.fi
.sp
.PP
-The *.desktop and *.directory files reference icons with the names webmirror, webmirror\-admin and webmirror\-menu which should also be installed. In this example the icons are installed in two different sizes, once with a size of 22x22 pixels and once with a size of 64x64 pixels:
+The menu entries could also be installed one by one:
.sp
.nf
-xdg\-icon\-resource install \-\-size 22 ./wmicon\-22.png shinythings\-webmirror.png
-xdg\-icon\-resource install \-\-size 22 ./wmicon\-menu\-22.png shinythings\-webmirror\-menu.png
-xdg\-icon\-resource install \-\-size 22 ./wmicon\-admin\-22.png shinythings\-webmirror\-admin.png
-xdg\-icon\-resource install \-\-size 64 ./wmicon\-64.png shinythings\-webmirror.png
-xdg\-icon\-resource install \-\-size 64 ./wmicon\-menu\-64.png shinythings\-webmirror\-menu.png
-xdg\-icon\-resource install \-\-size 64 ./wmicon\-admin\-64.png shinythings\-webmirror\-admin.png
-.fi
-.sp
-.PP
-The last step is to provide a .menu file that links it all togther:
-.sp
-.nf
-shinythings\-webmirror.menu:
-
- <!DOCTYPE Menu PUBLIC "\-//freedesktop//DTD Menu 1.0//EN"
- "http://www.freedesktop.org/standards/menu\-spec/menu\-1.0.dtd">
- <Menu>
- <Name>Applications</Name>
- <Menu>
- <Name>WebMirror</Name>
- <Directory>shinythings\-webmirror.directory</Directory>
- <Include>
- <Filename>shinythings\-webmirror.desktop</Filename>
- <Filename>shinythings\-webmirror\-admin.desktop</Filename>
- </Include>
- </Menu>
- </Menu>
+xdg\-desktop\-menu install \-\-noupdate ./shinythings\-webmirror.directory \\
+ ./shinythings\-webmirror.desktop
+xdg\-desktop\-menu install \-\-noupdate ./shinythings\-webmirror.directory \\
+ ./shinythings\-webmirror\-admin.desktop
+xdg\-desktop\-menu forceupdate
.fi
.sp
.PP
-The shinythings\-webmirror.menu file can be installed with:
-.sp
-.nf
-xdg\-desktop\-menu install \-\-noupdate ./shinythings\-webmirror.menu
-.fi
-.sp
+Although the result is the same it is slightly more efficient to install all files at the same time.
.PP
-After installing multiple files with
-\fB\-\-noupdate\fR
-make sure to force an update:
+The *.desktop and *.directory files reference icons with the names webmirror, webmirror\-admin and webmirror\-menu which should also be installed. In this example the icons are installed in two different sizes, once with a size of 22x22 pixels and once with a size of 64x64 pixels:
.sp
.nf
-xdg\-desktop\-menu forceupdate
+xdg\-icon\-resource install \-\-size 22 ./wmicon\-22.png shinythings\-webmirror
+xdg\-icon\-resource install \-\-size 22 ./wmicon\-menu\-22.png shinythings\-webmirror\-menu
+xdg\-icon\-resource install \-\-size 22 ./wmicon\-admin\-22.png shinythings\-webmirror\-admin
+xdg\-icon\-resource install \-\-size 64 ./wmicon\-64.png shinythings\-webmirror
+xdg\-icon\-resource install \-\-size 64 ./wmicon\-menu\-64.png shinythings\-webmirror\-menu
+xdg\-icon\-resource install \-\-size 64 ./wmicon\-admin\-64.png shinythings\-webmirror\-admin
.fi
.sp
.SH "AUTHOR"
diff --git a/scripts/man/xdg-email.1 b/scripts/man/xdg-email.1
index e708a94..220e1be 100644
--- a/scripts/man/xdg-email.1
+++ b/scripts/man/xdg-email.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-EMAIL" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-EMAIL" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
diff --git a/scripts/man/xdg-icon-resource.1 b/scripts/man/xdg-icon-resource.1
index b637948..0ee392f 100644
--- a/scripts/man/xdg-icon-resource.1
+++ b/scripts/man/xdg-icon-resource.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-ICON\-RESOURCE" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-ICON\-RESOURCE" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -31,7 +31,7 @@ install
Installs the icon file indicated by
\fIicon\-file\fR
to the desktop icon system under the name
-\fIicon\-name\fR. If
+\fIicon\-name\fR. Icon names do not have an extension. If
\fIicon\-name\fR
is not provided the name is derived from
\fIicon\-file\fR. The icon file must have
@@ -46,9 +46,9 @@ file exists in the same location as
it will be installed as well.
.TP
uninstall
-Removes the icon file indicated by
+Removes the icon indicated by
\fIicon\-name\fR
-from the desktop icon system.
+from the desktop icon system. Note that icon names do not have an extension.
.TP
forceupdate
Force an update of the desktop icon system. This is only useful if the last call to xdg\-icon\-resource included the
@@ -148,11 +148,11 @@ xdg\-icon\-resource install \-\-size 64 shinythings\-myfoobar.png
To install an icon for a new application/x\-foobar file type one can use:
.sp
.nf
-xdg\-icon\-resource install \-\-context mimetypes \-\-size 48 ./mime\-foobar\-48.png application\-x\-foobar.png
-xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 ./mime\-foobar\-64.png application\-x\-foobar.png
+xdg\-icon\-resource install \-\-context mimetypes \-\-size 48 ./mime\-foobar\-48.png application\-x\-foobar
+xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 ./mime\-foobar\-64.png application\-x\-foobar
.fi
.sp
-This will install two icons with the name application\-x\-foobar.png but with different sizes.
+This will install two icons with the name application\-x\-foobar but with different sizes.
.SH "AUTHOR"
Kevin Krammer, Jeremy White.
.br
diff --git a/scripts/man/xdg-mime.1 b/scripts/man/xdg-mime.1
index 2840df6..9cf13d8 100644
--- a/scripts/man/xdg-mime.1
+++ b/scripts/man/xdg-mime.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-MIME" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-MIME" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -171,7 +171,7 @@ shinythings\-shiny.xml:
An icon for this new file type must also be installed, for example with:
.sp
.nf
-xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 text\-x\-shiny.png
+xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 shiny\-file\-icon.png text\-x\-shiny
.fi
.sp
.SH "AUTHOR"
diff --git a/scripts/man/xdg-open.1 b/scripts/man/xdg-open.1
index 0c0a1ee..affebf8 100644
--- a/scripts/man/xdg-open.1
+++ b/scripts/man/xdg-open.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-OPEN" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-OPEN" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
diff --git a/scripts/man/xdg-screensaver.1 b/scripts/man/xdg-screensaver.1
index 88e3a5e..e578abe 100644
--- a/scripts/man/xdg-screensaver.1
+++ b/scripts/man/xdg-screensaver.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "XDG\-SCREENSAVER" "1" "08/11/2006" "xdg\-utils 1.0 beta3" ""
+.TH "XDG\-SCREENSAVER" "1" "09/11/2006" "xdg\-utils 1.0 beta4" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
diff --git a/scripts/xdg-desktop-icon b/scripts/xdg-desktop-icon
index a81ac73..021abd0 100755
--- a/scripts/xdg-desktop-icon
+++ b/scripts/xdg-desktop-icon
@@ -323,6 +323,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -330,9 +332,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-desktop-icon: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-desktop-icon: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-desktop-icon --manual' for additional info." >&2
exit 1
}
@@ -375,7 +377,7 @@ check_common_commands()
;;
--version)
- echo "xdg-desktop-icon 1.0beta3"
+ echo "xdg-desktop-icon 1.0beta4"
exit_success
;;
esac
diff --git a/scripts/xdg-desktop-menu b/scripts/xdg-desktop-menu
index 11c7d2a..b3e711b 100755
--- a/scripts/xdg-desktop-menu
+++ b/scripts/xdg-desktop-menu
@@ -316,12 +316,12 @@ webmirror-admin and webmirror-menu which should also be installed. In this
example the icons are installed in two different sizes, once with a size of
22x22 pixels and once with a size of 64x64 pixels:
-xdg-icon-resource install --size 22 ./wmicon-22.png shinythings-webmirror.png
-xdg-icon-resource install --size 22 ./wmicon-menu-22.png shinythings-webmirror-menu.png
-xdg-icon-resource install --size 22 ./wmicon-admin-22.png shinythings-webmirror-admin.png
-xdg-icon-resource install --size 64 ./wmicon-64.png shinythings-webmirror.png
-xdg-icon-resource install --size 64 ./wmicon-menu-64.png shinythings-webmirror-menu.png
-xdg-icon-resource install --size 64 ./wmicon-admin-64.png shinythings-webmirror-admin.png
+xdg-icon-resource install --size 22 ./wmicon-22.png shinythings-webmirror
+xdg-icon-resource install --size 22 ./wmicon-menu-22.png shinythings-webmirror-menu
+xdg-icon-resource install --size 22 ./wmicon-admin-22.png shinythings-webmirror-admin
+xdg-icon-resource install --size 64 ./wmicon-64.png shinythings-webmirror
+xdg-icon-resource install --size 64 ./wmicon-menu-64.png shinythings-webmirror-menu
+xdg-icon-resource install --size 64 ./wmicon-admin-64.png shinythings-webmirror-admin
_MANUALPAGE
}
@@ -463,6 +463,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -470,9 +472,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-desktop-menu: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-desktop-menu: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-desktop-menu --manual' for additional info." >&2
exit 1
}
@@ -515,7 +517,7 @@ check_common_commands()
;;
--version)
- echo "xdg-desktop-menu 1.0beta3"
+ echo "xdg-desktop-menu 1.0beta4"
exit_success
;;
esac
diff --git a/scripts/xdg-email b/scripts/xdg-email
index f6a610b..0fbfbd5 100755
--- a/scripts/xdg-email
+++ b/scripts/xdg-email
@@ -274,6 +274,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -281,9 +283,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-email: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-email: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-email --manual' for additional info." >&2
exit 1
}
@@ -326,7 +328,7 @@ check_common_commands()
;;
--version)
- echo "xdg-email 1.0beta3"
+ echo "xdg-email 1.0beta4"
exit_success
;;
esac
diff --git a/scripts/xdg-icon-resource b/scripts/xdg-icon-resource
index caf5636..56bcdda 100755
--- a/scripts/xdg-icon-resource
+++ b/scripts/xdg-icon-resource
@@ -68,12 +68,13 @@ Commands
install
Installs the icon file indicated by icon-file to the desktop icon system
- under the name icon-name. If icon-name is not provided the name is derived
- from icon-file. The icon file must have .png, .xpm or .svg as extension. If
- a corresponding .icon file exists in the same location as icon-file it will
- be installed as well.
+ under the name icon-name. Icon names do not have an extension. If icon-name
+ is not provided the name is derived from icon-file. The icon file must have
+ .png, .xpm or .svg as extension. If a corresponding .icon file exists in
+ the same location as icon-file it will be installed as well.
uninstall
- Removes the icon file indicated by icon-name from the desktop icon system.
+ Removes the icon indicated by icon-name from the desktop icon system. Note
+ that icon names do not have an extension.
forceupdate
Force an update of the desktop icon system. This is only useful if the last
call to xdg-icon-resource included the --noupdate option.
@@ -166,10 +167,10 @@ xdg-icon-resource install --size 64 shinythings-myfoobar.png
To install an icon for a new application/x-foobar file type one can use:
-xdg-icon-resource install --context mimetypes --size 48 ./mime-foobar-48.png application-x-foobar.png
-xdg-icon-resource install --context mimetypes --size 64 ./mime-foobar-64.png application-x-foobar.png
+xdg-icon-resource install --context mimetypes --size 48 ./mime-foobar-48.png application-x-foobar
+xdg-icon-resource install --context mimetypes --size 64 ./mime-foobar-64.png application-x-foobar
-This will install two icons with the name application-x-foobar.png but with
+This will install two icons with the name application-x-foobar but with
different sizes.
_MANUALPAGE
@@ -312,6 +313,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -319,9 +322,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-icon-resource: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-icon-resource: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-icon-resource --manual' for additional info." >&2
exit 1
}
@@ -364,7 +367,7 @@ check_common_commands()
;;
--version)
- echo "xdg-icon-resource 1.0beta3"
+ echo "xdg-icon-resource 1.0beta4"
exit_success
;;
esac
@@ -411,17 +414,21 @@ kfmclient_fix_exit_code()
update_icon_database()
{
- # Don't create a cache if there wan't one already
- [ -f "$1/icon-theme.cache" ] || return
+ # Touch me, I'm dirty
+ touch "$1/.xdg-icon-resource-dummy"
+ rm -f "$1/.xdg-icon-resource-dummy"
- for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do
- DEBUG 3 "Checking $x for gtk-update-icon-cache"
- if [ -x $x/gtk-update-icon-cache ] ; then
- DEBUG 1 "Running $x/gtk-update-icon-cache -f -t \"$1\""
- eval '$x/gtk-update-icon-cache -f -t "$1"'$xdg_redirect_output
- return
- fi
- done
+ # Don't create a cache if there wan't one already
+ if [ -f "$1/icon-theme.cache" ] ; then
+ for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do
+ DEBUG 3 "Checking $x for gtk-update-icon-cache"
+ if [ -x $x/gtk-update-icon-cache ] ; then
+ DEBUG 1 "Running $x/gtk-update-icon-cache -f -t \"$1\""
+ eval '$x/gtk-update-icon-cache -f -t "$1"'$xdg_redirect_output
+ return
+ fi
+ done
+ fi
}
[ x"$1" != x"" ] || exit_failure_syntax
@@ -595,45 +602,53 @@ if [ -z "$icon_file" ] ; then
fi
fi
-filetype=
xdg_size_name=
-case $icon_file in
- *.xpm)
- filetype=bitmap
- if [ -z "$size" ] ; then
- exit_failure_syntax "*.xpm icons must have the icon size specified with --size"
- fi
- xdg_size_name="${size}x${size}"
- ;;
- *.png)
- filetype=bitmap
- if [ -z "$size" ] ; then
- exit_failure_syntax "*.png icons must have the icon size specified with --size"
- fi
- xdg_size_name="${size}x${size}"
- ;;
- *.svg)
- fileype=svg
- if [ -n "$size" ] ; then
- echo "xdg-icon-resource: Warning, no icon size should be specified for .svg icons"
- fi
- xdg_size_name=scalable
- ;;
- *)
- exit_failure_syntax "icon file to $action must be a *.png, *.xpm or *.svg file"
- ;;
-esac
+extension=
+if [ x"$action" = x"install" ] ; then
+ case $icon_file in
+ *.xpm)
+ if [ -z "$size" ] ; then
+ exit_failure_syntax "*.xpm icons must have the icon size specified with --size"
+ fi
+ xdg_size_name="${size}x${size}"
+ extension="xpm"
+ ;;
+ *.png)
+ if [ -z "$size" ] ; then
+ exit_failure_syntax "*.png icons must have the icon size specified with --size"
+ fi
+ xdg_size_name="${size}x${size}"
+ extension="png"
+ ;;
+ *.svg)
+ if [ -n "$size" ] ; then
+ echo "xdg-icon-resource: Warning, no icon size should be specified for .svg icons"
+ fi
+ xdg_size_name="scalable"
+ extension="svg"
+ ;;
+ *)
+ exit_failure_syntax "icon file to install must be a *.png, *.xpm or *.svg file"
+ ;;
+ esac
+else
+ if [ -n "$size" ] ; then
+ xdg_size_name="${size}x${size}"
+ else
+ xdg_size_name="scalable"
+ fi
+fi
if [ -n "$icon_name" ] ; then
case $icon_name in
- *.xpm)
- ;;
*.png)
+ exit_failure_syntax "icon name should not include an extension"
;;
- *.svg)
+ *.xpm)
+ exit_failure_syntax "icon name should not include an extension"
;;
- *)
- exit_failure_syntax "icon name must have a .png, .xpm or .svg extension"
+ *.svg)
+ exit_failure_syntax "icon name should not include an extension"
;;
esac
fi
@@ -706,14 +721,14 @@ need_gnome_mime=
[ $context = "mimetypes" ] && need_gnome_mime=true
# End GNOME legacy workaround section
-[ -n "$icon_name" ] || icon_name=`basename $icon_file`
+[ -n "$icon_name" ] || icon_name=`basename $icon_file | sed 's/\.[a-z][a-z][a-z]$//'`
if [ "$vendor" = "true" -a "$action" = "install" -a "$context" = "apps" ] ; then
- check_vendor_prefix "$icon_name"
+ check_vendor_prefix "$icon_name" "icon name"
fi
-icon_icon_file=`echo "$icon_file" | sed 's/\.[^\.]*$/.icon/'`
-icon_icon_name=`echo "$icon_name" | sed 's/\.[^\.]*$/.icon/'`
+icon_icon_file=`echo "$icon_file" | sed 's/\.[a-z][a-z][a-z]$/.icon/'`
+icon_icon_name="$icon_name.icon"
DEBUG 1 "$action icon in $xdg_dir"
[ $action = "install" -a -f $icon_icon_file ] && DEBUG 1 "install $icon_icon_name meta file in $xdg_dir"
@@ -726,29 +741,31 @@ case $action in
umask $my_umask
mkdir -p $xdg_dir
- eval 'cp $icon_file $xdg_dir/$icon_name'$xdg_redirect_output
+ eval 'cp $icon_file $xdg_dir/$icon_name.$extension'$xdg_redirect_output
if [ -f "$icon_icon_file" ] ; then
eval 'cp $icon_icon_file $xdg_dir/$icon_icon_name'$xdg_redirect_output
fi
if [ -n "$kde_dir" ] ; then
mkdir -p $kde_dir
- eval 'ln -s $xdg_dir/$icon_name $kde_dir/$icon_name'$xdg_redirect_output
+ eval 'ln -s $xdg_dir/$icon_name.$extension $kde_dir/$icon_name.$extension'$xdg_redirect_output
fi
if [ -n "$need_gnome_mime" ] ; then
- eval 'ln -s $xdg_dir/$icon_name $xdg_dir/gnome-mime-$icon_name'$xdg_redirect_output
+ eval 'ln -s $xdg_dir/$icon_name.$extension $xdg_dir/gnome-mime-$icon_name.$extension'$xdg_redirect_output
fi
umask $save_umask
;;
uninstall)
- rm -f $xdg_dir/$icon_name
- rm -f $xdg_dir/$icon_icon_name
+ rm -f "$xdg_dir/$icon_name.xpm" "$xdg_dir/$icon_name.png" "$xdg_dir/$icon_name.svg"
+ rm -f "$xdg_dir/$icon_icon_name"
if [ -n "$kde_dir" ] ; then
- rm -f $kde_dir/$icon_name
+ rm -f "$kde_dir/$icon_name.xpm" "$kde_dir/$icon_name.png" "$kde_dir/$icon_name.svg"
fi
if [ -n "$need_gnome_mime" ] ; then
- rm -f $xdg_dir/gnome-mime-$icon_name
+ rm -f "$xdg_dir/gnome-mime-$icon_name.xpm"
+ rm -f "$xdg_dir/gnome-mime-$icon_name.png"
+ rm -f "$xdg_dir/gnome-mime-$icon_name.svg"
fi
;;
diff --git a/scripts/xdg-mime b/scripts/xdg-mime
index a801d91..2eac7aa 100755
--- a/scripts/xdg-mime
+++ b/scripts/xdg-mime
@@ -198,7 +198,7 @@ shinythings-shiny.xml:
An icon for this new file type must also be installed, for example with:
-xdg-icon-resource install --context mimetypes --size 64 text-x-shiny.png
+xdg-icon-resource install --context mimetypes --size 64 shiny-file-icon.png text-x-shiny
_MANUALPAGE
}
@@ -341,6 +341,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -348,9 +350,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-mime: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-mime: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-mime --manual' for additional info." >&2
exit 1
}
@@ -393,7 +395,7 @@ check_common_commands()
;;
--version)
- echo "xdg-mime 1.0beta3"
+ echo "xdg-mime 1.0beta4"
exit_success
;;
esac
diff --git a/scripts/xdg-open b/scripts/xdg-open
index e0223e1..db4d7e1 100755
--- a/scripts/xdg-open
+++ b/scripts/xdg-open
@@ -222,6 +222,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -229,9 +231,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-open: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-open: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2
exit 1
}
@@ -274,7 +276,7 @@ check_common_commands()
;;
--version)
- echo "xdg-open 1.0beta3"
+ echo "xdg-open 1.0beta4"
exit_success
;;
esac
@@ -419,7 +421,7 @@ case "$DE" in
xfce)
open_xfce "$url"
- ;;
+ ;;
generic)
open_generic "$url"
diff --git a/scripts/xdg-screensaver b/scripts/xdg-screensaver
index 36e912b..ff388f5 100755
--- a/scripts/xdg-screensaver
+++ b/scripts/xdg-screensaver
@@ -252,6 +252,8 @@ check_input_file()
check_vendor_prefix()
{
+ filename="$2"
+ [ -n "$filename" ] || filename="filename"
file=`basename "$1"`
case "$file" in
[a-zA-Z]*-*)
@@ -259,9 +261,9 @@ check_vendor_prefix()
;;
esac
- echo "xdg-screensaver: filename '$file' does not have a proper vendor prefix" >&2
+ echo "xdg-screensaver: $filename '$file' does not have a proper vendor prefix" >&2
echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
- echo 'with a dash ("-"). An example filename is '"'example-$file'" >&2
+ echo 'with a dash ("-"). An example '"$filename"' is '"'example-$file'" >&2
echo "Use --novendor to override or 'xdg-screensaver --manual' for additional info." >&2
exit 1
}
@@ -304,7 +306,7 @@ check_common_commands()
;;
--version)
- echo "xdg-screensaver 1.0beta3"
+ echo "xdg-screensaver 1.0beta4"
exit_success
;;
esac
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index 86c04fe..1699969 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -168,7 +168,7 @@ check_common_commands()
;;
--version)
- echo "@NAME@ 1.0beta3"
+ echo "@NAME@ 1.0beta4"
exit_success
;;
esac