summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README79
-rwxr-xr-xconfigure55
-rw-r--r--configure.ac2
-rw-r--r--scripts/Makefile.in28
-rw-r--r--scripts/desc/xdg-copy.xml83
-rwxr-xr-xscripts/desc/xdg-email.xml11
-rwxr-xr-xscripts/desc/xdg-menu.xml13
-rw-r--r--scripts/desc/xdg-mime.xml101
-rwxr-xr-xscripts/desc/xdg-open.xml11
-rwxr-xr-xscripts/desc/xdg-su.xml11
-rw-r--r--scripts/html/xdg-copy.html18
-rw-r--r--scripts/html/xdg-email.html2
-rw-r--r--scripts/html/xdg-menu.html2
-rw-r--r--scripts/html/xdg-mime.html22
-rw-r--r--scripts/html/xdg-open.html2
-rw-r--r--scripts/html/xdg-su.html2
-rw-r--r--scripts/man/xdg-copy.165
-rw-r--r--scripts/man/xdg-email.14
-rw-r--r--scripts/man/xdg-menu.14
-rw-r--r--scripts/man/xdg-mime.173
-rw-r--r--scripts/man/xdg-open.14
-rw-r--r--scripts/man/xdg-su.14
-rwxr-xr-xscripts/xdg-copy.in10
-rwxr-xr-xscripts/xdg-email.in9
-rwxr-xr-xscripts/xdg-mime.in16
-rwxr-xr-xscripts/xdg-open.in10
-rwxr-xr-xscripts/xdg-su.in10
27 files changed, 481 insertions, 170 deletions
diff --git a/README b/README
index 19b86cb..f59b5cc 100644
--- a/README
+++ b/README
@@ -72,10 +72,14 @@ that would cause the scripts to be installed to
USE:
----
- To use the scripts, we recommend that you package the scripts
-that you need to use along with your product. The license for xdg-utils
-is very open, so that will cause you no conflict (see LICENSE
-for the exact license details).
+ Although we expect that these scripts will generally come as part
+of the operating system, we recommend that you package the scripts
+that your application needs along with your product as a fallback. For
+this purpose please obtain the original version of the xdg-utils from
+http://www.freedesktop.org/wiki/Portland . The xdg-utils scripts that
+are distributed by operating systems vendors may have been tuned for
+their particular operating system and may not work on the same broad
+variety of operating systems as the original version.
We recommend that you place these scripts in a directory, and
then add that directory to the end of the PATH. So, let's say that
@@ -104,69 +108,6 @@ for them.
If you wish to absolutely force the issue and only use the versions
you shipped, you could instead hard code the path to the version
you bundle with your application. We strongly recommend against
-this, as it will make your product obsolete more quickly than is necessary.
-
-
-
-DETAILED USAGE STATEMENTS:
--------------------------
-
-xdg-menu:
- Usage:
- xdg-menu [--root|--user] [--create desktop|--delete desktop]
- Where --user (install only for the current user) is the default.
- One of --create or --delete must be specified.
- With --create, the file specified must exist and be a valid XDG .desktop file
- With --delete, the file must be a pattern that will exist
- essentially the basename of the file passed in with --create
-
- xdg-menu --user --create /my/path/to/my.desktop
- xdg-menu --user --delete my.desktop
-
-
-xdg-email:
- Opens a given mailto URI registered default application
- Usage:
- xdg-email mailto-uri
-
- xdg-email 'mailto:jwhite@codeweavers.com?subject=This rocks&body=Nice work!&attachment=/tmp/money.png'
-
-
-xdg-mime:
- Manage MIME settings
- Usage:
- xdg-mime [--info file] [--defapp file]
- FIXME - note that much more is yet to come
-
- xdg-mime --info /bin/sh
- xdg-mime --info /tmp/foobar.png
- xdg-mime --defapp /tmp/foobar.png
-
-
-xdg-su:
- Run a program as an alternate user, generally the root user
- Usage:
- xdg-su command-to-run
-
- xdg-su xdg-menu --root create <my-global-desktop-file>
-
-
-xdg-open:
- Opens a given URL or file in the registered default application
- Usage:
- xdg-open URL|file
-
- xdg-open http://www.freedesktop.org
- xdg-open /tmp/foobar.png
-
-
-xdg-copy:
- Copies a file from a source URL/path to a destination URL/path
- Usage:
- xdg-copy source destination
-
- xdg-copy http://portland.freedesktop.org/png/freedesktop-logo.png .
- xdg-copy /tmp/foobar.png /home/user/foobar-copy.png
-
-
+this, as it will make your product obsolete more quickly than is
+necessary.
diff --git a/configure b/configure
index 10acc3e..6db0705 100755
--- a/configure
+++ b/configure
@@ -273,7 +273,7 @@ PACKAGE_VERSION='1'
PACKAGE_STRING='xdg-utils 1'
PACKAGE_BUGREPORT='portland@lists.freedesktop.org'
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA XMLTO LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -872,7 +872,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd "$ac_popdir"
+ cd $ac_popdir
done
fi
@@ -1363,6 +1363,45 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+# Extract the first word of "xmlto", so it can be a program name with args.
+set dummy xmlto; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XMLTO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $XMLTO in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_XMLTO" && ac_cv_path_XMLTO="/usr/bin/xmlto"
+ ;;
+esac
+fi
+XMLTO=$ac_cv_path_XMLTO
+
+if test -n "$XMLTO"; then
+ echo "$as_me:$LINENO: result: $XMLTO" >&5
+echo "${ECHO_T}$XMLTO" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
ac_config_files="$ac_config_files Makefile scripts/Makefile"
@@ -2007,6 +2046,7 @@ s,@SET_MAKE@,$SET_MAKE,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@XMLTO@,$XMLTO,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
@@ -2175,6 +2215,11 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@@ -2213,12 +2258,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
diff --git a/configure.ac b/configure.ac
index d7333d4..3dd00fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_INIT(xdg-utils, 1, portland@lists.freedesktop.org)
AC_PROG_MAKE_SET
AC_PROG_INSTALL
-
+AC_PATH_PROG(XMLTO, xmlto, /usr/bin/xmlto)
AC_CONFIG_FILES([
Makefile
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index f4657cf..3e59975 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -5,7 +5,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS)
INSTALL_LIBRARY = @INSTALL_PROGRAM@ $(INSTALL_PROGRAM_FLAGS)
INSTALL_SCRIPT = @INSTALL_SCRIPT@ $(INSTALL_SCRIPT_FLAGS)
INSTALL_DATA = @INSTALL_DATA@ $(INSTALL_DATA_FLAGS)
-
+XMLTO = @XMLTO@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -21,7 +21,9 @@ SCRIPTS = \
do_subst = sed -e '/[@]xdg-utils-common[@]/ r xdg-utils-common'
-all: $(SCRIPTS)
+all:
+
+scripts: $(SCRIPTS)
distclean: clean
rm -f Makefile
@@ -33,10 +35,7 @@ clean:
README: $(SCRIPTS)
echo > $@
@for x in $(SCRIPTS) ; do \
- echo $$x: >> $@ ; \
- sh ./$$x | sed 's/^/ /' >> $@ ; \
- echo >> $@ ; \
- echo >> $@ ; \
+ sh ./$$x | grep -B 100 Synopsis | head -n-1 >> $@ ; \
done
install: $(SCRIPTS)
@@ -51,8 +50,8 @@ uninstall:
done
-$(RMDIR) $(bindir)
-%: %.in
- $(do_subst) < $< >$@
+%: %.in %.usage %.1 %.html
+ $(do_subst) < $@.in | sed -e '/<< _USAGE/ r '$@.usage >$@
chmod a+x $@
xdg-menu: xdg-menu.in xdg-utils-common
@@ -61,3 +60,16 @@ xdg-mime: xdg-mime.in xdg-utils-common
xdg-su: xdg-su.in xdg-utils-common
xdg-open: xdg-open.in xdg-utils-common
xdg-copy: xdg-copy.in xdg-utils-common
+
+%.1: desc/%.xml
+ (cd man;$(XMLTO) man ../$<)
+
+%.html: desc/%.xml
+ (cd html;$(XMLTO) html-nochunks ../$<)
+
+%.txt: desc/%.xml
+ $(XMLTO) txt $<
+
+%.usage: %.txt
+ grep -B 100 Description $< | (read;read;read a;echo $$a;head -n-1) > $@
+
diff --git a/scripts/desc/xdg-copy.xml b/scripts/desc/xdg-copy.xml
new file mode 100644
index 0000000..94ecdab
--- /dev/null
+++ b/scripts/desc/xdg-copy.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"
+ href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+<refentry id="xdg-copy">
+ <refentryinfo>
+ <title>xdg-copy Manual</title>
+ <copyright>
+ <year>2006</year>
+ </copyright>
+ <author>
+ <firstname>Kevin</firstname>
+ <surname>Krammer</surname>
+ </author>
+ <address><email>kevin.krammer@gmx.at</email></address>
+ <author>
+ <firstname>Jeremy</firstname>
+ <surname>White</surname>
+ </author>
+ <address><email>jwhite@codeweavers.com</email></address>
+ <releaseinfo>This is release 0.5 of the xdg-copy Manual.</releaseinfo>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>xdg-copy</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>xdg-copy</refname>
+ <refpurpose>command line tool for copying files between desktop URIs</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>xdg-copy</command>
+ <arg><option>--help</option></arg>
+ <arg><option><replaceable>source</replaceable></option></arg>
+ <arg><option><replaceable>destination</replaceable></option></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="description">
+ <title>Description</title>
+ <para>
+ xdg-copy copies <replaceable>source</replaceable> to
+ <replaceable>destination</replaceable> and provides visual feedback to
+ the user during the operation. Both <replaceable>source</replaceable>
+ and <replaceable>destination</replaceable> can either be a file or
+ URL. Supported URL types are file, ftp, http and https. Additional
+ URL types may be supported depending on the desktop environment.
+ </para>
+ </refsect1>
+ <refsect1 id="options">
+ <title>Options</title>
+ <variablelist>
+ <varlistentry>
+ <term><option>--help</option></term>
+ <listitem>
+ <simpara>
+ Show this help.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+ <refsect1 id="examples">
+ <title>Examples</title>
+ <para>
+<programlisting>
+xdg-copy "http://portland.freedesktop.org/png/freedesktop-logo.png" .
+</programlisting>
+ </para>
+ <para>
+<programlisting>
+xdg-copy "/tmp/foobar.png" "/home/user/foobar-copy.png"
+</programlisting>
+ </para>
+ </refsect1>
+</refentry>
diff --git a/scripts/desc/xdg-email.xml b/scripts/desc/xdg-email.xml
index 2bc36e6..0d55fb0 100755
--- a/scripts/desc/xdg-email.xml
+++ b/scripts/desc/xdg-email.xml
@@ -4,7 +4,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
-<refentry>
+<refentry id="xdg-email">
<refentryinfo>
<title>xdg-email Manual</title>
<copyright>
@@ -20,11 +20,6 @@
<surname>White</surname>
</author>
<address><email>jwhite@codeweavers.com</email></address>
- <author>
- <firstname>Waldo</firstname>
- <surname>Bastian</surname>
- </author>
- <address><email>waldo.bastian@intel.com</email></address>
<releaseinfo>This is release 0.5 of the xdg-email Manual.</releaseinfo>
</refentryinfo>
@@ -46,8 +41,8 @@
</cmdsynopsis>
</refsynopsisdiv>
- <refsect1 id="introduction">
- <title>Introduction</title>
+ <refsect1 id="description">
+ <title>Description</title>
<para>
xdg-email opens the user's preferred e-mail composer in order to send
a mail to <replaceable>mailto-uri</replaceable>. RFC2368 defines mailto:
diff --git a/scripts/desc/xdg-menu.xml b/scripts/desc/xdg-menu.xml
index 42553a9..79555f5 100755
--- a/scripts/desc/xdg-menu.xml
+++ b/scripts/desc/xdg-menu.xml
@@ -4,7 +4,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
-<refentry>
+<refentry id="xdg-menu">
<refentryinfo>
<title>xdg-menu Manual</title>
<copyright>
@@ -20,12 +20,7 @@
<surname>White</surname>
</author>
<address><email>jwhite@codeweavers.com</email></address>
- <author>
- <firstname>Waldo</firstname>
- <surname>Bastian</surname>
- </author>
- <address><email>waldo.bastian@intel.com</email></address>
- <releaseinfo>This is release 1.0 of the xdg-menu Manual.</releaseinfo>
+ <releaseinfo>This is release 0.5 of the xdg-menu Manual.</releaseinfo>
</refentryinfo>
<refmeta>
@@ -60,8 +55,8 @@
</cmdsynopsis>
</refsynopsisdiv>
- <refsect1 id="introduction">
- <title>Introduction</title>
+ <refsect1 id="description">
+ <title>Description</title>
<para>
The xdg-menu program can be used to install new items to the
desktop's application menu.
diff --git a/scripts/desc/xdg-mime.xml b/scripts/desc/xdg-mime.xml
new file mode 100644
index 0000000..791ebb0
--- /dev/null
+++ b/scripts/desc/xdg-mime.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"
+ href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+<refentry id="xdg-mime">
+ <refentryinfo>
+ <title>xdg-mime Manual</title>
+ <copyright>
+ <year>2006</year>
+ </copyright>
+ <author>
+ <firstname>Kevin</firstname>
+ <surname>Krammer</surname>
+ </author>
+ <address><email>kevin.krammer@gmx.at</email></address>
+ <author>
+ <firstname>Jeremy</firstname>
+ <surname>White</surname>
+ </author>
+ <address><email>jwhite@codeweavers.com</email></address>
+ <releaseinfo>This is release 0.5 of the xdg-mime Manual.</releaseinfo>
+ </refentryinfo>
+
+ <refmeta>
+ <refentrytitle>xdg-mime</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>xdg-mime</refname>
+ <refpurpose>command line tool for providing information about file type handling</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>xdg-mime</command>
+ <arg><option>--help</option></arg>
+ <arg><option>--info <replaceable>FILE</replaceable></option></arg>
+ <arg><option>--defapp <replaceable>FILE</replaceable></option></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="description">
+ <title>Description</title>
+ <para>
+ The xdg-mime program can be used to query information about file types
+ </para>
+ </refsect1>
+ <refsect1 id="options">
+ <title>Options</title>
+ <variablelist>
+ <varlistentry>
+ <term><option>--help</option></term>
+ <listitem>
+ <simpara>
+ Show this help.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term> <option>--info</option> <replaceable>FILE</replaceable></term>
+ <listitem>
+ <simpara>
+ Returns the file type of <replaceable>FILE</replaceable> in the form of a MIME type.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term> <option>--defapp</option> <replaceable>FILE</replaceable></term>
+ <listitem>
+ <simpara>
+ Returns the default application that the desktop environment uses for opening
+ <replaceable>FILE</replaceable>. The default applications is
+ identified by its *.desktop file.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+ <refsect1 id="examples">
+ <title>Examples</title>
+ <para>
+<programlisting>
+xdg-mime --info /tmp/foobar.png
+</programlisting>
+ Prints the MIME type of the file /tmp/foobar.png
+ </para>
+ <para>
+<programlisting>
+xdg-mime --defapp /tmp/foobar.png
+</programlisting>
+ Prints the name of the .desktop file of the application which is
+ registered to open files of the MIME type the file /tmp/foobar.png has
+ </para>
+ </refsect1>
+</refentry>
diff --git a/scripts/desc/xdg-open.xml b/scripts/desc/xdg-open.xml
index cfa45cc..9dfb323 100755
--- a/scripts/desc/xdg-open.xml
+++ b/scripts/desc/xdg-open.xml
@@ -4,7 +4,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
-<refentry>
+<refentry id="xdg-open">
<refentryinfo>
<title>xdg-open Manual</title>
<copyright>
@@ -20,11 +20,6 @@
<surname>White</surname>
</author>
<address><email>jwhite@codeweavers.com</email></address>
- <author>
- <firstname>Waldo</firstname>
- <surname>Bastian</surname>
- </author>
- <address><email>waldo.bastian@intel.com</email></address>
<releaseinfo>This is release 0.5 of the xdg-open Manual.</releaseinfo>
</refentryinfo>
@@ -49,8 +44,8 @@
</cmdsynopsis>
</refsynopsisdiv>
- <refsect1 id="introduction">
- <title>Introduction</title>
+ <refsect1 id="description">
+ <title>Description</title>
<para>
xdg-open opens a file or URL in the user's preferred application.
If a URL is provided the URL will be opened in the user's preferred
diff --git a/scripts/desc/xdg-su.xml b/scripts/desc/xdg-su.xml
index 74e16f5..22b0d2a 100755
--- a/scripts/desc/xdg-su.xml
+++ b/scripts/desc/xdg-su.xml
@@ -4,7 +4,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
-<refentry>
+<refentry id="xdg-su">
<refentryinfo>
<title>xdg-su Manual</title>
<copyright>
@@ -20,11 +20,6 @@
<surname>White</surname>
</author>
<address><email>jwhite@codeweavers.com</email></address>
- <author>
- <firstname>Waldo</firstname>
- <surname>Bastian</surname>
- </author>
- <address><email>waldo.bastian@intel.com</email></address>
<releaseinfo>This is release 0.5 of the xdg-su Manual.</releaseinfo>
</refentryinfo>
@@ -46,8 +41,8 @@
</cmdsynopsis>
</refsynopsisdiv>
- <refsect1 id="introduction">
- <title>Introduction</title>
+ <refsect1 id="description">
+ <title>Description</title>
<para>
xdg-su runs <replaceable>command</replaceable> as root after prompting
the user for the root password.
diff --git a/scripts/html/xdg-copy.html b/scripts/html/xdg-copy.html
new file mode 100644
index 0000000..a6f8b58
--- /dev/null
+++ b/scripts/html/xdg-copy.html
@@ -0,0 +1,18 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-copy</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-copy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-copy &#8212; command line tool for copying files between desktop URIs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-copy</code> [<code class="option">--help</code>] [<code class="option"><em class="replaceable"><code>source</code></em></code>] [<code class="option"><em class="replaceable"><code>destination</code></em></code>]</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
+ xdg-copy copies <em class="replaceable"><code>source</code></em> to
+ <em class="replaceable"><code>destination</code></em> and provides visual feedback to
+ the user during the operation. Both <em class="replaceable"><code>source</code></em>
+ and <em class="replaceable"><code>destination</code></em> can either be a file or
+ URL. Supported URL types are file, ftp, http and https. Additional
+ URL types may be supported depending on the desktop environment.
+ </p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--help</code></span></dt><dd>
+ Show this help.
+ </dd></dl></div></div><div class="refsect1" lang="en"><a name="examples"></a><h2>Examples</h2><p>
+</p><pre class="programlisting">
+xdg-copy "http://portland.freedesktop.org/png/freedesktop-logo.png" .
+</pre><p>
+ </p><p>
+</p><pre class="programlisting">
+xdg-copy "/tmp/foobar.png" "/home/user/foobar-copy.png"
+</pre><p>
+ </p></div></div></body></html>
diff --git a/scripts/html/xdg-email.html b/scripts/html/xdg-email.html
index b2a7104..ea8ab9a 100644
--- a/scripts/html/xdg-email.html
+++ b/scripts/html/xdg-email.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-email</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="id2428304"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-email &#8212; command line tool for sending mail using the user's preferred e-mail composer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-email</code> [<code class="option">--help</code>] [<code class="option"><em class="replaceable"><code>mailto-uri</code></em></code>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-email</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-email"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-email &#8212; command line tool for sending mail using the user's preferred e-mail composer</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-email</code> [<code class="option">--help</code>] [<code class="option"><em class="replaceable"><code>mailto-uri</code></em></code>]</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
xdg-email opens the user's preferred e-mail composer in order to send
a mail to <em class="replaceable"><code>mailto-uri</code></em>. RFC2368 defines mailto:
URIs. <em class="replaceable"><code>mailto-uri</code></em> may contain fields for to, cc,
diff --git a/scripts/html/xdg-menu.html b/scripts/html/xdg-menu.html
index da52927..cf772d8 100644
--- a/scripts/html/xdg-menu.html
+++ b/scripts/html/xdg-menu.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-menu</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="id2699117"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-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-menu</code> [<code class="option">--help</code>] [<code class="option">--vendor <em class="replaceable"><code>vendor-id</code></em></code>] [<code class="option">--noupdate</code>] [[--user] | [--system]] [[--install <em class="replaceable"><code>desktop-file</code></em>] | [--install <em class="replaceable"><code>directory-file</code></em>] | [--install <em class="replaceable"><code>menu-file</code></em>] | [--uninstall <em class="replaceable"><code>desktop-file</code></em>] | [--uninstall <em class="replaceable"><code>directory-file</code></em>] | [--uninstall <em class="replaceable"><code>menu-file</code></em>] | [--forceupdate]]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-menu</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-menu"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-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-menu</code> [<code class="option">--help</code>] [<code class="option">--vendor <em class="replaceable"><code>vendor-id</code></em></code>] [<code class="option">--noupdate</code>] [[--user] | [--system]] [[--install <em class="replaceable"><code>desktop-file</code></em>] | [--install <em class="replaceable"><code>directory-file</code></em>] | [--install <em class="replaceable"><code>menu-file</code></em>] | [--uninstall <em class="replaceable"><code>desktop-file</code></em>] | [--uninstall <em class="replaceable"><code>directory-file</code></em>] | [--uninstall <em class="replaceable"><code>menu-file</code></em>] | [--forceupdate]]</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
The xdg-menu program can be used to install new items to the
desktop's application menu.
</p><p>
diff --git a/scripts/html/xdg-mime.html b/scripts/html/xdg-mime.html
new file mode 100644
index 0000000..d8a5635
--- /dev/null
+++ b/scripts/html/xdg-mime.html
@@ -0,0 +1,22 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-mime</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-mime"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-mime &#8212; command line tool for providing information about file type handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-mime</code> [<code class="option">--help</code>] [<code class="option">--info <em class="replaceable"><code>FILE</code></em></code>] [<code class="option">--defapp <em class="replaceable"><code>FILE</code></em></code>]</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
+ The xdg-mime program can be used to query information about file types
+ </p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--help</code></span></dt><dd>
+ Show this help.
+ </dd><dt><span class="term"> <code class="option">--info</code> <em class="replaceable"><code>FILE</code></em></span></dt><dd>
+ Returns the file type of <em class="replaceable"><code>FILE</code></em> in the form of a MIME type.
+ </dd><dt><span class="term"> <code class="option">--defapp</code> <em class="replaceable"><code>FILE</code></em></span></dt><dd>
+ Returns the default application that the desktop environment uses for opening
+ <em class="replaceable"><code>FILE</code></em>. The default applications is
+ identified by its *.desktop file.
+ </dd></dl></div></div><div class="refsect1" lang="en"><a name="examples"></a><h2>Examples</h2><p>
+</p><pre class="programlisting">
+xdg-mime --info /tmp/foobar.png
+</pre><p>
+ Prints the MIME type of the file /tmp/foobar.png
+ </p><p>
+</p><pre class="programlisting">
+xdg-mime --defapp /tmp/foobar.png
+</pre><p>
+ Prints the name of the .desktop file of the application which is
+ registered to open files of the MIME type the file /tmp/foobar.png has
+ </p></div></div></body></html>
diff --git a/scripts/html/xdg-open.html b/scripts/html/xdg-open.html
index ef779aa..950ef46 100644
--- a/scripts/html/xdg-open.html
+++ b/scripts/html/xdg-open.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-open</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="id2602179"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-open &#8212; opens a file or URL in the user's preferred application</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-open</code> [<code class="option">--help</code>] [[<code class="option"><em class="replaceable"><code>file</code></em></code>] | [<code class="option"><em class="replaceable"><code>URL</code></em></code>]]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-open</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-open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-open &#8212; opens a file or URL in the user's preferred application</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-open</code> [<code class="option">--help</code>] [[<code class="option"><em class="replaceable"><code>file</code></em></code>] | [<code class="option"><em class="replaceable"><code>URL</code></em></code>]]</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
xdg-open opens a file or URL in the user's preferred application.
If a URL is provided the URL will be opened in the user's preferred
web browser. If a file is provided the file will be opened in the
diff --git a/scripts/html/xdg-su.html b/scripts/html/xdg-su.html
index 81b900a..6a75c13 100644
--- a/scripts/html/xdg-su.html
+++ b/scripts/html/xdg-su.html
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-su</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="id2600404"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-su &#8212; run a program as root after prompting for the root password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-su</code> [<code class="option">--help</code>] [<code class="option"><em class="replaceable"><code>command</code></em></code>]</p></div></div><div class="refsect1" lang="en"><a name="introduction"></a><h2>Introduction</h2><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-su</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-su"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-su &#8212; run a program as root after prompting for the root password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-su</code> [<code class="option">--help</code>] [<code class="option"><em class="replaceable"><code>command</code></em></code>]</p></div></div><div class="refsect1" lang="en"><a name="description"></a><h2>Description</h2><p>
xdg-su runs <em class="replaceable"><code>command</code></em> as root after prompting
the user for the root password.
</p></div><div class="refsect1" lang="en"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--help</code></span></dt><dd>
diff --git a/scripts/man/xdg-copy.1 b/scripts/man/xdg-copy.1
new file mode 100644
index 0000000..dc68b62
--- /dev/null
+++ b/scripts/man/xdg-copy.1
@@ -0,0 +1,65 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "XDG-COPY" 1 "" "" "xdg-copy Manual"
+.SH NAME
+xdg-copy \- command line tool for copying files between desktop URIs
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 9
+\fBxdg\-copy\fR [\fB\-\-help\fR] [\fB\fIsource\fR\fR] [\fB\fIdestination\fR\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+xdg\-copy copies \fIsource\fR to \fIdestination\fR and provides visual feedback to the user during the operation\&. Both \fIsource\fR and \fIdestination\fR can either be a file or URL\&. Supported URL types are file, ftp, http and https\&. Additional URL types may be supported depending on the desktop environment\&.
+
+.SH "OPTIONS"
+
+.TP
+\fB\-\-help\fR
+Show this help\&.
+
+.SH "EXAMPLES"
+
+.PP
+
+
+.nf
+
+xdg\-copy "http://portland\&.freedesktop\&.org/png/freedesktop\-logo\&.png" \&.
+
+.fi
+
+
+.PP
+
+
+.nf
+
+xdg\-copy "/tmp/foobar\&.png" "/home/user/foobar\-copy\&.png"
+
+.fi
+
+
+.SH AUTHORS
+Kevin Krammer, Jeremy White.
diff --git a/scripts/man/xdg-email.1 b/scripts/man/xdg-email.1
index f43f9d6..ff74e1c 100644
--- a/scripts/man/xdg-email.1
+++ b/scripts/man/xdg-email.1
@@ -28,7 +28,7 @@ xdg-email \- command line tool for sending mail using the user's preferred e-mai
.ad
.hy
-.SH "INTRODUCTION"
+.SH "DESCRIPTION"
.PP
xdg\-email opens the user's preferred e\-mail composer in order to send a mail to \fImailto\-uri\fR\&. RFC2368 defines mailto: URIs\&. \fImailto\-uri\fR may contain fields for to, cc, bcc, subject, body and attachment\&.
@@ -54,4 +54,4 @@ xdg\-email 'mailto:jwhite@codeweavers\&.com?subject=Logo contest&' \\
.SH AUTHORS
-Kevin Krammer, Jeremy White, Waldo Bastian.
+Kevin Krammer, Jeremy White.
diff --git a/scripts/man/xdg-menu.1 b/scripts/man/xdg-menu.1
index 46a0ec0..1b97ee7 100644
--- a/scripts/man/xdg-menu.1
+++ b/scripts/man/xdg-menu.1
@@ -28,7 +28,7 @@ xdg-menu \- command line tool for (un)installing desktop menu items
.ad
.hy
-.SH "INTRODUCTION"
+.SH "DESCRIPTION"
.PP
The xdg\-menu program can be used to install new items to the desktop's application menu\&.
@@ -87,4 +87,4 @@ Removes the *\&.menu file indicated by \fImenu\-file\fR from the menu system\&.
Force an update of the menu system\&. This is only useful if the last call to xdg\-menu included the \fB\-\-noupdate\fR option\&.
.SH AUTHORS
-Kevin Krammer, Jeremy White, Waldo Bastian.
+Kevin Krammer, Jeremy White.
diff --git a/scripts/man/xdg-mime.1 b/scripts/man/xdg-mime.1
new file mode 100644
index 0000000..a23b186
--- /dev/null
+++ b/scripts/man/xdg-mime.1
@@ -0,0 +1,73 @@
+.\"Generated by db2man.xsl. Don't modify this, modify the source.
+.de Sh \" Subsection
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.TH "XDG-MIME" 1 "" "" "xdg-mime Manual"
+.SH NAME
+xdg-mime \- command line tool for providing information about file type handling
+.SH "SYNOPSIS"
+.ad l
+.hy 0
+.HP 9
+\fBxdg\-mime\fR [\fB\-\-help\fR] [\fB\-\-info\ \fIFILE\fR\fR] [\fB\-\-defapp\ \fIFILE\fR\fR]
+.ad
+.hy
+
+.SH "DESCRIPTION"
+
+.PP
+The xdg\-mime program can be used to query information about file types
+
+.SH "OPTIONS"
+
+.TP
+\fB\-\-help\fR
+Show this help\&.
+
+.TP
+\fB\-\-info\fR \fIFILE\fR
+Returns the file type of \fIFILE\fR in the form of a MIME type\&.
+
+.TP
+\fB\-\-defapp\fR \fIFILE\fR
+Returns the default application that the desktop environment uses for opening \fIFILE\fR\&. The default applications is identified by its *\&.desktop file\&.
+
+.SH "EXAMPLES"
+
+.PP
+
+
+.nf
+
+xdg\-mime \-\-info /tmp/foobar\&.png
+
+.fi
+ Prints the MIME type of the file /tmp/foobar\&.png
+
+.PP
+
+
+.nf
+
+xdg\-mime \-\-defapp /tmp/foobar\&.png
+
+.fi
+ Prints the name of the \&.desktop file of the application which is registered to open files of the MIME type the file /tmp/foobar\&.png has
+
+.SH AUTHORS
+Kevin Krammer, Jeremy White.
diff --git a/scripts/man/xdg-open.1 b/scripts/man/xdg-open.1
index 141c196..ef84ded 100644
--- a/scripts/man/xdg-open.1
+++ b/scripts/man/xdg-open.1
@@ -28,7 +28,7 @@ xdg-open \- opens a file or URL in the user's preferred application
.ad
.hy
-.SH "INTRODUCTION"
+.SH "DESCRIPTION"
.PP
xdg\-open opens a file or URL in the user's preferred application\&. If a URL is provided the URL will be opened in the user's preferred web browser\&. If a file is provided the file will be opened in the preferred application for files of that type\&. xdg\-open supports file, ftp, http and https URLs\&.
@@ -62,4 +62,4 @@ xdg\-open /tmp/FinancialReport\&.pdf
.SH AUTHORS
-Kevin Krammer, Jeremy White, Waldo Bastian.
+Kevin Krammer, Jeremy White.
diff --git a/scripts/man/xdg-su.1 b/scripts/man/xdg-su.1
index a42ae70..df950b8 100644
--- a/scripts/man/xdg-su.1
+++ b/scripts/man/xdg-su.1
@@ -28,7 +28,7 @@ xdg-su \- run a program as root after prompting for the root password
.ad
.hy
-.SH "INTRODUCTION"
+.SH "DESCRIPTION"
.PP
xdg\-su runs \fIcommand\fR as root after prompting the user for the root password\&.
@@ -52,4 +52,4 @@ xdg\-su /opt/shinythings/bin/install\-GUI
.SH AUTHORS
-Kevin Krammer, Jeremy White, Waldo Bastian.
+Kevin Krammer, Jeremy White.
diff --git a/scripts/xdg-copy.in b/scripts/xdg-copy.in
index e65a3c4..2d6bd8e 100755
--- a/scripts/xdg-copy.in
+++ b/scripts/xdg-copy.in
@@ -16,13 +16,8 @@
usage()
{
- APP=`basename $0`
- echo "Copies a file from a source URL/path to a destination URL/path"
- echo "Usage:"
- echo $APP "source destination"
- echo
- echo $APP "http://portland.freedesktop.org/png/freedesktop-logo.png" .
- echo $APP "/tmp/foobar.png" "/home/user/foobar-copy.png"
+cat << _USAGE
+_USAGE
exit 1
}
@@ -42,6 +37,7 @@ copy_gnome()
[ "$1" != "" ] || usage
[ "$2" != "" ] || usage
+[ "$1" != "--help" ] || usage
#@xdg-utils-common@
diff --git a/scripts/xdg-email.in b/scripts/xdg-email.in
index 5cf444d..7611770 100755
--- a/scripts/xdg-email.in
+++ b/scripts/xdg-email.in
@@ -9,12 +9,8 @@
#---------------------------------------------
usage()
{
- APP=`basename $0`
- echo "Opens a given mailto URI registered default application"
- echo "Usage:"
- echo $APP mailto-uri
- echo
- echo $APP "\'mailto:jwhite@codeweavers.com?subject=This rocks&body=Nice work!&attachment=/tmp/money.png\'"
+cat << _USAGE
+_USAGE
exit 1
}
@@ -34,6 +30,7 @@ open_gnome()
[ "$1" != "" ] || usage
+[ "$1" != "--help" ] || usage
#@xdg-utils-common@
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
index 1920e1d..276e96f 100755
--- a/scripts/xdg-mime.in
+++ b/scripts/xdg-mime.in
@@ -14,21 +14,10 @@
#
#---------------------------------------------
-
usage()
{
- APP=`basename $0`
- echo "Manage MIME settings"
- echo "Usage:"
- echo $APP [--info file] [--defapp file]
- echo FIXME - note that much more is yet to come
- echo
- echo "--info: Tries to determine the given file's MIME type"
- echo "--defapp: Tries to determine the given file's default handler application"
- echo
- echo $APP --info "/bin/sh"
- echo $APP --info "/tmp/foobar.png"
- echo $APP --defapp "/tmp/foobar.png"
+cat << _USAGE
+_USAGE
exit 1
}
@@ -73,6 +62,7 @@ defapp_gnome()
}
[ "$1" != "" ] || usage
+[ "$1" != "--help" ] || usage
#@xdg-utils-common@
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 4a8eac7..a0ffb10 100755
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -15,13 +15,8 @@
usage()
{
- APP=`basename $0`
- echo "Opens a given URL or file in the registered default application"
- echo "Usage:"
- echo $APP "URL|file"
- echo
- echo $APP "http://www.freedesktop.org"
- echo $APP "/tmp/foobar.png"
+cat << _USAGE
+_USAGE
exit 1
}
@@ -57,6 +52,7 @@ open_generic()
}
[ "$1" != "" ] || usage
+[ "$1" != "--help" ] || usage
#@xdg-utils-common@
diff --git a/scripts/xdg-su.in b/scripts/xdg-su.in
index 3e6cb8f..8a0d473 100755
--- a/scripts/xdg-su.in
+++ b/scripts/xdg-su.in
@@ -16,12 +16,8 @@
usage()
{
- APP=`basename $0`
- echo "Run a program as an alternate user, generally the root user"
- echo "Usage:"
- echo $APP command-to-run
- echo
- echo $APP xdg-menu --root create '<my-global-desktop-file>'
+cat << _USAGE
+_USAGE
exit 1
}
@@ -53,6 +49,8 @@ su_generic()
}
[ "$1" != "" ] || usage
+[ "$1" != "--help" ] || usage
+[ "${1:0:1}" != "-" ] || usage
#@xdg-utils-common@