summaryrefslogtreecommitdiff
path: root/chromium/third_party/xdg-utils
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-20 15:06:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-22 11:48:58 +0000
commitdaa093eea7c773db06799a13bd7e4e2e2a9f8f14 (patch)
tree96cc5e7b9194c1b29eab927730bfa419e7111c25 /chromium/third_party/xdg-utils
parentbe59a35641616a4cf23c4a13fa0632624b021c1b (diff)
downloadqtwebengine-chromium-daa093eea7c773db06799a13bd7e4e2e2a9f8f14.tar.gz
BASELINE: Update Chromium to 63.0.3239.58
Change-Id: Ia93b322a00ba4dd4004f3bcf1254063ba90e1605 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/xdg-utils')
-rw-r--r--chromium/third_party/xdg-utils/ChangeLog340
-rw-r--r--chromium/third_party/xdg-utils/LICENSE18
-rw-r--r--chromium/third_party/xdg-utils/Makefile.in39
-rw-r--r--chromium/third_party/xdg-utils/OWNERS2
-rw-r--r--chromium/third_party/xdg-utils/README100
-rw-r--r--chromium/third_party/xdg-utils/README.chromium26
-rw-r--r--chromium/third_party/xdg-utils/RELEASE_NOTES64
-rw-r--r--chromium/third_party/xdg-utils/TODO25
-rwxr-xr-xchromium/third_party/xdg-utils/configure2320
-rw-r--r--chromium/third_party/xdg-utils/configure.ac13
-rw-r--r--chromium/third_party/xdg-utils/install-sh251
-rw-r--r--chromium/third_party/xdg-utils/scripts/HACKING17
-rw-r--r--chromium/third_party/xdg-utils/scripts/Makefile.in116
-rw-r--r--chromium/third_party/xdg-utils/scripts/README19
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-copy.xml153
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-icon.xml364
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-menu.xml685
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/desc/xdg-email.xml281
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-file-dialog.xml222
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-icon-resource.xml372
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-mime.xml373
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/desc/xdg-open.xml156
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/desc/xdg-screensaver.xml227
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-settings.xml197
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/desc/xdg-su.xml166
-rw-r--r--chromium/third_party/xdg-utils/scripts/desc/xdg-terminal.xml137
-rw-r--r--chromium/third_party/xdg-utils/scripts/generate-help-script.awk110
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/index.html19
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/index.html.post3
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/index.html.pre7
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-desktop-icon.html133
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-desktop-menu.html334
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-email.html89
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-icon-resource.html128
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-mime.html145
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-open.html38
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-screensaver.html63
-rw-r--r--chromium/third_party/xdg-utils/scripts/html/xdg-settings.html59
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-desktop-icon.1241
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-desktop-menu.1448
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-email.1199
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-icon-resource.1244
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-mime.1286
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-open.1124
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-screensaver.1154
-rw-r--r--chromium/third_party/xdg-utils/scripts/man/xdg-settings.1154
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-copy303
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-copy.in106
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-desktop-icon670
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-desktop-icon.in160
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-desktop-menu1335
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-desktop-menu.in628
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-email865
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-email.in404
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-file-dialog603
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-file-dialog.in365
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-icon-resource952
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-icon-resource.in450
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-mime1402
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-mime.in871
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-open697
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-open.in288
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-screensaver1067
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-screensaver.in627
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-settings1187
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-settings.in752
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-su438
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-su.in161
-rwxr-xr-xchromium/third_party/xdg-utils/scripts/xdg-terminal484
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-terminal.in188
-rw-r--r--chromium/third_party/xdg-utils/scripts/xdg-utils-common.in329
-rw-r--r--chromium/third_party/xdg-utils/scripts/xsl/README23
-rw-r--r--chromium/third_party/xdg-utils/scripts/xsl/refentry2htmlindex.xsl20
-rw-r--r--chromium/third_party/xdg-utils/scripts/xsl/sharedmime-list.xsl13
-rw-r--r--chromium/third_party/xdg-utils/scripts/xsl/sharedmime2mimelnk.xsl32
75 files changed, 0 insertions, 25081 deletions
diff --git a/chromium/third_party/xdg-utils/ChangeLog b/chromium/third_party/xdg-utils/ChangeLog
deleted file mode 100644
index d8a2c0174bf..00000000000
--- a/chromium/third_party/xdg-utils/ChangeLog
+++ /dev/null
@@ -1,340 +0,0 @@
-=== xdg-utils 1.1.x ===
-
-2011-07-19 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-utils-common.in: support $XDG_CURRENT_DESKTOP
-
-2011-07-13 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-mime : use 'file --mime-type' instead of 'file -i' (BR39166)
-
-2011-05-10 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-mime : handle home dirs with spaces, mimeapps.list not existing. Thanks to Mike Mammarella.
-
-2011-05-05 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-utils-common.in : add missing ;;
-
-2011-05-04 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-utils-common.in : move a couple of utility functions here (from
- xdg-settings), needed for xdg-email
- * xdg-utils-common.in : binary_to_desktop_file, handle vendor dirs
-
-2011-04-20 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-desktop-icon does not work when user desktop dir has spaces (BR36417)
-
-2011-04-14 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-open does not detect xfce (BR25941)
- * xdg-open's list of fallback browsers excludes seamonkey (BR33699)
- * text BROWSER=+elinks
- * xdg-open is sensitive to default grep options (BR34164)
- * xdg-{open,email} should try x-www-browser (BR33095)
- * xdg-email outputs errors with localized KDE4 (BR32924)
- * xdg-email runs kmailservice with incorrect locale (BR33106)
- * spurious capture of which in KMIMETYPEFINDER (BR31444)
-
-2011-04-12 Rex Dieter <rdieter@fedoraproject.org>
- * suppress 'which gnome-default-applications-properties' output. Thanks to Mike Mammarella.
-
-2011-04-08 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-mime: add mimeapps.list support. Thanks to Chris Coulson.
-
-2011-03-31 Rex Dieter <rdieter@fedoraproject.org>
- * Don't overwrite a /usr/share/applications/defaults.list symlink (BR35794)
- * Use D-Bus API for GNOME screensaver (BR29860)
- * Initial support for DE=Darwin, Default for $BROWSER under Mac OS (BR35500)
-
-2011-03-28 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-open cannot detect xfce 4.8 correctly (BR33321)
- * xdg-mime's info_generic doesn't normalize symlinks (BR33097)
- * mimetype support for xdg-mime (generic) (BR33094)
- * open_generic_xdg_mime is broken when a .desktop file
- Exec has arguments (BR30453)
-
-2011-02-01 Rex Dieter <rdieter@fedoraproject.org>
- * add support for GNOME 3.x
-
-2011-01-09 Fathi Boudra <fabo@freedesktop.org>
- * xdg-email: call kfmclient_fix_exit_code() under KDE 3 only.
- Thanks to Luc Menut. (BR32924)
- * xdg-utils-common: set C.UTF-8 locale to make sure the version parsing is
- done as expected. Under some locales the KDE version string doesn't start
- with "KDE".
- * xdg-terminal: Fix failure because the which std output is wrongly
- redirected to /dev/null in terminal_kde(). Thanks to Luc Menut.
- (BR32927)
-
-=== xdg-utils 1.1.0-rc1 ===
-
-2010-12-31 Fathi Boudra <fabo@freedesktop.org>
- * xdg-mime: correct install text to use type/subtype.
- Thanks to Christopher Yeleighton. (BR31441)
- * xdg-open: declare file variable as local. (BR32487)
- * xdg-open: decode file:// urls. Thanks to Henning Garus.
- * xdg-screensaver: support X server blanking. Thanks to Ben Hutchings.
-
-2010-11-18 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-utils-common: fixup kfmclient_fix_exit_code() for newer kde-config
- output
- * xdg-mime: fix typo in manpage
- * xdg-email: Thunderbird is not detected with localized (BR31740)
-
-2010-10-28 Rex Dieter <rdieter@fedoraproject.org>
- * add lxde support (BR26058)
-
-2010-09-25 Fathi Boudra <fabo@freedesktop.org>
- * xdg-settings: Only run KDE browser fallback when necessary. Otherwise,
- in some circumstances, read_kde_browser incorrectly prints the result
- twice. Thanks to David Benjamin.
-
-2010-09-24 Fathi Boudra <fabo@freedesktop.org>
- * xdg-email: Fix e-mail attachements support with Thunderbird3 (BR13435)
-
-2010-09-24 Fathi Boudra <fabo@freedesktop.org>
- * xdg-mime: update the required section "[Added Associations]"
- Thanks to Mike Mammarella:
-
-2010-09-24 Fathi Boudra <fabo@freedesktop.org>
- * xdg-email: Fix missing backslash in awk script so that it works with
- mawk.
-
-2010-09-24 Fathi Boudra <fabo@freedesktop.org>
- * xdg-desktop-icon: set the execute bit to desktop file.
- Thanks to Damjan Jovanovic. (BR28394)
-
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-screensaver: consider gnome-screensaver a separate DE (BR20027)
-
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-mime : use 'gnomevfs-info --slow-mime' (BR 13939)
-
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-desktop-icon : use localized desktop folder name (BR19011)
-
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-open : use mimeopen -L (follow symlinks)
-
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-open.1 : add FILES, SEE ALSO sections
-
-2010-05-16 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-open: Spaces in filename (BR27959)
-
-2010-04-22 Fathi Boudra <fabo@freedesktop.org>
- * xdg-email and xdg-open: perform BROWSER check in any case.
- Thanks to Andrea Florio. (BR27551)
-
-2010-04-22 Fathi Boudra <fabo@freedesktop.org>
- * xdg-email: try console mode browsers and update the browser list.
-
-2010-02-28 Fathi Boudra <fabo@freedesktop.org>
- * xdg-utils-common: fix the comment of exit_failure_file_permission_write
- function. (BR12821)
-
-2010-02-28 Fathi Boudra <fabo@freedesktop.org>
- * xdg-open: fix regression in open_generic as xdg-mime doesn't handle
- URLs (mimeopen and run-mailcap as well). Move xdg-mime call into
- a new function (open_generic_xdg_mime). Check input file before
- trying to open them with non-browsers.
-
-2010-02-28 Fathi Boudra <fabo@freedesktop.org>
- * xdg-open: fix failure if $BROWSER has arguments. (BR14374)
- Thanks to Johannes Wegener.
-
-2010-02-28 Fathi Boudra <fabo@freedesktop.org>
- * xdg-open: try console mode browsers and update the browser list.
- Thanks to Ville Skyttä and Pablo Castellano. (BR14361)
-
-2010-02-24 Fathi Boudra <fabo@freedesktop.org>
- * xdg-screensaver: use dbus-send instead of qdbus for freedesktop
- screensaver.
-
-2010-02-23 Fathi Boudra <fabo@freedesktop.org>
- * xdg-mime: improve MIME string check when using gnomevfs-info. (BR12818)
-
-2010-02-23 Fathi Boudra <fabo@freedesktop.org>
- * xdg-mime: report error on failure.
-
-2010-02-21 Fathi Boudra <fabo@freedesktop.org>
- * xdg-open: in open_generic, use xdg-mime to lookup mime type and
- association before the alternatives methods (mimeopen and run-mailcap).
- (BR23280)
-
-2010-02-20 Fathi Boudra <fabo@freedesktop.org>
- * Add gvfs-copy and gvfs-info support. (BR15828)
-
-2010-01-27 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-settings: Add %s to the command in the Gnome url handlers (BR26284)
-
-2010-01-18 Rex Dieter <rdieter@fedoraproject.org>
- * xdg-screensaver resume activates the screensaver on KDE4 (BR26085)
-
-2009-10-16 Rex Dieter <rdieter@fedoraproject.org>
- * prefer gvfs-open over gnome-open
- * DE=gnome, if org.gnome.SessionManager exists on dbus
-
-2009-10-12 Fathi Boudra <fabo@freedesktop.org>
- * Fix xdg-email --attach failure with Evolution. (BR23007)
- Thanks to Dwayne Bailey <dwayne@translate.org.za>
-
-2009-10-12 Fathi Boudra <fabo@freedesktop.org>
- * Add an extra check in xdg-open and call kfmclient openURL as a fallback
- on KDE 4. Thanks to Nicolas Lécureil <neoclust@mandriva.org>
-
-2009-10-12 Fathi Boudra <fabo@freedesktop.org>
- * Add email attachments support to Thunderbird from xdg-email. (BR13435)
- Thanks to Lei Zhang <thestig@google.com>
-
-2009-10-12 Fathi Boudra <fabo@freedesktop.org>
- * Fix xdg-open to handle URL with '#' symbol. (BR23319, BR24375)
-
-2009-10-12 Fathi Boudra <fabo@freedesktop.org>
- * Remove bash requirement to xdg-open and xdg-email. (BR20015)
-
-2009-10-12 Fathi Boudra <fabo@freedesktop.org>
- * Update xdg-settings - Thanks to Mike Mammarella:
- This fixes some issues where user-generated icons would be detected as
- the official .desktop file for a binary, rather than the actual version.
- (It resolves forward and compares binaries rather than resolving backward
- to a .desktop file from a binary)
-
-2009-09-28 Rex Dieter <rdieter@fedoraproject.org>
- * Use kde-open, if available (ie, KDE 4)
-
-2009-09-13 Rex Dieter <rdieter@fedoraproject.org>
- * detect_de: suppress xprop stderr.
-
-2009-08-25 Rex Dieter <rdieter@fedoraproject.org>
- * fix build for missing manpages (eg. xdg-settings)
-
-2009-08-25 Fathi Boudra <fabo@freedesktop.org>
- * Fix hardcoded KDE home directory. Use kde(4)-config to get path.
-
-2009-08-25 Fathi Boudra <fabo@freedesktop.org>
- * Apply patch from Mike Mammarella <mdm@chromium.org> to fix 2 issues:
- - skip invisible desktop files when looking up the default web browser in
- GNOME. (http://codereview.chromium.org/159738)
- - check for localized settings by hand in xdg-settings if kreadconfig
- fails. (http://codereview.chromium.org/160376)
-
-2009-08-10 Fathi Boudra <fabo@freedesktop.org>
- * Replace kfmclient by kioclient usage under KDE 4.
- Thanks to Nicolas Lécureil <neoclust@mandriva.org>
-
-2009-08-03 Fathi Boudra <fabo@freedesktop.org>
- * Remove fixup_mandriva_categories() function. It is not needed anymore
- since a year. Thanks to Nicolas Lécureil <neoclust@mandriva.org>
-
-2009-07-29 Fathi Boudra <fabo@freedesktop.org>
- * Merge xdg-settings utility: a script to get various settings from
- the desktop environment. Thanks to Dan Kegel and Google Inc.
-
-2009-07-29 Fathi Boudra <fabo@freedesktop.org>
- * Fix hardcoded path in make_default_kde() in xdg-mime unde KDE 3.
- Add initial KDE 4 support to the function.
-
-2009-07-28 Fathi Boudra <fabo@freedesktop.org>
- * Use kbuildsycoca4 under KDE 4 and kbuildsycoca under KDE 3.
-
-2009-07-28 Fathi Boudra <fabo@freedesktop.org>
- * Use kmimetypefinder under KDE 4 and kfile under KDE 3.
-
-2009-07-28 Fathi Boudra <fabo@freedesktop.org>
- * Add KDE 4 support to xdg-mime. kdetradertest was replaced by
- ktraderclient under KDE 4. (BR22975)
-
-2009-07-27 Fathi Boudra <fabo@freedesktop.org>
- * Remove -u option from su. It doesn't have it.
-
-2009-07-27 Fathi Boudra <fabo@freedesktop.org>
- * Add KDE 4 support to xdg-email (BR17268)
-
-2009-07-26 Fathi Boudra <fabo@freedesktop.org>
- * Sleep for 50s instead of 59s to avoid to froze the seesion (BR19414)
-
-2009-07-26 Fathi Boudra <fabo@freedesktop.org>
- * Fix a race condition in xdg-screensaver (BR19382)
-
-2009-07-26 Fathi Boudra <fabo@freedesktop.org>
- * Fix basename usage when filename contains spaces (BR18567)
-
-2009-07-26 Fathi Boudra <fabo@freedesktop.org>
- * Fix bashisms used in xdg-mime and xdg-screensaver (BR15827)
-
-2008-08-11 Rex Dieter <rdieter@fedoraproject.org>
- * initial support for KDE 4
- * Add dbus commands to xdg-screensaver for KDE 4 (BR17537)
-
-2008-01-24 Kevin Krammer <kevin.krammer@gmx.at>
- * Fixing security issue in xdg-email and xdg-open at replacing
- parameter in $BROWSER
-
-2007-06-27 Waldo Bastian <waldo.bastian@intel.com>
- * Fix xdg-mime query filetype on XFCE (BR11383)
-
-=== xdg-utils 1.0.2 ====
-
-=== xdg-utils 1.0.1 ====
-
-2006-11-03 Waldo Bastian <waldo.bastian@intel.com>
- * Fixed spurious output on stdout by xdg-desktop-menu
- * Cleaned up shell syntax for xdg-screensaver and xdg-icon-resource
- (fixes Ubuntu 6.10)
-
-2006-10-29 Kevin Krammer <kevin.krammer@gmx.at>
- * Fixed non-ascii mailto URI handling of xdg-emial on non-UTF8 locales
- under KDE
-
-=== xdg-utils 1.0 ====
-
-2006-05-10 Bryce Harrington <bryce@osdl.org>
- * Created xdg-screensaver
-
-2006-04-24 Kevin Krammer <kevin.krammer@gmx.at>
- * Applied patch provided by Benedikt Meurer <benedikt.meurer@unix-ag.uni-siegen.de>
- to improve the compatability of the Makefile
- * Added --title option to xdg-file-dialog
- * Applied another path by Benedikt to let xdg-file-dialog use
- zenity on GNOME and XFCE
- * Added a documentation extraction AWK script created by Benedikt which replaces
- the sed code and adds extraction of examples additionally to the usage info.
- * Added printing of examples to the --help command.
-
-2006-04-14 Kevin Krammer <kevin.krammer@gmx.at>
- * Added documentation for --version to all xml files
- * Added script for file selection task, e.g. using the native file dialog
- to get a file or directory name
-
-2006-04-11 Kevin Krammer <kevin.krammer@gmx.at>
- * Applied exit functions to the other scripts
- * Added a function to check for common commands like --help or --version
- and always perform the same reaction
-
-2006-04-10 Kevin Krammer <kevin.krammer@gmx.at>
- * Added common exit functions to improve return value consistency.
- Currently only used in xdg-mime to gather feedback
-
-2006-04-08 Kevin Krammer <kevin.krammer@gmx.at>
- * In case of $BROWSER being not avialable or empty, try a fixed list of well
- known browsers instead
-
-2006-04-06 Kevin Krammer <kevin.krammer@gmx.at>
- * Fixed "detection" of generic case in xdg-mime, xdg-open and xdg-su as
- discovered by Hagai Kariti <hobbithk@gmail.com>
- * Fixed tailoring of file and gnomevf-info output by using "sed" to remove a leading
- whitespace instead of "cut"
-
-2006-04-05 Kevin Krammer <kevin.krammer@gmx.at>
- * Applied patch by Benedikt Meurer <benedikt.meurer@unix-ag.uni-siegen.de> which
- adds detection for XFCE, XFCE paths for xdg-open and xdg-email and
- which fixes the script for non-bash shells.
-
-2006-03-31 Waldo Bastian <waldo.bastian@intel.com>
- * Generate usage instructions from the same XML that is used for manpages
- * Included licence text in scripts
- * Added xdg-desktop script
- * Added documentation (DocBook, HTML, manpages)
- * Have Makefile generate manpages
- * Included fix for xdg-su provided by Jeremy White <jwhite@codeweavers.com>
- * Added "release" target to Makefile for generating releases
- * Added support for .directory and .menu files to xdg-menu
-
-2006-03-21 Kevin Krammer <kevin.krammer@gmx.at>
- * Imported the current state into freedesktop.org CVS for easier shared development
diff --git a/chromium/third_party/xdg-utils/LICENSE b/chromium/third_party/xdg-utils/LICENSE
deleted file mode 100644
index 1edf08c354a..00000000000
--- a/chromium/third_party/xdg-utils/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
diff --git a/chromium/third_party/xdg-utils/Makefile.in b/chromium/third_party/xdg-utils/Makefile.in
deleted file mode 100644
index 37a025b0cfd..00000000000
--- a/chromium/third_party/xdg-utils/Makefile.in
+++ /dev/null
@@ -1,39 +0,0 @@
-SUBDIRS = scripts tests
-
-all: $(SUBDIRS)
-install: $(SUBDIRS:%=%/__install__)
-uninstall: $(SUBDIRS:%=%/__uninstall__)
-test: dummy
- cd tests && $(MAKE) test
-clean: $(SUBDIRS:%=%/__clean__)
-distclean: clean $(SUBDIRS:%=%/__distclean__)
- rm -f config.* Makefile
- rm -rf autom4te.cache
-
-release: $(SUBDIRS:%=%/__release__) distclean
- rm -f *~
-
-help:
- @echo "Usage: make [install|uninstall|release]"
-
-.PHONY: all install uninstall clean distclean dummy
-dummy:
-
-$(SUBDIRS): dummy
- @cd $@ && $(MAKE)
-
-$(SUBDIRS:%=%/__uninstall__): dummy
- cd `dirname $@` && $(MAKE) uninstall
-
-$(SUBDIRS:%=%/__install__): dummy
- cd `dirname $@` && $(MAKE) install
-
-$(SUBDIRS:%=%/__clean__): dummy
- cd `dirname $@` && $(MAKE) clean
-
-$(SUBDIRS:%=%/__release__): dummy
- cd `dirname $@` && $(MAKE) release
-
-$(SUBDIRS:%=%/__distclean__): dummy
- cd `dirname $@` && $(MAKE) distclean
-
diff --git a/chromium/third_party/xdg-utils/OWNERS b/chromium/third_party/xdg-utils/OWNERS
deleted file mode 100644
index 86725df39ad..00000000000
--- a/chromium/third_party/xdg-utils/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-mdm@chromium.org
-thestig@chromium.org
diff --git a/chromium/third_party/xdg-utils/README b/chromium/third_party/xdg-utils/README
deleted file mode 100644
index b58d9d0ee29..00000000000
--- a/chromium/third_party/xdg-utils/README
+++ /dev/null
@@ -1,100 +0,0 @@
-xdg-utils
----------
-
- The xdg-utils package is a set of simple scripts that provide
-basic desktop integration functions for any Free Desktop, such as Linux.
-
- They are intended to provide a set of defacto standards. This
-means that:
- * Third party software developers can rely on these xdg-utils
- for all of their simple integration needs.
-
- * Developers of desktop environments can make sure that their
- environments are well supported
-
- If a desktop developer wants to be certain that their environment
- functions with all third party software, then can simply
- make sure that these utilities work properly in their environment.
-
- This will hopefully mean that 'third tier' window managers
- such as XFCE and Blackbox can reach full parity with Gnome and KDE
- in terms of third party ISV support.
-
- * Distribution vendors can provide custom versions of these utilities
-
- If a distribution vendor wishes to have unusual systems,
- they can provide custom scripts, and the third party software
- should still continue to work.
-
-
-OVERVIEW:
----------
-
- The following tools are included in xdg-utils 1.0:
-
-xdg-desktop-menu Install desktop menu items
-xdg-desktop-icon Install icons to the desktop
-xdg-icon-resource Install icon resources
-xdg-mime Query information about file type handling and
- install descriptions for new file types
-xdg-open Open a file or URL in the user's preferred application
-xdg-email Send mail using the user's preferred e-mail composer
-xdg-screensaver Control the screensaver
-
-
-BUILD:
-------
-
- Building is not required, all tools are located in the
-scripts/ subdirectory and are ready to be used.
-
- You can optionally choose to install the scripts
-to a target directory. To do this, you could issue
-the following commands:
- ./configure [--prefix=<your-place-here>]
- make install
-that would cause the scripts to be installed to
- <your-place-here>/bin
-
-
-USE:
-----
-
- 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://portland.freedesktop.org. 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
-you're writing your post installation script, and you want to create
-a menu on any xdg-util compliant environment. Let's further assume
-that you've just installed to $INSTALL_DIR, and that your menu
-desktop file is in $INSTALL_DIR/desktop/icon.desktop. Finally, let's
-say that you've included the xdg-utils package in your installation
-in $INSTALL_DIR/xdg-utils.
-
- Then a simple post install script could look like this:
-
- export PATH=$PATH:$INSTALL_DIR/xdg-utils
- xdg-desktop-menu install $INSTALL_DIR/mycompany-myapp.desktop
-
- And now your product has a menu on any XDG compliant desktop!
-
-Note that we strongly recommend using this method - that is,
-putting your copy of the xdg-utils at the end of the path,
-and then invoking them without a specific path name.
-
-That will allow your users and their system providers to
-use custom versions of the xdg-utils to adjust for system spsecific
-differences.
-
-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.
diff --git a/chromium/third_party/xdg-utils/README.chromium b/chromium/third_party/xdg-utils/README.chromium
deleted file mode 100644
index 79e3b31c9e3..00000000000
--- a/chromium/third_party/xdg-utils/README.chromium
+++ /dev/null
@@ -1,26 +0,0 @@
-Name: xdg-utils
-URL: http://portland.freedesktop.org/wiki/
-Version: 3ba869a97b737fd308502a7f9e63bda202891642
-License: MIT
-Security Critical: no
-
-Description:
-This directory contains a copy of xdg-utils obtained from git on 2011-07-20,
-with this command:
-
-git clone git://anongit.freedesktop.org/xdg/xdg-utils xdg-utils
-
-The .gitignore files were converted to svn:ignore properties to check it in.
-Also, the scripts have been regenerated, since the checked in copies are old.
-
-Originally, it had been modified to add the xdg-settings command for getting
-and, in some cases, setting various GNU/Linux desktop environment settings like
-the default web browser and proxy configuration.
-
-This change has since been incorporated upstream.
-
-We now have this copy only to allow us to ship our own copy of xdg-settings (and
-xdg-mime, because we need a newer version than some distributions include). When
-these are standard, we can delete our copy.
-
-The license for xdg-utils is in the LICENSE file and is similar to BSD-style.
diff --git a/chromium/third_party/xdg-utils/RELEASE_NOTES b/chromium/third_party/xdg-utils/RELEASE_NOTES
deleted file mode 100644
index f2df578d27b..00000000000
--- a/chromium/third_party/xdg-utils/RELEASE_NOTES
+++ /dev/null
@@ -1,64 +0,0 @@
-Release notes for xdg-utils 1.0.2
-=================================
-
-This release fixes:
-* SVG icons are not supported but documentation still mentioned SVG
-* xdg-email can now be used without any e-mail address
-* Don't use mktemp without arguments, it breaks on systems with certain
- older versions of mktemp (xdg-desktop-menu, xdg-screensaver)
-
-Release notes for xdg-utils 1.0.1
-=================================
-
-This release fixes:
-* Several shell syntax issues causing failures on Ubuntu 6.10
-* Spurious output on stdout when running xdg-desktop-menu
-* Non-ascii mailto URI handling of xdg-emial on non-UTF8 locales under KDE
-
-Release notes for xdg-utils 1.0
-===============================
-
-xdg-utils 1.0 has been tested under the Gnome and KDE desktop environments
-on Debian, Fedora, Kubuntu, Mandriva, Redhat RHEL4, SUSE, Ubuntu and Xandros
-based Linux systems. These release notes reflect test findings. Despite
-extensive testing it should be pointed out that xdg-utils is provided AS IS
-without warranty of any kind. See the LICENSE file for details.
-
-* general:
- - When installing applications or file types for the current user only
- (user mode) it may be necessary to restart the session in order for
- the panel and filemanager to show the correct icons. This problem
- typically occurs when the installation process required new
- (hidden) directories to be created under the user's home directory.
-
-* xdg-mime:
- - xdg-mime query filetype may fail under Gnome on certain Debian
- systems that do not have gnomevfs-info installed by default.
-
-* xdg-desktop-menu:
- - On Redhat RHEL 4 systems running Gnome, new submenus will not appear
- until the session is restarted. For testing purposes the command
- "killall gnome-panel" can be used instead of restarting the session.
- It is not recommended to use this as part of installation scripts
- though.
-
- - KDE based desktops may require several seconds to update the
- application menu after installing new items. The user may need to
- close the applications menu first before new items will show up.
-
- - On SUSE systems, desktop entries that list any of the standard
- menu Categories are often being placed in a "More Programs" submenu
- which makes them somewhat hard to find.
-
-* xdg-screensaver:
- - Screensaver locking does not work on KDE under SUSE 10.0
-
-* xdg-email:
- - Please refer to http://portland.freedesktop.org/wiki/EmailConfig
- for additional information on setting up the default E-mail client.
-
- - With current versions of Mozilla Thunderbird it is not possible to
- specify attachments. In order to send an attachment, the user will
- need to attach the file manually.
-
- - Older versions of KMail do not support multiple To or CC recipients.
diff --git a/chromium/third_party/xdg-utils/TODO b/chromium/third_party/xdg-utils/TODO
deleted file mode 100644
index 854bae43a37..00000000000
--- a/chromium/third_party/xdg-utils/TODO
+++ /dev/null
@@ -1,25 +0,0 @@
-xdg-icon-resource
-* Add pre-XDG Base Dir gnome-support
-* Add "query theme"
-* Add "query lookup"
-
-xdg-email
-* revisit decision to disable &attach= in mailto URLs
-
-xdg-screensaver
-* Return error when WindowID doesn't exist
-* support dbus org.freedesktop.ScreenSaver methods
-
-General
-* Support XDG_DATA_INSTALL
-* Support XDG_INSTALL_HOOK
-* Use "FILE" as argument everywhere instead of "file"
-* Add xdg-autostart
-
-xdg-su:
-* The summary is incorrect, it suggests that it can only run things as
-root which is incorrect according to the main body of the document.
-* The -c option is listed in the synopsis, but not in options.
-* It would be useful if it was possible to distinguish between a failure
-because of a bad password or some other failure.
-* use sudo style syntax, drop -c option
diff --git a/chromium/third_party/xdg-utils/configure b/chromium/third_party/xdg-utils/configure
deleted file mode 100755
index 32dfc62238f..00000000000
--- a/chromium/third_party/xdg-utils/configure
+++ /dev/null
@@ -1,2320 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for xdg-utils 1.
-#
-# Report bugs to <portland@lists.freedesktop.org>.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME='xdg-utils'
-PACKAGE_TARNAME='xdg-utils'
-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 XMLTO LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures xdg-utils 1 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of xdg-utils 1:";;
- esac
- cat <<\_ACEOF
-
-Report bugs to <portland@lists.freedesktop.org>.
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-xdg-utils configure 1
-generated by GNU Autoconf 2.59
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by xdg-utils $as_me 1, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-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 tests/Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by xdg-utils $as_me 1, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-xdg-utils config.status 1
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
- "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-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
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) 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. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/chromium/third_party/xdg-utils/configure.ac b/chromium/third_party/xdg-utils/configure.ac
deleted file mode 100644
index 29cadb01b4c..00000000000
--- a/chromium/third_party/xdg-utils/configure.ac
+++ /dev/null
@@ -1,13 +0,0 @@
-AC_PREREQ(2.50)
-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
- scripts/Makefile
- tests/Makefile
-])
-AC_OUTPUT
diff --git a/chromium/third_party/xdg-utils/install-sh b/chromium/third_party/xdg-utils/install-sh
deleted file mode 100644
index e9de23842dc..00000000000
--- a/chromium/third_party/xdg-utils/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/chromium/third_party/xdg-utils/scripts/HACKING b/chromium/third_party/xdg-utils/scripts/HACKING
deleted file mode 100644
index ab1da9a0d87..00000000000
--- a/chromium/third_party/xdg-utils/scripts/HACKING
+++ /dev/null
@@ -1,17 +0,0 @@
-Note that the actual scripts are generated from xdg-*.in,
-xdg-utils-common.in and desc/xdg-*.xml which contains the
-command line descriptions. These are the files that you
-want to edit. To add a new script, you must also provide
-a desc/xdg-*.xml file.
-
-DO NOT MAKE CHANGES TO THE GENERATED SCRIPTS THEMSELVES!
-
-Use 'make scripts-clean' to delete all generated files and use
-'make scripts' to re-generate them.
-
-The manual files in man/ and html/ are also generated from the
-desc/xdg-*.xml files.
-
-Use 'make scripts html man' to update all generated files
-
-Use 'make release' to remove everything but the generated files.
diff --git a/chromium/third_party/xdg-utils/scripts/Makefile.in b/chromium/third_party/xdg-utils/scripts/Makefile.in
deleted file mode 100644
index 2c7d2ac9d5f..00000000000
--- a/chromium/third_party/xdg-utils/scripts/Makefile.in
+++ /dev/null
@@ -1,116 +0,0 @@
-MKDIR = mkdir -p
-RMDIR = rmdir
-INSTALL = @INSTALL@ $(INSTALL_FLAGS)
-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@
-bindir = @bindir@
-mandir = @mandir@
-
-SCRIPTS = \
- xdg-desktop-menu \
- xdg-desktop-icon \
- xdg-mime \
- xdg-icon-resource \
- xdg-open \
- xdg-email \
- xdg-screensaver \
- xdg-settings
-# xdg-su
-# xdg-copy \
-# xdg-file-dialog
-# xdg-terminal
-
-MANPAGES= $(SCRIPTS:%=man/%.1)
-WEBPAGES= $(SCRIPTS:%=%.html)
-XMLFILES= $(SCRIPTS:%=desc/%.xml)
-
-all:
-
-html: index.html $(WEBPAGES)
-
-scripts: README $(SCRIPTS)
-
-man: $(MANPAGES)
-
-release: scripts html man
- rm -f xdg-*.in *~ HACKING generate-help-script.awk
- rm -rf desc/
- rm -rf xsl/
- rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal
-
-distclean: clean
- rm -f Makefile
-
-clean:
-
-scripts-clean:
- rm -f $(SCRIPTS) README man/xdg-*.1 html/xdg-*.html
-
-README: $(SCRIPTS)
- echo > $@
- @for x in $(SCRIPTS) ; do \
- sh ./$$x --help | grep -B 100 Synopsis | sed -e '$$d' >> $@ ; \
- done
-
-install:
- $(MKDIR) $(DESTDIR)$(bindir)
- for x in $(SCRIPTS) ; do \
- $(INSTALL_SCRIPT) $$x $(DESTDIR)$(bindir) ; \
- done
- $(MKDIR) $(DESTDIR)$(mandir)
- $(MKDIR) $(DESTDIR)$(mandir)/man1
- for x in $(MANPAGES) ; do \
- if [ -f $$x ]; then \
- $(INSTALL_DATA) $$x $(DESTDIR)$(mandir)/man1 ; \
- fi ; \
- done
-
-uninstall:
- for x in $(MANPAGES) ; do \
- rm -f $(DESTDIR)$(mandir)/man1/`basename $$x` ; \
- done
- -$(RMDIR) $(DESTDIR)$(mandir)/man1
- -$(RMDIR) $(DESTDIR)$(mandir)
- for x in $(SCRIPTS) ; do \
- rm -f $(DESTDIR)$(bindir)/$$x ; \
- done
- -$(RMDIR) $(DESTDIR)$(bindir)
-
-%: %.in %.txt
- awk -f generate-help-script.awk $@.in | sed -e 's/@NAME@/'$@'/g' > $@
- chmod a+x $@
-
-xdg-desktop-menu: xdg-desktop-menu.in xdg-utils-common.in
-xdg-desktop-icon: xdg-desktop-icon.in xdg-utils-common.in
-xdg-email: xdg-email.in xdg-utils-common.in
-xdg-mime: xdg-mime.in xdg-utils-common.in
-xdg-open: xdg-open.in xdg-utils-common.in
-xdg-screensaver: xdg-screensaver.in xdg-utils-common.in
-xdg-settings: xdg-settings.in xdg-utils-common.in
-xdg-icon-resource: xdg-icon-resource.in xdg-utils-common.in
-
-xdg-su: xdg-su.in xdg-utils-common.in
-xdg-copy: xdg-copy.in xdg-utils-common.in
-xdg-file-dialog: xdg-file-dialog.in xdg-utils-common.in
-xdg-terminal: xdg-terminal.in xdg-utils-common.in
-
-man/%.1: desc/%.xml
- (cd man;$(XMLTO) man ../$<)
-
-index.html: $(XMLFILES)
- (cat html/index.html.pre; \
- xsltproc xsl/refentry2htmlindex.xsl $(XMLFILES); \
- cat html/index.html.post ) > html/index.html
-
-%.html: desc/%.xml
- (cd html;$(XMLTO) html-nochunks ../$<)
-
-%.txt: desc/%.xml
- $(XMLTO) txt $<
-
diff --git a/chromium/third_party/xdg-utils/scripts/README b/chromium/third_party/xdg-utils/scripts/README
deleted file mode 100644
index d1ebd296ead..00000000000
--- a/chromium/third_party/xdg-utils/scripts/README
+++ /dev/null
@@ -1,19 +0,0 @@
-
-xdg-desktop-menu - command line tool for (un)installing desktop menu items
-
-xdg-desktop-icon - command line tool for (un)installing icons to the desktop
-
-xdg-mime - command line tool for querying information about file type handling
-and adding descriptions for new file types
-
-xdg-icon-resource - command line tool for (un)installing icon resources
-
-xdg-open - opens a file or URL in the user's preferred application
-
-xdg-email - command line tool for sending mail using the user's preferred
-e-mail composer
-
-xdg-screensaver - command line tool for controlling the screensaver
-
-xdg-settings - get various settings from the desktop environment
-
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-copy.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-copy.xml
deleted file mode 100644
index 72cc540509a..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-copy.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?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 choice="plain"><option><replaceable>source</replaceable></option></arg>
- <arg choice="plain"><option><replaceable>destination</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-copy</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </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>
- <para>
- xdg-copy is for use inside a desktop session only.
- It is not recommended to use xdg-copy as root.
- </para>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </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/chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-icon.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-icon.xml
deleted file mode 100644
index 0c67972a557..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-icon.xml
+++ /dev/null
@@ -1,364 +0,0 @@
-<?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-desktop-icon">
- <refentryinfo>
- <title>xdg-desktop-icon 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>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-desktop-icon</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-desktop-icon</refname>
- <refpurpose>command line tool for (un)installing icons to the desktop</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-desktop-icon</command>
- <arg choice="plain">install</arg>
- <arg><option>--novendor</option></arg>
- <arg choice="plain"><replaceable>FILE</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-desktop-icon</command>
- <arg choice="plain">uninstall</arg>
- <arg choice="plain"><replaceable>FILE</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-desktop-icon</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- The xdg-desktop-icon program can be used to install an application launcher
- or other file on the desktop of the current user.
- </para>
- <para>
- An application launcher is represented by a *.desktop file.
- Desktop files are defined by the freedesktop.org Desktop Entry
- Specification. The most important aspects of *.desktop files
- are summarized below.
- </para>
- </refsect1>
- <refsect1 id="commands">
- <title>Commands</title>
- <variablelist>
- <varlistentry>
- <term>install</term>
- <listitem>
- <simpara>
- Installs <replaceable>FILE</replaceable> to the desktop of the current user.
- <replaceable>FILE</replaceable> can be a *.desktop file or any
- other type of file.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>uninstall</term>
- <listitem>
- <simpara>
- Removes <replaceable>FILE</replaceable> from the desktop
- of the current user.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--novendor</option></term>
- <listitem>
- <simpara>
- Normally, xdg-desktop-icon checks to ensure that a *.desktop file
- to be installed has a vendor prefix. This option can be
- used to disable that check.
- </simpara>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="desktopfiles">
- <title>Desktop Files</title>
- <para>
- An application launcher can be added to the desktop by installing a
- *.desktop file. A *.desktop file consists of a
- <emphasis>[Desktop Entry]</emphasis> header followed by several
- <replaceable>Key</replaceable>=<replaceable>Value</replaceable> lines.
- </para>
- <para>
- A *.desktop file can provide a name and description for an application
- in several different languages. This is done by adding a language
- code as used by LC_MESSAGES in square brackets behind the
- <replaceable>Key</replaceable>. This way one can specify different
- values for the same <replaceable>Key</replaceable> depending on the
- currently selected language.
- </para>
- <para>
- The following keys are often used:
- </para>
- <variablelist>
- <varlistentry>
- <term>Value=1.0</term>
- <listitem>
- <simpara>
- This is a mandatory field to indicate that the *.desktop file
- follows the 1.0 version of the specification.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Type=Application</term>
- <listitem>
- <simpara>
- This is a mandatory field that indicates that the *.desktop file
- describes an application launcher.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Name=<replaceable>Application Name</replaceable></term>
- <listitem>
- <simpara>
- The name of the application.
- For example <emphasis>Mozilla</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>GenericName=<replaceable>Generic Name</replaceable></term>
- <listitem>
- <simpara>
- A generic description of the application.
- For example <emphasis>Web Browser</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Comment=<replaceable>Comment</replaceable></term>
- <listitem>
- <simpara>
- Optional field to specify a tooltip for the application.
- For example <emphasis>Visit websites on the Internet</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Icon=<replaceable>Icon File</replaceable></term>
- <listitem>
- <simpara>
- The icon to use for the application. This can either be
- an absolute path to an image file or an icon-name.
- If an icon-name is provided an image lookup by name is done
- in the user's current icon theme. The <command>xdg-icon-resource</command>
- command can be used to install image files into icon themes.
- The advantage of using an icon-name instead of an absolute
- path is that with an icon-name the application icon can be
- provided in several different sizes as well as in several
- differently themed styles.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Exec=<replaceable>Command Line</replaceable></term>
- <listitem>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- For a complete oveview of the *.desktop file format please
- visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec
- </para>
- </refsect1>
- <refsect1 id="env_vars">
- <title>Environment Variables</title>
- <para>
- xdg-desktop-icon honours the following environment variables:
- </para>
- <variablelist>
- <varlistentry>
- <term>XDG_UTILS_DEBUG_LEVEL</term>
- <listitem>
- <simpara>
- Setting this environment variable to a non-zero numerical value
- makes xdg-desktop-icon do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>5</option></term>
- <listitem>
- <simpara>
- No permission to read one of the files passed on the command
- line.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="seealso">
- <title>See Also</title>
- <para><citerefentry><refentrytitle>xdg-icon-resource</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
- The company ShinyThings Inc. has developed an application named
- "WebMirror" and would like to add a launcher for for on the desktop.
- The company will use "shinythings" as its vendor id.
- In order to add the application to the desktop there needs to be a
- .desktop file for the application:
-<programlisting>
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-</programlisting>
- </para>
- <para>Now the xdg-desktop-icon tool can be used to add the webmirror.desktop file
- to the desktop:
-<programlisting>
-xdg-desktop-icon install ./shinythings-webmirror.desktop
-</programlisting>
- </para>
- <para>To add a README file to the desktop as well, the following command can be used:
-<programlisting>
-xdg-desktop-icon install ./shinythings-README
-</programlisting>
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-menu.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-menu.xml
deleted file mode 100644
index b0528632bbd..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-desktop-menu.xml
+++ /dev/null
@@ -1,685 +0,0 @@
-<?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-desktop-menu">
- <refentryinfo>
- <title>xdg-desktop-menu 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>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-desktop-menu</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-desktop-menu</refname>
- <refpurpose>command line tool for (un)installing desktop menu items</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-desktop-menu</command>
- <arg choice="plain">install</arg>
- <arg><option>--noupdate</option></arg>
- <arg><option>--novendor</option></arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- <arg choice="plain"><replaceable>directory-file(s)</replaceable></arg>
- <arg choice="plain"><replaceable>desktop-file(s)</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-desktop-menu</command>
- <arg choice="plain">uninstall</arg>
- <arg><option>--noupdate</option></arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- <arg choice="plain"><replaceable>directory-file(s)</replaceable></arg>
- <arg choice="plain"><replaceable>desktop-file(s)</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-desktop-menu</command>
- <arg choice="plain">forceupdate</arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-desktop-menu</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- The xdg-desktop-menu program can be used to install new menu entries
- to the desktop's application menu.
- </para>
- <para>
- The application menu works according to the
- XDG Desktop Menu Specification at
- http://www.freedesktop.org/Standards/menu-spec
- </para>
- </refsect1>
- <refsect1 id="commands">
- <title>Commands</title>
- <variablelist>
- <varlistentry>
- <term>install</term>
- <listitem>
- <simpara>
- Install one or more applications in a submenu of
- the desktop menu system.
- </simpara>
- <simpara><replaceable>desktop-file</replaceable>:
- A desktop file represents a single menu entry in the menu.
- Desktop files are defined by the freedesktop.org Desktop Entry
- Specification. The most important aspects of *.desktop
- files are summarized below.
- </simpara>
- <simpara>
- Menu entries can be added to the menu system in two different
- ways. They can either be added to a predefined submenu in the
- menu system based on one or more category keywords, or they can
- be added to a new submenu.
- </simpara>
- <simpara>
- To add a menu entry to a predefined submenu the desktop file
- that represents the menu entry must have a Categories= entry
- that lists one or more keywords. The menu item will be included
- in an appropriate submenu based on the included keywords.
- </simpara>
- <simpara>
- To add menu items to a new submenu the desktop-files must be
- preceded by a directory-file that describes the submenu.
- If multiple desktop-files are specified, all entries will
- be added to the same menu. If entries are installed to a menu
- that has been created with a previous call to
- <command>xdg-desktop-menu</command> the entries will be
- installed in addition to any already existing entries.
- </simpara>
- <simpara><replaceable>directory-file</replaceable>:
- The *.directory file indicated by
- <replaceable>directory-file</replaceable> 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.
- </simpara>
- <simpara>
- 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.
- </simpara>
- <simpara>
- Directory files follow the syntax defined by the freedesktop.org
- Desktop Entry Specification.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>uninstall</term>
- <listitem>
- <simpara>
- Remove applications or submenus from the desktop menu system
- previously installed with <command>xdg-desktop-menu install</command>.
- </simpara>
- <simpara>
- A submenu and the associated directory file is only removed
- when the submenu no longer contains any menu entries.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>forceupdate</term>
- <listitem>
- <simpara>
- Force an update of the menu system.
- </simpara>
- <simpara>
- This command is only useful if the last call to
- xdg-desktop-menu included the <option>--noupdate</option> option.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--noupdate</option></term>
- <listitem>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--novendor</option></term>
- <listitem>
- <simpara>
- 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.
- </simpara>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--mode</option> <replaceable>mode</replaceable></term>
- <listitem>
- <simpara><replaceable>mode</replaceable> can be
- <emphasis>user</emphasis> or <emphasis>system</emphasis>.
- In user mode the file is (un)installed for the current user
- only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in
- system mode.
- </simpara>
- <simpara>
- The default is to use system mode when called by root
- and to use user mode when called by a non-root user.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="desktopfiles">
- <title>Desktop Files</title>
- <para>
- An application item in the application menu is represented by a
- *.desktop file. A *.desktop file consists of a
- <emphasis>[Desktop Entry]</emphasis> header followed by several
- <replaceable>Key</replaceable>=<replaceable>Value</replaceable> lines.
- </para>
- <para>
- A *.desktop file can provide a name and description for an application
- in several different languages. This is done by adding a language
- code as used by LC_MESSAGES in square brackets behind the
- <replaceable>Key</replaceable>. This way one can specify different
- values for the same <replaceable>Key</replaceable> depending on the
- currently selected language.
- </para>
- <para>
- The following keys are often used:
- </para>
- <variablelist>
- <varlistentry>
- <term>Value=1.0</term>
- <listitem>
- <simpara>
- This is a mandatory field to indicate that the *.desktop file
- follows the 1.0 version of the specification.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Type=Application</term>
- <listitem>
- <simpara>
- This is a mandatory field that indicates that the *.desktop file
- describes an application launcher.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Name=<replaceable>Application Name</replaceable></term>
- <listitem>
- <simpara>
- The name of the application.
- For example <emphasis>Mozilla</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>GenericName=<replaceable>Generic Name</replaceable></term>
- <listitem>
- <simpara>
- A generic description of the application.
- For example <emphasis>Web Browser</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Comment=<replaceable>Comment</replaceable></term>
- <listitem>
- <simpara>
- Optional field to specify a tooltip for the application.
- For example <emphasis>Visit websites on the Internet</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Icon=<replaceable>Icon File</replaceable></term>
- <listitem>
- <simpara>
- The icon to use for the application. This can either be
- an absolute path to an image file or an icon-name.
- If an icon-name is provided an image lookup by name is done
- in the user's current icon theme. The <command>xdg-icon-resource</command>
- command can be used to install image files into icon themes.
- The advantage of using an icon-name instead of an absolute
- path is that with an icon-name the application icon can be
- provided in several different sizes as well as in several
- differently themed styles.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Exec=<replaceable>Command Line</replaceable></term>
- <listitem>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Categories=<replaceable>Categories</replaceable></term>
- <listitem>
- <simpara>
- 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. When menu entries are explicitly assigned
- to a new submenu it is not necassery to list any categories.
- </simpara>
- <simpara>
- When using categories it is recommended to include
- one of the following categories:
- AudioVideo, Development, Education, Game, Graphics, Network,
- Office, Settings, System, Utility.
- </simpara>
- <simpara>
- See Appendix A of the XDG Desktop Menu Specification
- for information about additional categories.
- http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>MimeType=<replaceable>Mimetypes</replaceable></term>
- <listitem>
- <simpara>
- A list of mimetypes separated by semi-colons. This field is
- used to indicate which file types the application is able to
- open.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- For a complete oveview of the *.desktop file format please
- visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec
- </para>
- </refsect1>
- <refsect1 id="directoryfiles">
- <title>Directory Files</title>
- <para>
- 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
- <emphasis>[Desktop Entry]</emphasis> header followed by several
- <replaceable>Key</replaceable>=<replaceable>Value</replaceable> lines.
- </para>
- <para>
- 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
- <replaceable>Key</replaceable>. This way one can specify different
- values for the same <replaceable>Key</replaceable> depending on the
- currently selected language.
- </para>
- <para>
- The following keys are relevqnt for submenus:
- </para>
- <variablelist>
- <varlistentry>
- <term>Value=1.0</term>
- <listitem>
- <simpara>
- This is a mandatory field to indicate that the *.directory file
- follows the 1.0 version of the Desktop Entry specification.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Type=Directory</term>
- <listitem>
- <simpara>
- This is a mandatory field that indicates that the *.directory file
- describes a submenu.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Name=<replaceable>Menu Name</replaceable></term>
- <listitem>
- <simpara>
- The title of submenu.
- For example <emphasis>Mozilla</emphasis>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Comment=<replaceable>Comment</replaceable></term>
- <listitem>
- <simpara>
- Optional field to specify a tooltip for the submenu.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Icon=<replaceable>Icon File</replaceable></term>
- <listitem>
- <simpara>
- 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 <command>xdg-icon-resource</command>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="env_vars">
- <title>Environment Variables</title>
- <para>
- xdg-desktop-menu honours the following environment variables:
- </para>
- <variablelist>
- <varlistentry>
- <term>XDG_UTILS_DEBUG_LEVEL</term>
- <listitem>
- <simpara>
- Setting this environment variable to a non-zero numerical value
- makes xdg-desktop-menu do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>XDG_UTILS_INSTALL_MODE</term>
- <listitem>
- <simpara>
- This environment variable can be used by the user or
- administrator to override the installation mode.
- Valid values are <emphasis>user</emphasis> and
- <emphasis>system</emphasis>.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>5</option></term>
- <listitem>
- <simpara>
- No permission to read one of the files passed on the command
- line.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="seealso">
- <title>See Also</title>
- <para><citerefentry><refentrytitle>xdg-desktop-icon</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry><refentrytitle>xdg-icon-resource</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry><refentrytitle>xdg-mime</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
-
- <para>
- 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 <emphasis>Categories</emphasis> entry:
-<programlisting>
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
- Categories=Network;WebDevelopment;
-</programlisting>
- </para>
- <para>Now the xdg-desktop-menu tool can be used to add the
- shinythings-webmirror.desktop file to the desktop application menu:
-<programlisting>
-xdg-desktop-menu install ./shinythings-webmirror.desktop
-</programlisting>
- </para>
- <para>
- 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.
- </para>
- <para>
- In the next 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.
- </para>
- <para>
- First the company needs to create two .desktop files that describe
- the two menu items. Since the items are to be added to a new submenu
- it is not necassery to include a Categories= line:
-<programlisting>
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
-
-shinythings-webmirror-admin.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror-admintool
- Icon=shinythings-webmirror-admintool
-
- Name=WebMirror Admin Tool
- Name[nl]=WebSpiegel Administratie Tool
-</programlisting>
- </para>
- <para>
- In addition a .directory file needs to be created to provide a title and icon
- for the sub-menu itself:
-<programlisting>
-shinythings-webmirror.directory:
-
- [Desktop Entry]
- Encoding=UTF-8
-
- Icon=shinythings-webmirror-menu
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-</programlisting>
- </para>
- <para>
- These file can now be installed with:
-<programlisting>
-xdg-desktop-menu install ./shinythings-webmirror.directory \
- ./shinythings-webmirror.desktop ./shinythings-webmirror-admin.desktop
-</programlisting>
- </para>
- <para>
- The menu entries could also be installed one by one:
-<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
-</programlisting>
- </para>
- <para>
- Although the result is the same it is slightly more efficient to
- install all files at the same time.
- </para>
- <para>
- 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:
-<programlisting>
-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
-</programlisting>
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-email.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-email.xml
deleted file mode 100755
index d9bc3d81a6a..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-email.xml
+++ /dev/null
@@ -1,281 +0,0 @@
-<?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-email">
- <refentryinfo>
- <title>xdg-email 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>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-email</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-email</refname>
- <refpurpose>command line tool for sending mail using the user's preferred e-mail composer</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-email</command>
- <arg><option>--utf8</option></arg>
- <arg><option>--cc</option> <replaceable>address</replaceable></arg>
- <arg><option>--bcc</option> <replaceable>address</replaceable></arg>
- <arg><option>--subject</option> <replaceable>text</replaceable></arg>
- <arg><option>--body</option> <replaceable>text</replaceable></arg>
- <arg><option>--attach</option> <replaceable>file</replaceable></arg>
- <group choice="opt">
- <arg choice="plain"><replaceable>mailto-uri</replaceable></arg>
- <arg choice="plain"><replaceable>address(es)</replaceable></arg>
- </group>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-email</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <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>address(es)</replaceable> or
- <replaceable>mailto-uri</replaceable>. RFC2368 defines mailto:
- URIs. xdg-email limits support to, cc, subject and body fields in
- <replaceable>mailto-uri</replaceable>, all other fields are silently
- ignored. <replaceable>address(es)</replaceable> must follow the
- syntax of RFC822. Multiple addresses may be provided as
- separate arguments.
- </para>
- <para>
- All information provided on the command line is used to
- prefill corresponding fields in the user's e-mail composer. The user
- will have the opportunity to change any of this information before
- actually sending the e-mail.
- </para>
- <para>
- xdg-email is for use inside a desktop session only.
- It is not recommended to use xdg-email as root.
- </para>
- <para>
- See http://portland.freedesktop.org/EmailConfig for information on
- how the user can change the e-mail composer that is used.
- </para>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--utf8</option></term>
- <listitem>
- <simpara>
- Indicates that all command line options that follow are in utf8.
- Without this option, command line options are expected to be
- encoded according to locale.
- If the locale already specifies utf8 this option has no effect.
- This option does not affect mailto URIs that are passed on the
- command line.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--cc</option> <replaceable>address</replaceable></term>
- <listitem>
- <simpara>
- Specify a recipient to be copied on the e-mail.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--bcc</option> <replaceable>address</replaceable></term>
- <listitem>
- <simpara>
- Specify a recipient to be blindly copied on the e-mail.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--subject</option> <replaceable>text</replaceable></term>
- <listitem>
- <simpara>
- Specify a subject for the e-mail.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--body</option> <replaceable>text</replaceable></term>
- <listitem>
- <simpara>
- Specify a body for the e-mail. Since the user will be able to
- make changes before actually sending the e-mail, this can be
- used to provide the user with a template for the e-mail.
- <replaceable>text</replaceable> may contain linebreaks.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--attach</option> <replaceable>file</replaceable></term>
- <listitem>
- <simpara>
- Specify an attachment for the e-mail. <replaceable>file</replaceable>
- must point to an existing file.
- </simpara>
- <simpara>
- Some e-mail applications require the file to remain present
- after xdg-email returns.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="env_vars">
- <title>Environment Variables</title>
- <para>
- xdg-email honours the following environment variables:
- </para>
- <variablelist>
- <varlistentry>
- <term>XDG_UTILS_DEBUG_LEVEL</term>
- <listitem>
- <simpara>
- Setting this environment variable to a non-zero numerical value
- makes xdg-email do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>5</option></term>
- <listitem>
- <simpara>
- No permission to read one of the files passed on the command
- line.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="configuration">
- <title>Configuration</title>
- <para>Visit http://portland.freedesktop.org/EmailConfig for information
- how to configure xdg-email to use the email client of your choice.
- </para>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-email 'Jeremy White &lt;jwhite@example.com&gt;'
-</programlisting>
- </para>
- <para>
-<programlisting>
-xdg-email --attach /tmp/logo.png \
- --subject 'Logo contest' \
- --body 'Attached you find the logo for the contest.' \
- 'jwhite@example.com'
-</programlisting>
- </para>
- <para>
-<programlisting>
-xdg-email --subject 'Your password is about to expire' \
- 'jwhite@example.com' 'bastian@example.com' 'whipple@example.com'
-</programlisting>
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-file-dialog.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-file-dialog.xml
deleted file mode 100644
index 11c254233ac..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-file-dialog.xml
+++ /dev/null
@@ -1,222 +0,0 @@
-<?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-file-dialog">
- <refentryinfo>
- <title>xdg-file-dialog Manual</title>
- <copyright>
- <year>2006</year>
- </copyright>
- <author>
- <firstname>Kevin</firstname>
- <surname>Krammer</surname>
- </author>
- <address><email>kevin.krammer@gmx.at</email></address>
- <releaseinfo>This is release 0.5 of the xdg-mime Manual.</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-file-dialog</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-file-dialog</refname>
- <refpurpose>command line tool for providing file and directory selection dialogs</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-file-dialog</command>
- <arg choice="plain">openfilename</arg>
- <arg><option>--title <replaceable>TITLE</replaceable></option></arg>
- <arg><replaceable>FILENAME</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-file-dialog</command>
- <arg choice="plain">openfilenamelist</arg>
- <arg><option>--title <replaceable>TITLE</replaceable></option></arg>
- <arg><replaceable>FILENAME</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-file-dialog</command>
- <arg choice="plain">savefilename</arg>
- <arg><option>--title <replaceable>TITLE</replaceable></option></arg>
- <arg><replaceable>FILENAME</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-file-dialog</command>
- <arg choice="plain">directory</arg>
- <arg><option>--title <replaceable>TITLE</replaceable></option></arg>
- <arg><replaceable>DIRNAME</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-file-dialog</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- The xdg-file-dialog program can be used to let the native file selection dialog
- handle file and directory input.
- </para>
- <para>
- xdg-file-dialog is for use inside a desktop session only.
- It is not recommended to use xdg-file-dialog as root.
- </para>
- </refsect1>
- <refsect1 id="commands">
- <title>Commands</title>
- <variablelist>
- <varlistentry>
- <term>openfilename</term>
- <listitem>
- <simpara>
- Returns the filename with path for a file to read from.
- <replaceable>FILENAME</replaceable> can optionally be used to
- specify path and filename of a preselection.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>openfilenamelist</term>
- <listitem>
- <simpara>
- Returns one or more filenames with path for files to read from,
- each on a new line. <replaceable>FILENAME</replaceable> can optionally
- be used to specify path and filename of a preselection.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>savefilename</term>
- <listitem>
- <simpara>
- Returns the filename with path for file to write to.
- <replaceable>FILENAME</replaceable> can optionally be used to
- specify path and filename of a preselection.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>directory</term>
- <listitem>
- <simpara>
- Returns the path for an exsiting directory.
- <replaceable>DIRNAME</replaceable> can optionally be used to
- specify a path of a preselection.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--title</option> <replaceable>TITLE</replaceable></term>
- <listitem>
- <simpara>
- Sets the dialog's title (caption) to the specified text.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-file-dialog savefilename /tmp/foobar.png
-</programlisting>
- Asks for a save file name starting in directory /tmp and suggesting foobar.png as the filename
- </para>
- <para>
-<programlisting>
-xdg-file-dialog directory --title "Select a target folder" /tmp
-</programlisting>
- Asks for a directory name starting in directory /tmp using the text "Select a target folder" as the dialog's title/caption.
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-icon-resource.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-icon-resource.xml
deleted file mode 100644
index dfc1ff5a8c4..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-icon-resource.xml
+++ /dev/null
@@ -1,372 +0,0 @@
-<?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-icon-resource">
- <refentryinfo>
- <title>xdg-icon-resource 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>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-icon-resource</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-icon-resource</refname>
- <refpurpose>command line tool for (un)installing icon resources</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-icon-resource</command>
- <arg choice="plain">install</arg>
- <arg><option>--noupdate</option></arg>
- <arg><option>--novendor</option></arg>
- <arg><option>--theme <replaceable>theme</replaceable></option></arg>
- <arg><option>--context <replaceable>context</replaceable></option></arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- <arg choice="plain"><option>--size <replaceable>size</replaceable></option></arg>
- <arg choice="plain"><replaceable>icon-file</replaceable></arg>
- <arg><replaceable>icon-name</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-icon-resource</command>
- <arg choice="plain">uninstall</arg>
- <arg><option>--noupdate</option></arg>
- <arg><option>--theme <replaceable>theme</replaceable></option></arg>
- <arg><option>--context <replaceable>context</replaceable></option></arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- <arg choice="plain"><option>--size <replaceable>size</replaceable></option></arg>
- <arg choice="plain"><replaceable>icon-name</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-icon-resource</command>
- <arg choice="plain">forceupdate</arg>
- <arg><option>--theme <replaceable>theme</replaceable></option></arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-icon-resource</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- The xdg-icon-resource program can be used to install icon resources
- into the desktop icon system in order to illustrate menu entries,
- to depict desktop icons or to graphically represent file types.
- </para>
- <para>
- The desktop icon system identifies icons by name. Depending on the
- required size, the choice of icon theme and the context in which the
- icon is used, the desktop icon system locates an appropriate
- icon resource to depict an icon. Icon resources can be XPM files or
- PNG files.
- </para>
- <para>
- The desktop icon system works according to the
- XDG Icon Theme Specification at
- http://www.freedesktop.org/Standards/icon-theme-spec
- </para>
- </refsect1>
- <refsect1 id="commands">
- <title>Commands</title>
- <variablelist>
- <varlistentry>
- <term>install</term>
- <listitem>
- <simpara>
- Installs the icon file indicated by <replaceable>icon-file</replaceable>
- to the desktop icon system under the name
- <replaceable>icon-name</replaceable>.
- Icon names do not have an extension.
- If <replaceable>icon-name</replaceable> is not provided the name is
- derived from <replaceable>icon-file</replaceable>.
- The icon file must have
- <emphasis>.png</emphasis> or <emphasis>.xpm</emphasis>
- as extension. If a corresponding <emphasis>.icon</emphasis>
- file exists in the same location as <replaceable>icon-file</replaceable>
- it will be installed as well.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>uninstall</term>
- <listitem>
- <simpara>
- Removes the icon indicated by <replaceable>icon-name</replaceable>
- from the desktop icon system. Note that icon names do not have
- an extension.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>forceupdate</term>
- <listitem>
- <simpara>
- Force an update of the desktop icon system. This is only useful if
- the last call to xdg-icon-resource included the <option>--noupdate</option> option.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--noupdate</option></term>
- <listitem>
- <simpara>
- Postpone updating the desktop icon system. If multiple icons are
- added in sequence this flag can be used to indicate that
- additional changes will follow and that it is not
- necassery to update the desktop icon system right away.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--novendor</option></term>
- <listitem>
- <simpara>
- Normally, xdg-icon-resource checks to ensure that an icon file
- to be installed in the <emphasis>apps</emphasis> context has
- a proper vendor prefix. This option can be used to disable
- that check.
- </simpara>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--theme</option> <replaceable>theme</replaceable></term>
- <listitem>
- <simpara>
- Installs or removes the icon file as part of
- <replaceable>theme</replaceable>. If no theme is specified the
- icons will be installed as part of the default <emphasis>hicolor</emphasis> theme.
- Applications may install icons under multiple themes but should
- at least install icons for the default <emphasis>hicolor</emphasis> theme.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--context</option> <replaceable>context</replaceable></term>
- <listitem>
- <simpara>
- Specifies the context for the icon. Icons to be used in the
- application menu and as desktop icon should use
- <emphasis>apps</emphasis> as context which is the default
- context. Icons to be used as file icons should use
- <emphasis>mimetypes</emphasis> as context.
- Other common contexts are <emphasis>actions</emphasis>,
- <emphasis>devices</emphasis>, <emphasis>emblems</emphasis>,
- <emphasis>filesystems</emphasis> and <emphasis>stock</emphasis>.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--size</option> <replaceable>size</replaceable></term>
- <listitem>
- <simpara>
- Specifies the size of the icon. All icons must be square.
- Common sizes for icons in the apps context are:
- 16, 22, 32, 48, 64 and 128.
- Common sizes for icons in the mimetypes context are:
- 16, 22, 32, 48, 64 and 128
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--mode</option> <replaceable>mode</replaceable></term>
- <listitem>
- <simpara><replaceable>mode</replaceable> can be
- <emphasis>user</emphasis> or <emphasis>system</emphasis>.
- In user mode the file is (un)installed for the current user
- only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in
- system mode.
- </simpara>
- <simpara>
- The default is to use system mode when called by root
- and to use user mode when called by a non-root user.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="env_vars">
- <title>Environment Variables</title>
- <para>
- xdg-icon-resource honours the following environment variables:
- </para>
- <variablelist>
- <varlistentry>
- <term>XDG_UTILS_DEBUG_LEVEL</term>
- <listitem>
- <simpara>
- Setting this environment variable to a non-zero numerical value
- makes xdg-icon-resource do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>XDG_UTILS_INSTALL_MODE</term>
- <listitem>
- <simpara>
- This environment variable can be used by the user or
- administrator to override the installation mode.
- Valid values are <emphasis>user</emphasis> and
- <emphasis>system</emphasis>.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>5</option></term>
- <listitem>
- <simpara>
- No permission to read one of the files passed on the command
- line.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="seealso">
- <title>See Also</title>
- <para><citerefentry><refentrytitle>xdg-desktop-icon</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry><refentrytitle>xdg-desktop-menu</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry><refentrytitle>xdg-mime</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-To install an icon resource to depict a launcher for the application
-myfoobar, the company ShinyThings Inc. can use:
-<programlisting>
-xdg-icon-resource install --size 64 shinythings-myfoobar.png
-</programlisting>
- </para>
- <para>
-To install an icon for a new application/x-foobar file type one can use:
-<programlisting>
-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
-</programlisting>This will install two icons with the name application-x-foobar
-but with different sizes.
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-mime.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-mime.xml
deleted file mode 100644
index 529e38c5a66..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-mime.xml
+++ /dev/null
@@ -1,373 +0,0 @@
-<?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>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-mime</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-mime</refname>
- <refpurpose>command line tool for querying information about file type handling
-and adding descriptions for new file types</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-mime</command>
- <arg choice="plain">query</arg>
- <group choice="req">
- <arg choice="plain">filetype</arg>
- <arg choice="plain">default</arg>
- </group>
- <arg choice="plain">...</arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-mime</command>
- <arg choice="plain">default</arg>
- <arg choice="plain"><replaceable>application</replaceable></arg>
- <arg choice="plain"><replaceable>mimetype(s)</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-mime</command>
- <arg choice="plain">install</arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- <arg><option>--novendor</option></arg>
- <arg choice="plain"><replaceable>mimetypes-file</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-mime</command>
- <arg choice="plain">uninstall</arg>
- <arg><option>--mode <replaceable>mode</replaceable></option></arg>
- <arg choice="plain"><replaceable>mimetypes-file</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-mime</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- The xdg-mime program can be used to query information about file types
- and to add descriptions for new file types.
- </para>
- </refsect1>
- <refsect1 id="commands">
- <title>Commands</title>
- <variablelist>
- <varlistentry>
- <term>query</term>
- <listitem>
- <simpara>
- Returns information related to file types.
- </simpara>
- <simpara>
- The <emphasis>query</emphasis> option is for use inside a desktop session only.
- It is not recommended to use xdg-mime query as root.
- </simpara>
- <simpara>
- The following queries are supported:
- </simpara>
- <simpara>query filetype <replaceable>FILE</replaceable>:
- Returns the file type of <replaceable>FILE</replaceable> in the form of a MIME type.
- </simpara>
- <simpara>query default <replaceable>mimetype</replaceable>:
- Returns the default application that the desktop environment uses for opening
- files of type <replaceable>mimetype</replaceable>. The default application is
- identified by its *.desktop file.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>default</term>
- <listitem>
- <simpara>
- Ask the desktop environment to make <replaceable>application</replaceable>
- the default application for opening
- files of type <replaceable>mimetype</replaceable>. An
- application can be made the default for several file types by
- specifying multiple mimetypes.
- </simpara>
- <simpara>
- <replaceable>application</replaceable> is the desktop file
- id of the application and has the form vendor-name.desktop
- <replaceable>application</replaceable> must already be installed
- in the desktop menu before it can be made the default handler.
- The aplication's desktop file must list support for all the
- MIME types that it wishes to be the default handler for.
- </simpara>
- <simpara>
- Requests to make an application a default handler may be
- subject to system policy or approval by the end-user. xdg-mime
- query can be used to verify whether an application is the
- actual default handler for a specific file type.
- </simpara>
- <simpara>
- The <emphasis>default</emphasis> option is for use inside a desktop session only.
- It is not recommended to use xdg-mime default as root.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>install</term>
- <listitem>
- <simpara>
- Adds the file type descriptions provided in <replaceable>mimetypes-file</replaceable>
- to the desktop environment. <replaceable>mimetypes-file</replaceable>
- must be a XML file that follows the freedesktop.org
- Shared MIME-info Database specification
- and that has a mime-info element as its document root. For
- each new file type one or more icons with name
- <replaceable>type</replaceable>-<replaceable>subtype</replaceable>
- must be installed with the <command>xdg-icon-resource</command>
- command in the <emphasis>mimetypes</emphasis> context. For example the
- filetype application/vnd.oasis.opendocument.text requires an
- icon named application-vnd.oasis.opendocument.text
- to be installed (unless the file type recommends another icon name).
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>uninstall</term>
- <listitem>
- <simpara>
- Removes the file type descriptions provided in <replaceable>mimetypes-file</replaceable>
- and previously added with <command>xdg-mime install</command> from the
- desktop environment. <replaceable>mimetypes-file</replaceable>
- must be a XML file that follows the freedesktop.org
- Shared MIME-info Database specification
- and that has a mime-info element as its document root.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--mode</option> <replaceable>mode</replaceable></term>
- <listitem>
- <simpara><replaceable>mode</replaceable> can be
- <emphasis>user</emphasis> or <emphasis>system</emphasis>.
- In user mode the file is (un)installed for the current user
- only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in
- system mode.
- </simpara>
- <simpara>
- The default is to use system mode when called by root
- and to use user mode when called by a non-root user.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>--novendor</option></term>
- <listitem>
- <simpara>
- Normally, xdg-mime checks to ensure that the
- <replaceable>mimetypes-file</replaceable> to be installed
- has a proper vendor prefix. This option can be
- used to disable that check.
- </simpara>
- <simpara>
- 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.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="env_vars">
- <title>Environment Variables</title>
- <para>
- xdg-mime honours the following environment variables:
- </para>
- <variablelist>
- <varlistentry>
- <term>XDG_UTILS_DEBUG_LEVEL</term>
- <listitem>
- <simpara>
- Setting this environment variable to a non-zero numerical value
- makes xdg-mime do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>XDG_UTILS_INSTALL_MODE</term>
- <listitem>
- <simpara>
- This environment variable can be used by the user or
- administrator to override the installation mode.
- Valid values are <emphasis>user</emphasis> and
- <emphasis>system</emphasis>.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>5</option></term>
- <listitem>
- <simpara>
- No permission to read one of the files passed on the command
- line.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="seealso">
- <title>See Also</title>
- <para><citerefentry><refentrytitle>xdg-icon-resource</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>,
- <citerefentry><refentrytitle>xdg-desktop-menu</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-mime query filetype /tmp/foobar.png
-</programlisting>Prints the MIME type of the file /tmp/foobar.png, in this
-case image/png
- </para>
- <para>
-<programlisting>
-xdg-mime query default image/png
-</programlisting>Prints the .desktop filename of the application which is
- registered to open PNG files.
- </para>
- <para>
-<programlisting>
-xdg-mime install shinythings-shiny.xml
-</programlisting>Adds a file type description for "shiny"-files.
- "shinythings-" is used as the vendor prefix.
- The file type description could look as folows.
-<programlisting>
-shinythings-shiny.xml:
-
-&lt;?xml version="1.0"?&gt;
-&lt;mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'&gt;
- &lt;mime-type type="text/x-shiny"&gt;
- &lt;comment&gt;Shiny new file type&lt;/comment&gt;
- &lt;glob pattern="*.shiny"/&gt;
- &lt;glob pattern="*.shi"/&gt;
- &lt;/mime-type&gt;
-&lt;/mime-info&gt;
-</programlisting>An icon for this new file type must also be installed, for
-example with:
-<programlisting>
-xdg-icon-resource install --context mimetypes --size 64 shiny-file-icon.png text-x-shiny
-</programlisting>
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-open.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-open.xml
deleted file mode 100755
index 067f45a901a..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-open.xml
+++ /dev/null
@@ -1,156 +0,0 @@
-<?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-open">
- <refentryinfo>
- <title>xdg-open 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>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-open</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-open</refname>
- <refpurpose>opens a file or URL in the user's preferred application</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-open</command>
- <group choice="req">
- <arg choice="plain"><option><replaceable>file</replaceable></option></arg>
- <arg choice="plain"><option><replaceable>URL</replaceable></option></arg>
- </group>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-open</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <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
- 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.
- </para>
- <para>
- xdg-open is for use inside a desktop session only.
- It is not recommended to use xdg-open as root.
- </para>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-open 'http://www.freedesktop.org/'
-</programlisting>
- Opens the Freedesktop.org website in the user's default browser
- </para>
- <para>
-<programlisting>
-xdg-open /tmp/foobar.png
-</programlisting>
- Opens the PNG image file /tmp/foobar.png in the user's default image
- viewing application.
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-screensaver.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-screensaver.xml
deleted file mode 100755
index 0beebd105f2..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-screensaver.xml
+++ /dev/null
@@ -1,227 +0,0 @@
-<?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-screensaver">
- <refentryinfo>
- <title>xdg-screensaver Manual</title>
- <copyright>
- <year>2006</year>
- </copyright>
- <author>
- <firstname>Bryce</firstname>
- <surname>Harrington</surname>
- </author>
- <address><email>bryce@osdl.org</email></address>
- <releaseinfo>xdg-utils 1.0</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-screensaver</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-screensaver</refname>
- <refpurpose>command line tool for controlling the screensaver</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-screensaver</command>
- <arg choice="plain"><option>suspend <replaceable>WindowID</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-screensaver</command>
- <arg choice="plain"><option>resume <replaceable>WindowID</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-screensaver</command>
- <group choice="req">
- <arg choice="plain"><option>activate</option></arg>
- <arg choice="plain"><option>lock</option></arg>
- <arg choice="plain"><option>reset</option></arg>
- <arg choice="plain"><option>status</option></arg>
- </group>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-screensaver</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- xdg-screensaver provides commands to control the screensaver.
- </para>
- <para>
- xdg-screensaver is for use inside a desktop session only.
- It is not recommended to use xdg-screensaver as root.
- </para>
- </refsect1>
- <refsect1 id="commands">
- <title>Commands</title>
- <variablelist>
- <varlistentry>
- <term><option>suspend <replaceable>WindowID</replaceable></option></term>
- <listitem>
- <simpara>
- Suspends the screensaver and monitor power management.
- <replaceable>WindowID</replaceable> must be the X Window ID
- of an existing window of the calling application. The window
- must remain in existance for the duration of the suspension.
- </simpara>
- <simpara>
- WindowID can be represented as either a decimal number
- or as a hexadecimal number consisting of the prefix
- <emphasis>0x</emphasis> followed by one or more hexadecimal
- digits.
- </simpara>
- <simpara>
- The screensaver can be suspended in relation to multiple
- windows at the same time. In that case screensaver
- operation is only restored once the screensaver has been
- resumed in relation to each of the windows
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>resume <replaceable>WindowID</replaceable></option></term>
- <listitem>
- <simpara>
- Resume the screensaver and monitor power management after being
- suspended.
- <replaceable>WindowID</replaceable>
- must be the same X Window ID that was passed to a previous call
- of <command>xdg-screensaver suspend</command>
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>activate</option></term>
- <listitem>
- <simpara>
- Turns the screensaver on immediately. This may result in the
- screen getting locked, depending on existing system policies.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>lock</option></term>
- <listitem>
- <simpara>
- Lock the screen immediately.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>reset</option></term>
- <listitem>
- <simpara>
- Turns the screensaver off immediately. If the screen was locked
- the user may be asked to authenticate first.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>status</option></term>
- <listitem>
- <simpara>
- Prints <emphasis>enabled</emphasis> to stdout if the
- screensaver is enabled to turn on after a period of
- inactivity and prints
- <emphasis>disabled</emphasis> if the screensaver is
- not enabled.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-screensaver suspend 0x1c00007
-</programlisting>Causes the screensaver to be disabled till
- <command>xdg-screensaver resume 0x1c00007</command> is called.
- <emphasis>0x1c00007</emphasis> must be the X Window ID of an
- existing window.
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-settings.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-settings.xml
deleted file mode 100644
index f9ef29139a0..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-settings.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<?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-settings">
- <refentryinfo>
- <title>xdg-settings Manual</title>
- <copyright>
- <year>2009-2011</year>
- </copyright>
- <author>
- <firstname>Mike</firstname>
- <surname>Mammarella</surname>
- </author>
- <address><email>mdm@google.com</email></address>
- <!--<releaseinfo>xdg-utils 1.0</releaseinfo>-->
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-settings</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-settings</refname>
- <refpurpose>get various settings from the desktop environment</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-settings</command>
- <group choice="req">
- <arg choice="plain"><option><replaceable>get</replaceable></option></arg>
- <arg choice="plain"><option><replaceable>check</replaceable></option></arg>
- <arg choice="plain"><option><replaceable>set</replaceable></option></arg>
- </group>
- <group choice="req">
- <option>property</option>
- </group>
- <group choice="opt">
- <option>subproperty</option>
- </group>
- <group choice="opt">
- <option>value</option>
- </group>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-settings</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--list</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- xdg-settings gets various settings from the desktop environment.
- For instance, desktop environments often provide proxy configuration
- and default web browser settings. Using xdg-settings these parameters
- can be extracted for use by applications that do not use the desktop
- environment's libraries (which would use the settings natively).
- </para>
- <para>
- xdg-settings is for use inside a desktop session only.
- It is not recommended to use xdg-settings as root.
- </para>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--list</option></term>
- <listitem>
- <simpara>
- List all properties xdg-settings knows about.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="properties">
- <title>Properties</title>
- <para>
- When using xdg-settings to get, check or set a destkop setting, properties
- and possibly sub-properties are used to specify the setting to be changed.
- </para>
- <para>
- Some properties (such as default-web-browser) fully describe the setting
- to be changed. Other properties (such as default-url-scheme-handler) require
- more information (in this case the actual scheme to set the default handler
- for) which must be provided in a sub-property.
- </para>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
- Get the desktop file name of the current default web browser
- <programlisting>
- xdg-settings get default-web-browser
- </programlisting>
- </para>
- <para>
- Check whether the default web browser is firefox.desktop, which can be
- false even if "get default-web-browser" says that is the current value
- (if only some of the underlying settings actually reflect that value)
- <programlisting>
- xdg-settings check default-web-browser firefox.desktop
- </programlisting>
- </para>
- <para>
- Set the default web browser to google-chrome.desktop
- <programlisting>
- xdg-settings set default-web-browser google-chrome.desktop
- </programlisting>
- </para>
- <para>
- Set the default mailto URL scheme handler to be evolution.desktop
- <programlisting>
- xdg-settings set default-url-scheme-handler mailto evolution.desktop
- </programlisting>
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-su.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-su.xml
deleted file mode 100755
index c297415daec..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-su.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-<?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-su">
- <refentryinfo>
- <title>xdg-su 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-su Manual.</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-su</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-su</refname>
- <refpurpose>run a GUI program as root after prompting for the root password</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-su</command>
- <arg><option>-u <replaceable>user</replaceable></option></arg>
- <arg choice="plain"><option>-c <replaceable>command</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-su</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- xdg-su provides a graphical dialog that prompts the user for a password
- to run <replaceable>command</replaceable> as <replaceable>user</replaceable>
- or as root if no user was specified.
- </para>
- <para>
- xdg-su is for use inside a desktop session only.
- </para>
- <para>
- xdg-su discards any stdout and stderr output from
- <replaceable>command</replaceable>.
- </para>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>-u <replaceable>user</replaceable></option></term>
- <listitem>
- <simpara>
- run <replaceable>command</replaceable> as
- <replaceable>user</replaceable>. The default is to run as root.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>2</option></term>
- <listitem>
- <simpara>
- One of the files passed on the command line did not exist.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="seealso">
- <title>See Also</title>
- <para><citerefentry><refentrytitle>su</refentrytitle>
- <manvolnum>1</manvolnum>
- </citerefentry>
- </para>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-su -u root -c "/opt/shinythings/bin/install-GUI --install fast"
-</programlisting>
- Runs the /opt/shinythings/bin/install-GUI command with root permissions.
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/desc/xdg-terminal.xml b/chromium/third_party/xdg-utils/scripts/desc/xdg-terminal.xml
deleted file mode 100644
index 1b9f350640e..00000000000
--- a/chromium/third_party/xdg-utils/scripts/desc/xdg-terminal.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?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-terminal">
- <refentryinfo>
- <title>xdg-terminal Manual</title>
- <copyright>
- <year>2006</year>
- </copyright>
- <author>
- <firstname>Kevin</firstname>
- <surname>Krammer</surname>
- </author>
- <address><email>kevin.krammer@gmx.at</email></address>
- <releaseinfo>xdg-terminal Technology Preview</releaseinfo>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle>xdg-terminal</refentrytitle>
- <manvolnum>1</manvolnum>
- </refmeta>
-
- <refnamediv>
- <refname>xdg-terminal</refname>
- <refpurpose>opens the user's preferred terminal emulator application</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>xdg-terminal</command>
- <arg choice="opt"><option><replaceable>command</replaceable></option></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>xdg-terminal</command>
- <group choice="req">
- <arg choice="plain"><option>--help</option></arg>
- <arg choice="plain"><option>--manual</option></arg>
- <arg choice="plain"><option>--version</option></arg>
- </group>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="description">
- <title>Description</title>
- <para>
- xdg-terminal opens the user's preferred terminal emulator application.
- If a command is provided the command will be executed by the shell within
- the newly opened terminal window.
- </para>
- <para>
- xdg-terminal is for use inside a desktop session only.
- It is not recommended to use xdg-terminal as root.
- </para>
- </refsect1>
- <refsect1 id="options">
- <title>Options</title>
- <variablelist>
- <varlistentry>
- <term><option>--help</option></term>
- <listitem>
- <simpara>
- Show command synopsis.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--manual</option></term>
- <listitem>
- <simpara>
- Show this manualpage.
- </simpara>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--version</option></term>
- <listitem>
- <simpara>
- Show the xdg-utils version information.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="exitcodes">
- <title>Exit Codes</title>
- <para>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </para>
- <variablelist>
- <varlistentry>
- <term><option>1</option></term>
- <listitem>
- <simpara>
- Error in command line syntax.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>3</option></term>
- <listitem>
- <simpara>
- A required tool could not be found.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>4</option></term>
- <listitem>
- <simpara>
- The action failed.
- </simpara>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="examples">
- <title>Examples</title>
- <para>
-<programlisting>
-xdg-terminal
-</programlisting>
- Opens the user's default terminal emulator, just starting an interactive shell.
- </para>
- <para>
-<programlisting>
-xdg-terminal top
-</programlisting>
- Opens the user's default terminal emulator and lets it run the top executable.
- </para>
- </refsect1>
-</refentry>
diff --git a/chromium/third_party/xdg-utils/scripts/generate-help-script.awk b/chromium/third_party/xdg-utils/scripts/generate-help-script.awk
deleted file mode 100644
index d4bf76e62b1..00000000000
--- a/chromium/third_party/xdg-utils/scripts/generate-help-script.awk
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/awk -f
-#---------------------------------------------
-#
-# generate-script.awk
-#
-# Simple AWK script to generate the XDG scripts, substituting the
-# necessary text from other source files.
-#
-# Copyright 2006, Benedikt Meurer <benny@xfce.org>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-
-# All lines from the input file should be printed
-{
- print
-}
-
-
-# The text from ../LICENSE should be inserted after
-# the "# LICENSE:" line
-/^# LICENSE:/ {
- while (getline < "../LICENSE")
- print
- close ("../LICENSE")
-}
-
-
-# Insert the examples text from the .txt file
-# after the "cat << _MANUALPAGE" line
-/^cat << _MANUALPAGE/ {
- # determine the name of the .txt file
- txtfile = FILENAME
- sub(/\.in$/, ".txt", txtfile)
-
- # read the .txt file content
- for (txtfile_print = 0; getline < txtfile; ) {
-# if (match ($0, /^Examples/) != 0) {
-# # print everything starting at the "Examples" line
-# txtfile_print = 1
-# }
-# if (txtfile_print != 0) {
-# print $0
-# }
- gsub("`","'")
- gsub("—","-")
- print $0
- }
- close (txtfile)
-}
-
-
-# Insert the usage text from the .txt file
-# after the "cat << _USAGE" line
-/^cat << _USAGE/ {
- # determine the name of the .txt file
- txtfile = FILENAME
- sub(/\.in$/, ".txt", txtfile)
-
- # read the .txt file content
- for (txtfile_print = 0; getline < txtfile; ) {
- if (match ($0, /^Name/) != 0) {
- # skip empty line after "Name"
- getline < txtfile
-
- # from now on, print everything
- txtfile_print = 1
- }
- else if (match ($0, /^Description/) != 0) {
- # stop at "Description"
- break
- }
- else if (txtfile_print != 0) {
- gsub("—","-")
- print $0
- }
- }
- close (txtfile)
-}
-
-
-# Insert the xdg-utils-common.in content after
-# the "#@xdg-utils-common@" line
-/^#@xdg-utils-common@/ {
- while (getline < "xdg-utils-common.in")
- print
- close ("xdg-utils-common.in")
-}
-
-
diff --git a/chromium/third_party/xdg-utils/scripts/html/index.html b/chromium/third_party/xdg-utils/scripts/html/index.html
deleted file mode 100644
index 64b0c53d627..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<html>
-<body>
-<h1>xdg-utils</h1>
-<p>
-This version of xdg-utils contains the following commands:
-</p>
-<table>
-<tr><td><a href="xdg-desktop-menu.html">xdg-desktop-menu</a>:</td><td>command line tool for (un)installing desktop menu items</td></tr>
-<tr><td><a href="xdg-desktop-icon.html">xdg-desktop-icon</a>:</td><td>command line tool for (un)installing icons to the desktop</td></tr>
-<tr><td><a href="xdg-mime.html">xdg-mime</a>:</td><td>command line tool for querying information about file type handling
-and adding descriptions for new file types</td></tr>
-<tr><td><a href="xdg-icon-resource.html">xdg-icon-resource</a>:</td><td>command line tool for (un)installing icon resources</td></tr>
-<tr><td><a href="xdg-open.html">xdg-open</a>:</td><td>opens a file or URL in the user's preferred application</td></tr>
-<tr><td><a href="xdg-email.html">xdg-email</a>:</td><td>command line tool for sending mail using the user's preferred e-mail composer</td></tr>
-<tr><td><a href="xdg-screensaver.html">xdg-screensaver</a>:</td><td>command line tool for controlling the screensaver</td></tr>
-<tr><td><a href="xdg-settings.html">xdg-settings</a>:</td><td>get various settings from the desktop environment</td></tr>
-</table>
-</body>
-</html> \ No newline at end of file
diff --git a/chromium/third_party/xdg-utils/scripts/html/index.html.post b/chromium/third_party/xdg-utils/scripts/html/index.html.post
deleted file mode 100644
index 7b999de85f5..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/index.html.post
+++ /dev/null
@@ -1,3 +0,0 @@
-</table>
-</body>
-</html> \ No newline at end of file
diff --git a/chromium/third_party/xdg-utils/scripts/html/index.html.pre b/chromium/third_party/xdg-utils/scripts/html/index.html.pre
deleted file mode 100644
index 5d43839080f..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/index.html.pre
+++ /dev/null
@@ -1,7 +0,0 @@
-<html>
-<body>
-<h1>xdg-utils</h1>
-<p>
-This version of xdg-utils contains the following commands:
-</p>
-<table>
diff --git a/chromium/third_party/xdg-utils/scripts/html/xdg-desktop-icon.html b/chromium/third_party/xdg-utils/scripts/html/xdg-desktop-icon.html
deleted file mode 100644
index f9683ba2013..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-desktop-icon.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-desktop-icon</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-desktop-icon"><a name="xdg-desktop-icon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-desktop-icon &#8212; command line tool for (un)installing icons to the desktop</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-desktop-icon</code> install [<code class="option">--novendor</code>] <em class="replaceable"><code>FILE</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-icon</code> uninstall <em class="replaceable"><code>FILE</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-desktop-icon</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><a name="description"></a><h2>Description</h2><p>
- The xdg-desktop-icon program can be used to install an application launcher
- or other file on the desktop of the current user.
- </p><p>
- An application launcher is represented by a *.desktop file.
- Desktop files are defined by the freedesktop.org Desktop Entry
- Specification. The most important aspects of *.desktop files
- are summarized below.
- </p></div><div class="refsect1" title="Commands"><a name="commands"></a><h2>Commands</h2><div class="variablelist"><dl><dt><span class="term">install</span></dt><dd>
- Installs <em class="replaceable"><code>FILE</code></em> to the desktop of the current user.
- <em class="replaceable"><code>FILE</code></em> can be a *.desktop file or any
- other type of file.
- </dd><dt><span class="term">uninstall</span></dt><dd>
- Removes <em class="replaceable"><code>FILE</code></em> from the desktop
- of the current user.
- </dd></dl></div></div><div class="refsect1" title="Options"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--novendor</code></span></dt><dd><p class="simpara">
- Normally, xdg-desktop-icon checks to ensure that a *.desktop file
- to be installed has a vendor prefix. This option can be
- used to disable that check.
- </p><p class="simpara">
- 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.
- </p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Desktop Files"><a name="desktopfiles"></a><h2>Desktop Files</h2><p>
- An application launcher can be added to the desktop by installing a
- *.desktop file. A *.desktop file consists of a
- <span class="emphasis"><em>[Desktop Entry]</em></span> header followed by several
- <em class="replaceable"><code>Key</code></em>=<em class="replaceable"><code>Value</code></em> lines.
- </p><p>
- A *.desktop file can provide a name and description for an application
- in several different languages. This is done by adding a language
- code as used by LC_MESSAGES in square brackets behind the
- <em class="replaceable"><code>Key</code></em>. This way one can specify different
- values for the same <em class="replaceable"><code>Key</code></em> depending on the
- currently selected language.
- </p><p>
- The following keys are often used:
- </p><div class="variablelist"><dl><dt><span class="term">Value=1.0</span></dt><dd>
- This is a mandatory field to indicate that the *.desktop file
- follows the 1.0 version of the specification.
- </dd><dt><span class="term">Type=Application</span></dt><dd>
- This is a mandatory field that indicates that the *.desktop file
- describes an application launcher.
- </dd><dt><span class="term">Name=<em class="replaceable"><code>Application Name</code></em></span></dt><dd>
- The name of the application.
- For example <span class="emphasis"><em>Mozilla</em></span>
- </dd><dt><span class="term">GenericName=<em class="replaceable"><code>Generic Name</code></em></span></dt><dd>
- A generic description of the application.
- For example <span class="emphasis"><em>Web Browser</em></span>
- </dd><dt><span class="term">Comment=<em class="replaceable"><code>Comment</code></em></span></dt><dd>
- Optional field to specify a tooltip for the application.
- For example <span class="emphasis"><em>Visit websites on the Internet</em></span>
- </dd><dt><span class="term">Icon=<em class="replaceable"><code>Icon File</code></em></span></dt><dd>
- The icon to use for the application. This can either be
- an absolute path to an image file or an icon-name.
- If an icon-name is provided an image lookup by name is done
- in the user's current icon theme. The <span class="command"><strong>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 application icon can be
- provided in several different sizes as well as in several
- differently themed styles.
- </dd><dt><span class="term">Exec=<em class="replaceable"><code>Command Line</code></em></span></dt><dd>
- The command line to start the application. If the application
- can open files the %f placeholder should be specified. When
- a file is dropped on the application launcher the %f is replaced
- with the file path of the dropped file. If multiple files
- can be specified on the command line the %F placeholder should
- be used instead of %f. If the application is able to open URLs
- in addition to local files then %u or %U can be used instead
- of %f or %F.
- </dd></dl></div><p>
- For a complete oveview of the *.desktop file format please
- visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec
- </p></div><div class="refsect1" title="Environment Variables"><a name="env_vars"></a><h2>Environment Variables</h2><p>
- xdg-desktop-icon honours the following environment variables:
- </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEVEL</span></dt><dd>
- Setting this environment variable to a non-zero numerical value
- makes xdg-desktop-icon do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd><dt><span class="term"><code class="option">5</code></span></dt><dd>
- No permission to read one of the files passed on the command
- line.
- </dd></dl></div></div><div class="refsect1" title="See Also"><a name="seealso"></a><h2>See Also</h2><p><span class="citerefentry"><span class="refentrytitle">xdg-icon-resource</span>(1)</span>
- </p></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
- The company ShinyThings Inc. has developed an application named
- "WebMirror" and would like to add a launcher for for on the desktop.
- The company will use "shinythings" as its vendor id.
- In order to add the application to the desktop there needs to be a
- .desktop file for the application:
-</p><pre class="programlisting">
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-</pre><p>
- </p><p>Now the xdg-desktop-icon tool can be used to add the webmirror.desktop file
- to the desktop:
-</p><pre class="programlisting">
-xdg-desktop-icon install ./shinythings-webmirror.desktop
-</pre><p>
- </p><p>To add a README file to the desktop as well, the following command can be used:
-</p><pre class="programlisting">
-xdg-desktop-icon install ./shinythings-README
-</pre><p>
- </p></div></div></body></html>
diff --git a/chromium/third_party/xdg-utils/scripts/html/xdg-desktop-menu.html b/chromium/third_party/xdg-utils/scripts/html/xdg-desktop-menu.html
deleted file mode 100644
index 71b7e045524..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-desktop-menu.html
+++ /dev/null
@@ -1,334 +0,0 @@
-<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.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-desktop-menu"><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" title="Synopsis"><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" title="Description"><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" title="Commands"><a name="commands"></a><h2>Commands</h2><div class="variablelist"><dl><dt><span class="term">install</span></dt><dd><p class="simpara">
- Install one or more applications in a submenu of
- the desktop menu system.
- </p><p class="simpara"><em class="replaceable"><code>desktop-file</code></em>:
- A desktop file represents a single menu entry 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 class="simpara">
- Menu entries can be added to the menu system in two different
- ways. They can either be added to a predefined submenu in the
- menu system based on one or more category keywords, or they can
- be added to a new submenu.
- </p><p class="simpara">
- To add a menu entry to a predefined submenu the desktop file
- that represents the menu entry must have a Categories= entry
- that lists one or more keywords. The menu item will be included
- in an appropriate submenu based on the included keywords.
- </p><p class="simpara">
- To add menu items to a new submenu the desktop-files must be
- preceded by a directory-file that describes the submenu.
- If multiple desktop-files are specified, all 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 class="command"><strong>xdg-desktop-menu</strong></span> the entries will be
- installed in addition to any already existing entries.
- </p><p class="simpara"><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 class="simpara">
- 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 class="simpara">
- Directory files follow the syntax defined by the freedesktop.org
- Desktop Entry Specification.
- </p></dd><dt><span class="term">uninstall</span></dt><dd><p class="simpara">
- Remove applications or submenus from the desktop menu system
- previously installed with <span class="command"><strong>xdg-desktop-menu install</strong></span>.
- </p><p class="simpara">
- 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 class="simpara">
- Force an update of the menu system.
- </p><p class="simpara">
- 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" title="Options"><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 class="simpara">
- 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 class="simpara">
- 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.
- </p></dd><dt><span class="term"><code class="option">--mode</code> <em class="replaceable"><code>mode</code></em></span></dt><dd><p class="simpara"><em class="replaceable"><code>mode</code></em> can be
- <span class="emphasis"><em>user</em></span> or <span class="emphasis"><em>system</em></span>.
- In user mode the file is (un)installed for the current user
- only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in
- system mode.
- </p><p class="simpara">
- The default is to use system mode when called by root
- and to use user mode when called by a non-root user.
- </p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Desktop Files"><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
- <em class="replaceable"><code>Key</code></em>=<em class="replaceable"><code>Value</code></em> lines.
- </p><p>
- A *.desktop file can provide a name and description for an application
- in several different languages. This is done by adding a language
- code as used by LC_MESSAGES in square brackets behind the
- <em class="replaceable"><code>Key</code></em>. This way one can specify different
- values for the same <em class="replaceable"><code>Key</code></em> depending on the
- currently selected language.
- </p><p>
- The following keys are often used:
- </p><div class="variablelist"><dl><dt><span class="term">Value=1.0</span></dt><dd>
- This is a mandatory field to indicate that the *.desktop file
- follows the 1.0 version of the specification.
- </dd><dt><span class="term">Type=Application</span></dt><dd>
- This is a mandatory field that indicates that the *.desktop file
- describes an application launcher.
- </dd><dt><span class="term">Name=<em class="replaceable"><code>Application Name</code></em></span></dt><dd>
- The name of the application.
- For example <span class="emphasis"><em>Mozilla</em></span>
- </dd><dt><span class="term">GenericName=<em class="replaceable"><code>Generic Name</code></em></span></dt><dd>
- A generic description of the application.
- For example <span class="emphasis"><em>Web Browser</em></span>
- </dd><dt><span class="term">Comment=<em class="replaceable"><code>Comment</code></em></span></dt><dd>
- Optional field to specify a tooltip for the application.
- For example <span class="emphasis"><em>Visit websites on the Internet</em></span>
- </dd><dt><span class="term">Icon=<em class="replaceable"><code>Icon File</code></em></span></dt><dd>
- The icon to use for the application. This can either be
- an absolute path to an image file or an icon-name.
- If an icon-name is provided an image lookup by name is done
- in the user's current icon theme. The <span class="command"><strong>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 application icon can be
- provided in several different sizes as well as in several
- differently themed styles.
- </dd><dt><span class="term">Exec=<em class="replaceable"><code>Command Line</code></em></span></dt><dd>
- The command line to start the application. If the application
- can open files the %f placeholder should be specified. When
- a file is dropped on the application launcher the %f is replaced
- with the file path of the dropped file. If multiple files
- can be specified on the command line the %F placeholder should
- be used instead of %f. If the application is able to open URLs
- in addition to local files then %u or %U can be used instead
- of %f or %F.
- </dd><dt><span class="term">Categories=<em class="replaceable"><code>Categories</code></em></span></dt><dd><p class="simpara">
- 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. When menu entries are explicitly assigned
- to a new submenu it is not necassery to list any categories.
- </p><p class="simpara">
- When using categories it is recommended to include
- one of the following categories:
- AudioVideo, Development, Education, Game, Graphics, Network,
- Office, Settings, System, Utility.
- </p><p class="simpara">
- See Appendix A of the XDG Desktop Menu Specification
- for information about additional categories.
- http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html
- </p></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
- open.
- </dd></dl></div><p>
- For a complete oveview of the *.desktop file format please
- visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec
- </p></div><div class="refsect1" title="Directory Files"><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 class="command"><strong>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" title="Environment Variables"><a name="env_vars"></a><h2>Environment Variables</h2><p>
- xdg-desktop-menu honours the following environment variables:
- </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEVEL</span></dt><dd>
- Setting this environment variable to a non-zero numerical value
- makes xdg-desktop-menu do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </dd><dt><span class="term">XDG_UTILS_INSTALL_MODE</span></dt><dd>
- This environment variable can be used by the user or
- administrator to override the installation mode.
- Valid values are <span class="emphasis"><em>user</em></span> and
- <span class="emphasis"><em>system</em></span>.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd><dt><span class="term"><code class="option">5</code></span></dt><dd>
- No permission to read one of the files passed on the command
- line.
- </dd></dl></div></div><div class="refsect1" title="See Also"><a name="seealso"></a><h2>See Also</h2><p><span class="citerefentry"><span class="refentrytitle">xdg-desktop-icon</span>(1)</span>,
- <span class="citerefentry"><span class="refentrytitle">xdg-icon-resource</span>(1)</span>,
- <span class="citerefentry"><span class="refentrytitle">xdg-mime</span>(1)</span>
- </p></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
- 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. 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. Since the items are to be added to a new submenu
- it is not necassery to include a Categories= line:
-</p><pre class="programlisting">
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
-
-shinythings-webmirror-admin.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror-admintool
- Icon=shinythings-webmirror-admintool
-
- Name=WebMirror Admin Tool
- Name[nl]=WebSpiegel Administratie Tool
-</pre><p>
- </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">
-shinythings-webmirror.directory:
-
- [Desktop Entry]
- Encoding=UTF-8
-
- Icon=shinythings-webmirror-menu
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-</pre><p>
- </p><p>
- These file can now be installed with:
-</p><pre class="programlisting">
-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
-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/chromium/third_party/xdg-utils/scripts/html/xdg-email.html b/chromium/third_party/xdg-utils/scripts/html/xdg-email.html
deleted file mode 100644
index a3854af2cdc..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-email.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<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.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-email"><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" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-email</code> [<code class="option">--utf8</code>] [<code class="option">--cc</code> <em class="replaceable"><code>address</code></em>] [<code class="option">--bcc</code> <em class="replaceable"><code>address</code></em>] [<code class="option">--subject</code> <em class="replaceable"><code>text</code></em>] [<code class="option">--body</code> <em class="replaceable"><code>text</code></em>] [<code class="option">--attach</code> <em class="replaceable"><code>file</code></em>] [ <em class="replaceable"><code>mailto-uri</code></em> | <em class="replaceable"><code>address(es)</code></em> ]</p></div><div class="cmdsynopsis"><p><code class="command">xdg-email</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><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>address(es)</code></em> or
- <em class="replaceable"><code>mailto-uri</code></em>. RFC2368 defines mailto:
- URIs. xdg-email limits support to, cc, subject and body fields in
- <em class="replaceable"><code>mailto-uri</code></em>, all other fields are silently
- ignored. <em class="replaceable"><code>address(es)</code></em> must follow the
- syntax of RFC822. Multiple addresses may be provided as
- separate arguments.
- </p><p>
- All information provided on the command line is used to
- prefill corresponding fields in the user's e-mail composer. The user
- will have the opportunity to change any of this information before
- actually sending the e-mail.
- </p><p>
- xdg-email is for use inside a desktop session only.
- It is not recommended to use xdg-email as root.
- </p><p>
- See http://portland.freedesktop.org/EmailConfig for information on
- how the user can change the e-mail composer that is used.
- </p></div><div class="refsect1" title="Options"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--utf8</code></span></dt><dd>
- Indicates that all command line options that follow are in utf8.
- Without this option, command line options are expected to be
- encoded according to locale.
- If the locale already specifies utf8 this option has no effect.
- This option does not affect mailto URIs that are passed on the
- command line.
- </dd><dt><span class="term"><code class="option">--cc</code> <em class="replaceable"><code>address</code></em></span></dt><dd>
- Specify a recipient to be copied on the e-mail.
- </dd><dt><span class="term"><code class="option">--bcc</code> <em class="replaceable"><code>address</code></em></span></dt><dd>
- Specify a recipient to be blindly copied on the e-mail.
- </dd><dt><span class="term"><code class="option">--subject</code> <em class="replaceable"><code>text</code></em></span></dt><dd>
- Specify a subject for the e-mail.
- </dd><dt><span class="term"><code class="option">--body</code> <em class="replaceable"><code>text</code></em></span></dt><dd>
- Specify a body for the e-mail. Since the user will be able to
- make changes before actually sending the e-mail, this can be
- used to provide the user with a template for the e-mail.
- <em class="replaceable"><code>text</code></em> may contain linebreaks.
- </dd><dt><span class="term"><code class="option">--attach</code> <em class="replaceable"><code>file</code></em></span></dt><dd><p class="simpara">
- Specify an attachment for the e-mail. <em class="replaceable"><code>file</code></em>
- must point to an existing file.
- </p><p class="simpara">
- Some e-mail applications require the file to remain present
- after xdg-email returns.
- </p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Environment Variables"><a name="env_vars"></a><h2>Environment Variables</h2><p>
- xdg-email honours the following environment variables:
- </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEVEL</span></dt><dd>
- Setting this environment variable to a non-zero numerical value
- makes xdg-email do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd><dt><span class="term"><code class="option">5</code></span></dt><dd>
- No permission to read one of the files passed on the command
- line.
- </dd></dl></div></div><div class="refsect1" title="Configuration"><a name="configuration"></a><h2>Configuration</h2><p>Visit http://portland.freedesktop.org/EmailConfig for information
- how to configure xdg-email to use the email client of your choice.
- </p></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
-</p><pre class="programlisting">
-xdg-email 'Jeremy White &lt;jwhite@example.com&gt;'
-</pre><p>
- </p><p>
-</p><pre class="programlisting">
-xdg-email --attach /tmp/logo.png \
- --subject 'Logo contest' \
- --body 'Attached you find the logo for the contest.' \
- 'jwhite@example.com'
-</pre><p>
- </p><p>
-</p><pre class="programlisting">
-xdg-email --subject 'Your password is about to expire' \
- 'jwhite@example.com' 'bastian@example.com' 'whipple@example.com'
-</pre><p>
- </p></div></div></body></html>
diff --git a/chromium/third_party/xdg-utils/scripts/html/xdg-icon-resource.html b/chromium/third_party/xdg-utils/scripts/html/xdg-icon-resource.html
deleted file mode 100644
index a734033eeda..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-icon-resource.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-icon-resource</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-icon-resource"><a name="xdg-icon-resource"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-icon-resource &#8212; command line tool for (un)installing icon resources</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-icon-resource</code> install [<code class="option">--noupdate</code>] [<code class="option">--novendor</code>] [<code class="option">--theme <em class="replaceable"><code>theme</code></em></code>] [<code class="option">--context <em class="replaceable"><code>context</code></em></code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] <code class="option">--size <em class="replaceable"><code>size</code></em></code> <em class="replaceable"><code>icon-file</code></em> [<em class="replaceable"><code>icon-name</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">xdg-icon-resource</code> uninstall [<code class="option">--noupdate</code>] [<code class="option">--theme <em class="replaceable"><code>theme</code></em></code>] [<code class="option">--context <em class="replaceable"><code>context</code></em></code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] <code class="option">--size <em class="replaceable"><code>size</code></em></code> <em class="replaceable"><code>icon-name</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-icon-resource</code> forceupdate [<code class="option">--theme <em class="replaceable"><code>theme</code></em></code>] [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>]</p></div><div class="cmdsynopsis"><p><code class="command">xdg-icon-resource</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><a name="description"></a><h2>Description</h2><p>
- The xdg-icon-resource program can be used to install icon resources
- into the desktop icon system in order to illustrate menu entries,
- to depict desktop icons or to graphically represent file types.
- </p><p>
- The desktop icon system identifies icons by name. Depending on the
- required size, the choice of icon theme and the context in which the
- icon is used, the desktop icon system locates an appropriate
- icon resource to depict an icon. Icon resources can be XPM files or
- PNG files.
- </p><p>
- The desktop icon system works according to the
- XDG Icon Theme Specification at
- http://www.freedesktop.org/Standards/icon-theme-spec
- </p></div><div class="refsect1" title="Commands"><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>.
- 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> or <span class="emphasis"><em>.xpm</em></span>
- as extension. If a corresponding <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 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.
- </dd></dl></div></div><div class="refsect1" title="Options"><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 desktop icon system. If multiple icons are
- added in sequence this flag can be used to indicate that
- additional changes will follow and that it is not
- necassery to update the desktop icon system right away.
- </dd><dt><span class="term"><code class="option">--novendor</code></span></dt><dd><p class="simpara">
- Normally, xdg-icon-resource checks to ensure that an icon file
- to be installed in the <span class="emphasis"><em>apps</em></span> context has
- a proper vendor prefix. This option can be used to disable
- that check.
- </p><p class="simpara">
- 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.
- </p></dd><dt><span class="term"><code class="option">--theme</code> <em class="replaceable"><code>theme</code></em></span></dt><dd>
- Installs or removes the icon file as part of
- <em class="replaceable"><code>theme</code></em>. If no theme is specified the
- icons will be installed as part of the default <span class="emphasis"><em>hicolor</em></span> theme.
- Applications may install icons under multiple themes but should
- at least install icons for the default <span class="emphasis"><em>hicolor</em></span> theme.
- </dd><dt><span class="term"><code class="option">--context</code> <em class="replaceable"><code>context</code></em></span></dt><dd>
- Specifies the context for the icon. Icons to be used in the
- application menu and as desktop icon should use
- <span class="emphasis"><em>apps</em></span> as context which is the default
- context. Icons to be used as file icons should use
- <span class="emphasis"><em>mimetypes</em></span> as context.
- Other common contexts are <span class="emphasis"><em>actions</em></span>,
- <span class="emphasis"><em>devices</em></span>, <span class="emphasis"><em>emblems</em></span>,
- <span class="emphasis"><em>filesystems</em></span> and <span class="emphasis"><em>stock</em></span>.
- </dd><dt><span class="term"><code class="option">--size</code> <em class="replaceable"><code>size</code></em></span></dt><dd>
- Specifies the size of the icon. All icons must be square.
- Common sizes for icons in the apps context are:
- 16, 22, 32, 48, 64 and 128.
- Common sizes for icons in the mimetypes context are:
- 16, 22, 32, 48, 64 and 128
- </dd><dt><span class="term"><code class="option">--mode</code> <em class="replaceable"><code>mode</code></em></span></dt><dd><p class="simpara"><em class="replaceable"><code>mode</code></em> can be
- <span class="emphasis"><em>user</em></span> or <span class="emphasis"><em>system</em></span>.
- In user mode the file is (un)installed for the current user
- only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in
- system mode.
- </p><p class="simpara">
- The default is to use system mode when called by root
- and to use user mode when called by a non-root user.
- </p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Environment Variables"><a name="env_vars"></a><h2>Environment Variables</h2><p>
- xdg-icon-resource honours the following environment variables:
- </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEVEL</span></dt><dd>
- Setting this environment variable to a non-zero numerical value
- makes xdg-icon-resource do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </dd><dt><span class="term">XDG_UTILS_INSTALL_MODE</span></dt><dd>
- This environment variable can be used by the user or
- administrator to override the installation mode.
- Valid values are <span class="emphasis"><em>user</em></span> and
- <span class="emphasis"><em>system</em></span>.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd><dt><span class="term"><code class="option">5</code></span></dt><dd>
- No permission to read one of the files passed on the command
- line.
- </dd></dl></div></div><div class="refsect1" title="See Also"><a name="seealso"></a><h2>See Also</h2><p><span class="citerefentry"><span class="refentrytitle">xdg-desktop-icon</span>(1)</span>,
- <span class="citerefentry"><span class="refentrytitle">xdg-desktop-menu</span>(1)</span>,
- <span class="citerefentry"><span class="refentrytitle">xdg-mime</span>(1)</span>
- </p></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
-To install an icon resource to depict a launcher for the application
-myfoobar, the company ShinyThings Inc. can use:
-</p><pre class="programlisting">
-xdg-icon-resource install --size 64 shinythings-myfoobar.png
-</pre><p>
- </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
-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/chromium/third_party/xdg-utils/scripts/html/xdg-mime.html b/chromium/third_party/xdg-utils/scripts/html/xdg-mime.html
deleted file mode 100644
index 53bb99c3f59..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-mime.html
+++ /dev/null
@@ -1,145 +0,0 @@
-<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.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-mime"><a name="xdg-mime"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-mime &#8212; command line tool for querying information about file type handling
-and adding descriptions for new file types</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-mime</code> query { filetype | default } ... </p></div><div class="cmdsynopsis"><p><code class="command">xdg-mime</code> default <em class="replaceable"><code>application</code></em> <em class="replaceable"><code>mimetype(s)</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-mime</code> install [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] [<code class="option">--novendor</code>] <em class="replaceable"><code>mimetypes-file</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-mime</code> uninstall [<code class="option">--mode <em class="replaceable"><code>mode</code></em></code>] <em class="replaceable"><code>mimetypes-file</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-mime</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><a name="description"></a><h2>Description</h2><p>
- The xdg-mime program can be used to query information about file types
- and to add descriptions for new file types.
- </p></div><div class="refsect1" title="Commands"><a name="commands"></a><h2>Commands</h2><div class="variablelist"><dl><dt><span class="term">query</span></dt><dd><p class="simpara">
- Returns information related to file types.
- </p><p class="simpara">
- The <span class="emphasis"><em>query</em></span> option is for use inside a desktop session only.
- It is not recommended to use xdg-mime query as root.
- </p><p class="simpara">
- The following queries are supported:
- </p><p class="simpara">query filetype <em class="replaceable"><code>FILE</code></em>:
- Returns the file type of <em class="replaceable"><code>FILE</code></em> in the form of a MIME type.
- </p><p class="simpara">query default <em class="replaceable"><code>mimetype</code></em>:
- Returns the default application that the desktop environment uses for opening
- files of type <em class="replaceable"><code>mimetype</code></em>. The default application is
- identified by its *.desktop file.
- </p></dd><dt><span class="term">default</span></dt><dd><p class="simpara">
- Ask the desktop environment to make <em class="replaceable"><code>application</code></em>
- the default application for opening
- files of type <em class="replaceable"><code>mimetype</code></em>. An
- application can be made the default for several file types by
- specifying multiple mimetypes.
- </p><p class="simpara">
- <em class="replaceable"><code>application</code></em> is the desktop file
- id of the application and has the form vendor-name.desktop
- <em class="replaceable"><code>application</code></em> must already be installed
- in the desktop menu before it can be made the default handler.
- The aplication's desktop file must list support for all the
- MIME types that it wishes to be the default handler for.
- </p><p class="simpara">
- Requests to make an application a default handler may be
- subject to system policy or approval by the end-user. xdg-mime
- query can be used to verify whether an application is the
- actual default handler for a specific file type.
- </p><p class="simpara">
- The <span class="emphasis"><em>default</em></span> option is for use inside a desktop session only.
- It is not recommended to use xdg-mime default as root.
- </p></dd><dt><span class="term">install</span></dt><dd>
- Adds the file type descriptions provided in <em class="replaceable"><code>mimetypes-file</code></em>
- to the desktop environment. <em class="replaceable"><code>mimetypes-file</code></em>
- must be a XML file that follows the freedesktop.org
- Shared MIME-info Database specification
- and that has a mime-info element as its document root. For
- each new file type one or more icons with name
- <em class="replaceable"><code>type</code></em>-<em class="replaceable"><code>subtype</code></em>
- must be installed with the <span class="command"><strong>xdg-icon-resource</strong></span>
- command in the <span class="emphasis"><em>mimetypes</em></span> context. For example the
- filetype application/vnd.oasis.opendocument.text requires an
- icon named application-vnd.oasis.opendocument.text
- to be installed (unless the file type recommends another icon name).
- </dd><dt><span class="term">uninstall</span></dt><dd>
- Removes the file type descriptions provided in <em class="replaceable"><code>mimetypes-file</code></em>
- and previously added with <span class="command"><strong>xdg-mime install</strong></span> from the
- desktop environment. <em class="replaceable"><code>mimetypes-file</code></em>
- must be a XML file that follows the freedesktop.org
- Shared MIME-info Database specification
- and that has a mime-info element as its document root.
- </dd></dl></div></div><div class="refsect1" title="Options"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--mode</code> <em class="replaceable"><code>mode</code></em></span></dt><dd><p class="simpara"><em class="replaceable"><code>mode</code></em> can be
- <span class="emphasis"><em>user</em></span> or <span class="emphasis"><em>system</em></span>.
- In user mode the file is (un)installed for the current user
- only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in
- system mode.
- </p><p class="simpara">
- The default is to use system mode when called by root
- and to use user mode when called by a non-root user.
- </p></dd><dt><span class="term"><code class="option">--novendor</code></span></dt><dd><p class="simpara">
- Normally, xdg-mime checks to ensure that the
- <em class="replaceable"><code>mimetypes-file</code></em> to be installed
- has a proper vendor prefix. This option can be
- used to disable that check.
- </p><p class="simpara">
- 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.
- </p></dd><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Environment Variables"><a name="env_vars"></a><h2>Environment Variables</h2><p>
- xdg-mime honours the following environment variables:
- </p><div class="variablelist"><dl><dt><span class="term">XDG_UTILS_DEBUG_LEVEL</span></dt><dd>
- Setting this environment variable to a non-zero numerical value
- makes xdg-mime do more verbose reporting on stderr.
- Setting a higher value increases the verbosity.
- </dd><dt><span class="term">XDG_UTILS_INSTALL_MODE</span></dt><dd>
- This environment variable can be used by the user or
- administrator to override the installation mode.
- Valid values are <span class="emphasis"><em>user</em></span> and
- <span class="emphasis"><em>system</em></span>.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd><dt><span class="term"><code class="option">5</code></span></dt><dd>
- No permission to read one of the files passed on the command
- line.
- </dd></dl></div></div><div class="refsect1" title="See Also"><a name="seealso"></a><h2>See Also</h2><p><span class="citerefentry"><span class="refentrytitle">xdg-icon-resource</span>(1)</span>,
- <span class="citerefentry"><span class="refentrytitle">xdg-desktop-menu</span>(1)</span>
- </p></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
-</p><pre class="programlisting">
-xdg-mime query filetype /tmp/foobar.png
-</pre><p>Prints the MIME type of the file /tmp/foobar.png, in this
-case image/png
- </p><p>
-</p><pre class="programlisting">
-xdg-mime query default image/png
-</pre><p>Prints the .desktop filename of the application which is
- registered to open PNG files.
- </p><p>
-</p><pre class="programlisting">
-xdg-mime install shinythings-shiny.xml
-</pre><p>Adds a file type description for "shiny"-files.
- "shinythings-" is used as the vendor prefix.
- The file type description could look as folows.
-</p><pre class="programlisting">
-shinythings-shiny.xml:
-
-&lt;?xml version="1.0"?&gt;
-&lt;mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'&gt;
- &lt;mime-type type="text/x-shiny"&gt;
- &lt;comment&gt;Shiny new file type&lt;/comment&gt;
- &lt;glob pattern="*.shiny"/&gt;
- &lt;glob pattern="*.shi"/&gt;
- &lt;/mime-type&gt;
-&lt;/mime-info&gt;
-</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 shiny-file-icon.png text-x-shiny
-</pre><p>
- </p></div></div></body></html>
diff --git a/chromium/third_party/xdg-utils/scripts/html/xdg-open.html b/chromium/third_party/xdg-utils/scripts/html/xdg-open.html
deleted file mode 100644
index 24335002af2..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-open.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<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.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-open"><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" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-open</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 class="cmdsynopsis"><p><code class="command">xdg-open</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><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
- preferred application for files of that type. xdg-open supports
- file, ftp, http and https URLs.
- </p><p>
- xdg-open is for use inside a desktop session only.
- It is not recommended to use xdg-open as root.
- </p></div><div class="refsect1" title="Options"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd></dl></div></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
-</p><pre class="programlisting">
-xdg-open 'http://www.freedesktop.org/'
-</pre><p>
- Opens the Freedesktop.org website in the user's default browser
- </p><p>
-</p><pre class="programlisting">
-xdg-open /tmp/foobar.png
-</pre><p>
- Opens the PNG image file /tmp/foobar.png in the user's default image
- viewing application.
- </p></div></div></body></html>
diff --git a/chromium/third_party/xdg-utils/scripts/html/xdg-screensaver.html b/chromium/third_party/xdg-utils/scripts/html/xdg-screensaver.html
deleted file mode 100644
index 219f48ca2fe..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-screensaver.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-screensaver</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-screensaver"><a name="xdg-screensaver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-screensaver &#8212; command line tool for controlling the screensaver</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> <code class="option">suspend <em class="replaceable"><code>WindowID</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> <code class="option">resume <em class="replaceable"><code>WindowID</code></em></code> </p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> { <code class="option">activate</code> | <code class="option">lock</code> | <code class="option">reset</code> | <code class="option">status</code> }</p></div><div class="cmdsynopsis"><p><code class="command">xdg-screensaver</code> { <code class="option">--help</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><a name="description"></a><h2>Description</h2><p>
- xdg-screensaver provides commands to control the screensaver.
- </p><p>
- xdg-screensaver is for use inside a desktop session only.
- It is not recommended to use xdg-screensaver as root.
- </p></div><div class="refsect1" title="Commands"><a name="commands"></a><h2>Commands</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">suspend <em class="replaceable"><code>WindowID</code></em></code></span></dt><dd><p class="simpara">
- Suspends the screensaver and monitor power management.
- <em class="replaceable"><code>WindowID</code></em> must be the X Window ID
- of an existing window of the calling application. The window
- must remain in existance for the duration of the suspension.
- </p><p class="simpara">
- WindowID can be represented as either a decimal number
- or as a hexadecimal number consisting of the prefix
- <span class="emphasis"><em>0x</em></span> followed by one or more hexadecimal
- digits.
- </p><p class="simpara">
- The screensaver can be suspended in relation to multiple
- windows at the same time. In that case screensaver
- operation is only restored once the screensaver has been
- resumed in relation to each of the windows
- </p></dd><dt><span class="term"><code class="option">resume <em class="replaceable"><code>WindowID</code></em></code></span></dt><dd>
- Resume the screensaver and monitor power management after being
- suspended.
- <em class="replaceable"><code>WindowID</code></em>
- must be the same X Window ID that was passed to a previous call
- of <span class="command"><strong>xdg-screensaver suspend</strong></span>
- </dd><dt><span class="term"><code class="option">activate</code></span></dt><dd>
- Turns the screensaver on immediately. This may result in the
- screen getting locked, depending on existing system policies.
- </dd><dt><span class="term"><code class="option">lock</code></span></dt><dd>
- Lock the screen immediately.
- </dd><dt><span class="term"><code class="option">reset</code></span></dt><dd>
- Turns the screensaver off immediately. If the screen was locked
- the user may be asked to authenticate first.
- </dd><dt><span class="term"><code class="option">status</code></span></dt><dd>
- Prints <span class="emphasis"><em>enabled</em></span> to stdout if the
- screensaver is enabled to turn on after a period of
- inactivity and prints
- <span class="emphasis"><em>disabled</em></span> if the screensaver is
- not enabled.
- </dd></dl></div></div><div class="refsect1" title="Options"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd></dl></div></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
-</p><pre class="programlisting">
-xdg-screensaver suspend 0x1c00007
-</pre><p>Causes the screensaver to be disabled till
- <span class="command"><strong>xdg-screensaver resume 0x1c00007</strong></span> is called.
- <span class="emphasis"><em>0x1c00007</em></span> must be the X Window ID of an
- existing window.
- </p></div></div></body></html>
diff --git a/chromium/third_party/xdg-utils/scripts/html/xdg-settings.html b/chromium/third_party/xdg-utils/scripts/html/xdg-settings.html
deleted file mode 100644
index 380ad2a75fd..00000000000
--- a/chromium/third_party/xdg-utils/scripts/html/xdg-settings.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>xdg-settings</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" title="xdg-settings"><a name="xdg-settings"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>xdg-settings &#8212; get various settings from the desktop environment</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">xdg-settings</code> { <code class="option"><em class="replaceable"><code>get</code></em></code> | <code class="option"><em class="replaceable"><code>check</code></em></code> | <code class="option"><em class="replaceable"><code>set</code></em></code> } {<code class="option">property</code>} [<code class="option">subproperty</code>] [<code class="option">value</code>]</p></div><div class="cmdsynopsis"><p><code class="command">xdg-settings</code> { <code class="option">--help</code> | <code class="option">--list</code> | <code class="option">--manual</code> | <code class="option">--version</code> }</p></div></div><div class="refsect1" title="Description"><a name="description"></a><h2>Description</h2><p>
- xdg-settings gets various settings from the desktop environment.
- For instance, desktop environments often provide proxy configuration
- and default web browser settings. Using xdg-settings these parameters
- can be extracted for use by applications that do not use the desktop
- environment's libraries (which would use the settings natively).
- </p><p>
- xdg-settings is for use inside a desktop session only.
- It is not recommended to use xdg-settings as root.
- </p></div><div class="refsect1" title="Options"><a name="options"></a><h2>Options</h2><div class="variablelist"><dl><dt><span class="term"><code class="option">--help</code></span></dt><dd>
- Show command synopsis.
- </dd><dt><span class="term"><code class="option">--list</code></span></dt><dd>
- List all properties xdg-settings knows about.
- </dd><dt><span class="term"><code class="option">--manual</code></span></dt><dd>
- Show this manualpage.
- </dd><dt><span class="term"><code class="option">--version</code></span></dt><dd>
- Show the xdg-utils version information.
- </dd></dl></div></div><div class="refsect1" title="Properties"><a name="properties"></a><h2>Properties</h2><p>
- When using xdg-settings to get, check or set a destkop setting, properties
- and possibly sub-properties are used to specify the setting to be changed.
- </p><p>
- Some properties (such as default-web-browser) fully describe the setting
- to be changed. Other properties (such as default-url-scheme-handler) require
- more information (in this case the actual scheme to set the default handler
- for) which must be provided in a sub-property.
- </p></div><div class="refsect1" title="Exit Codes"><a name="exitcodes"></a><h2>Exit Codes</h2><p>
- An exit code of 0 indicates success while a non-zero exit code
- indicates failure. The following failure codes can be returned:
- </p><div class="variablelist"><dl><dt><span class="term"><code class="option">1</code></span></dt><dd>
- Error in command line syntax.
- </dd><dt><span class="term"><code class="option">2</code></span></dt><dd>
- One of the files passed on the command line did not exist.
- </dd><dt><span class="term"><code class="option">3</code></span></dt><dd>
- A required tool could not be found.
- </dd><dt><span class="term"><code class="option">4</code></span></dt><dd>
- The action failed.
- </dd></dl></div></div><div class="refsect1" title="Examples"><a name="examples"></a><h2>Examples</h2><p>
- Get the desktop file name of the current default web browser
- </p><pre class="programlisting">
- xdg-settings get default-web-browser
- </pre><p>
- </p><p>
- Check whether the default web browser is firefox.desktop, which can be
- false even if "get default-web-browser" says that is the current value
- (if only some of the underlying settings actually reflect that value)
- </p><pre class="programlisting">
- xdg-settings check default-web-browser firefox.desktop
- </pre><p>
- </p><p>
- Set the default web browser to google-chrome.desktop
- </p><pre class="programlisting">
- xdg-settings set default-web-browser google-chrome.desktop
- </pre><p>
- </p><p>
- Set the default mailto URL scheme handler to be evolution.desktop
- </p><pre class="programlisting">
- xdg-settings set default-url-scheme-handler mailto evolution.desktop
- </pre><p>
- </p></div></div></body></html>
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-desktop-icon.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-desktop-icon.1
deleted file mode 100644
index 0b062d2e5ca..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-desktop-icon.1
+++ /dev/null
@@ -1,241 +0,0 @@
-'\" t
-.\" Title: xdg-desktop-icon
-.\" Author: Kevin Krammer
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-desktop-icon Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-DESKTOP\-ICON" "1" "12/31/2010" "xdg-utils 1.0" "xdg-desktop-icon Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-desktop-icon \- command line tool for (un)installing icons to the desktop
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-desktop\-icon\fR\ 'u
-\fBxdg\-desktop\-icon\fR install [\fB\-\-novendor\fR] \fIFILE\fR
-.HP \w'\fBxdg\-desktop\-icon\fR\ 'u
-\fBxdg\-desktop\-icon\fR uninstall \fIFILE\fR
-.HP \w'\fBxdg\-desktop\-icon\fR\ 'u
-\fBxdg\-desktop\-icon\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-The xdg\-desktop\-icon program can be used to install an application launcher or other file on the desktop of the current user\&.
-.PP
-An application launcher is represented by a *\&.desktop file\&. Desktop files are defined by the freedesktop\&.org Desktop Entry Specification\&. The most important aspects of *\&.desktop files are summarized below\&.
-.SH "COMMANDS"
-.PP
-install
-.RS 4
-Installs
-\fIFILE\fR
-to the desktop of the current user\&.
-\fIFILE\fR
-can be a *\&.desktop file or any other type of file\&.
-.RE
-.PP
-uninstall
-.RS 4
-Removes
-\fIFILE\fR
-from the desktop of the current user\&.
-.RE
-.SH "OPTIONS"
-.PP
-\fB\-\-novendor\fR
-.RS 4
-Normally, xdg\-desktop\-icon checks to ensure that a *\&.desktop file 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\&.
-.RE
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "DESKTOP FILES"
-.PP
-An application launcher can be added to the desktop by installing a *\&.desktop file\&. A *\&.desktop file consists of a
-\fI[Desktop Entry]\fR
-header followed by several
-\fIKey\fR=\fIValue\fR
-lines\&.
-.PP
-A *\&.desktop file can provide a name and description for an application in several different languages\&. This is done by adding a language code as used by LC_MESSAGES in square brackets behind the
-\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 often used:
-.PP
-Value=1\&.0
-.RS 4
-This is a mandatory field to indicate that the *\&.desktop file follows the 1\&.0 version of the specification\&.
-.RE
-.PP
-Type=Application
-.RS 4
-This is a mandatory field that indicates that the *\&.desktop file describes an application launcher\&.
-.RE
-.PP
-Name=\fIApplication Name\fR
-.RS 4
-The name of the application\&. For example
-\fIMozilla\fR
-.RE
-.PP
-GenericName=\fIGeneric Name\fR
-.RS 4
-A generic description of the application\&. For example
-\fIWeb Browser\fR
-.RE
-.PP
-Comment=\fIComment\fR
-.RS 4
-Optional field to specify a tooltip for the application\&. For example
-\fIVisit websites on the Internet\fR
-.RE
-.PP
-Icon=\fIIcon File\fR
-.RS 4
-The icon to use for the application\&. This can either be an absolute path to an image file or an icon\-name\&. If an icon\-name is provided an image lookup by name is done in the user\*(Aqs 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 application icon can be provided in several different sizes as well as in several differently themed styles\&.
-.RE
-.PP
-Exec=\fICommand Line\fR
-.RS 4
-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\&.
-.RE
-.PP
-For a complete oveview of the *\&.desktop file format please visit http://www\&.freedesktop\&.org/wiki/Standards/desktop\-entry\-spec
-.SH "ENVIRONMENT VARIABLES"
-.PP
-xdg\-desktop\-icon honours the following environment variables:
-.PP
-XDG_UTILS_DEBUG_LEVEL
-.RS 4
-Setting this environment variable to a non\-zero numerical value makes xdg\-desktop\-icon do more verbose reporting on stderr\&. Setting a higher value increases the verbosity\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.PP
-\fB5\fR
-.RS 4
-No permission to read one of the files passed on the command line\&.
-.RE
-.SH "SEE ALSO"
-.PP
-\fBxdg-icon-resource\fR(1)
-.SH "EXAMPLES"
-.PP
-The company ShinyThings Inc\&. has developed an application named "WebMirror" and would like to add a launcher for for on the desktop\&. The company will use "shinythings" as its vendor id\&. In order to add the application to the desktop there needs to be a \&.desktop file for the application:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shinythings\-webmirror\&.desktop:
-
- [Desktop Entry]
- Encoding=UTF\-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings\-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Now the xdg\-desktop\-icon tool can be used to add the webmirror\&.desktop file to the desktop:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-desktop\-icon install \&./shinythings\-webmirror\&.desktop
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-To add a README file to the desktop as well, the following command can be used:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-desktop\-icon install \&./shinythings\-README
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-.SH "AUTHORS"
-.PP
-\fBKevin Krammer\fR
-.RS 4
-Author.
-.RE
-.PP
-\fBJeremy White\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-desktop-menu.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-desktop-menu.1
deleted file mode 100644
index b5ca38ab017..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-desktop-menu.1
+++ /dev/null
@@ -1,448 +0,0 @@
-'\" t
-.\" Title: xdg-desktop-menu
-.\" Author: Kevin Krammer
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-desktop-menu Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-DESKTOP\-MENU" "1" "12/31/2010" "xdg-utils 1.0" "xdg-desktop-menu Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-desktop-menu \- command line tool for (un)installing desktop menu items
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-desktop\-menu\fR\ 'u
-\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 \w'\fBxdg\-desktop\-menu\fR\ 'u
-\fBxdg\-desktop\-menu\fR uninstall [\fB\-\-noupdate\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fIdirectory\-file(s)\fR \fIdesktop\-file(s)\fR
-.HP \w'\fBxdg\-desktop\-menu\fR\ 'u
-\fBxdg\-desktop\-menu\fR forceupdate [\fB\-\-mode\ \fR\fB\fImode\fR\fR]
-.HP \w'\fBxdg\-desktop\-menu\fR\ 'u
-\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 menu entries to the desktop\*(Aqs application menu\&.
-.PP
-The application menu works according to the XDG Desktop Menu Specification at http://www\&.freedesktop\&.org/Standards/menu\-spec
-.SH "COMMANDS"
-.PP
-install
-.RS 4
-Install one or more applications in a submenu of the desktop menu system\&.
-.sp
-\fIdesktop\-file\fR: A desktop file represents a single menu entry 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
-Menu entries can be added to the menu system in two different ways\&. They can either be added to a predefined submenu in the menu system based on one or more category keywords, or they can be added to a new submenu\&.
-.sp
-To add a menu entry to a predefined submenu the desktop file that represents the menu entry must have a Categories= entry that lists one or more keywords\&. The menu item will be included in an appropriate submenu based on the included keywords\&.
-.sp
-To add menu items to a new submenu the desktop\-files must be preceded by a directory\-file that describes the submenu\&. If multiple desktop\-files are specified, all 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\&.
-.sp
-\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
-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
-Directory files follow the syntax defined by the freedesktop\&.org Desktop Entry Specification\&.
-.RE
-.PP
-uninstall
-.RS 4
-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\&.
-.RE
-.PP
-forceupdate
-.RS 4
-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\&.
-.RE
-.SH "OPTIONS"
-.PP
-\fB\-\-noupdate\fR
-.RS 4
-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\&.
-.RE
-.PP
-\fB\-\-novendor\fR
-.RS 4
-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\&.
-.RE
-.PP
-\fB\-\-mode\fR \fImode\fR
-.RS 4
-\fImode\fR
-can be
-\fIuser\fR
-or
-\fIsystem\fR\&. In user mode the file is (un)installed for the current user only\&. In system mode the file is (un)installed for all users on the system\&. Usually only root is allowed to install in system mode\&.
-.sp
-The default is to use system mode when called by root and to use user mode when called by a non\-root user\&.
-.RE
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "DESKTOP FILES"
-.PP
-An application item in the application menu is represented by a *\&.desktop file\&. A *\&.desktop file consists of a
-\fI[Desktop Entry]\fR
-header followed by several
-\fIKey\fR=\fIValue\fR
-lines\&.
-.PP
-A *\&.desktop file can provide a name and description for an application in several different languages\&. This is done by adding a language code as used by LC_MESSAGES in square brackets behind the
-\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 often used:
-.PP
-Value=1\&.0
-.RS 4
-This is a mandatory field to indicate that the *\&.desktop file follows the 1\&.0 version of the specification\&.
-.RE
-.PP
-Type=Application
-.RS 4
-This is a mandatory field that indicates that the *\&.desktop file describes an application launcher\&.
-.RE
-.PP
-Name=\fIApplication Name\fR
-.RS 4
-The name of the application\&. For example
-\fIMozilla\fR
-.RE
-.PP
-GenericName=\fIGeneric Name\fR
-.RS 4
-A generic description of the application\&. For example
-\fIWeb Browser\fR
-.RE
-.PP
-Comment=\fIComment\fR
-.RS 4
-Optional field to specify a tooltip for the application\&. For example
-\fIVisit websites on the Internet\fR
-.RE
-.PP
-Icon=\fIIcon File\fR
-.RS 4
-The icon to use for the application\&. This can either be an absolute path to an image file or an icon\-name\&. If an icon\-name is provided an image lookup by name is done in the user\*(Aqs 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 application icon can be provided in several different sizes as well as in several differently themed styles\&.
-.RE
-.PP
-Exec=\fICommand Line\fR
-.RS 4
-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\&.
-.RE
-.PP
-Categories=\fICategories\fR
-.RS 4
-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\&. When menu entries are explicitly assigned to a new submenu it is not necassery to list any categories\&.
-.sp
-When using categories it is recommended to include one of the following categories: AudioVideo, Development, Education, Game, Graphics, Network, Office, Settings, System, Utility\&.
-.sp
-See Appendix A of the XDG Desktop Menu Specification for information about additional categories\&. http://standards\&.freedesktop\&.org/menu\-spec/menu\-spec\-1\&.0\&.html
-.RE
-.PP
-MimeType=\fIMimetypes\fR
-.RS 4
-A list of mimetypes separated by semi\-colons\&. This field is used to indicate which file types the application is able to open\&.
-.RE
-.PP
-For a complete oveview of the *\&.desktop file format please visit http://www\&.freedesktop\&.org/wiki/Standards/desktop\-entry\-spec
-.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:
-.PP
-Value=1\&.0
-.RS 4
-This is a mandatory field to indicate that the *\&.directory file follows the 1\&.0 version of the Desktop Entry specification\&.
-.RE
-.PP
-Type=Directory
-.RS 4
-This is a mandatory field that indicates that the *\&.directory file describes a submenu\&.
-.RE
-.PP
-Name=\fIMenu Name\fR
-.RS 4
-The title of submenu\&. For example
-\fIMozilla\fR
-.RE
-.PP
-Comment=\fIComment\fR
-.RS 4
-Optional field to specify a tooltip for the submenu\&.
-.RE
-.PP
-Icon=\fIIcon File\fR
-.RS 4
-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\*(Aqs 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\&.
-.RE
-.SH "ENVIRONMENT VARIABLES"
-.PP
-xdg\-desktop\-menu honours the following environment variables:
-.PP
-XDG_UTILS_DEBUG_LEVEL
-.RS 4
-Setting this environment variable to a non\-zero numerical value makes xdg\-desktop\-menu do more verbose reporting on stderr\&. Setting a higher value increases the verbosity\&.
-.RE
-.PP
-XDG_UTILS_INSTALL_MODE
-.RS 4
-This environment variable can be used by the user or administrator to override the installation mode\&. Valid values are
-\fIuser\fR
-and
-\fIsystem\fR\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.PP
-\fB5\fR
-.RS 4
-No permission to read one of the files passed on the command line\&.
-.RE
-.SH "SEE ALSO"
-.PP
-\fBxdg-desktop-icon\fR(1),
-\fBxdg-icon-resource\fR(1),
-\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
-.if n \{\
-.RS 4
-.\}
-.nf
-shinythings\-webmirror\&.desktop:
-
- [Desktop Entry]
- Encoding=UTF\-8
- Type=Application
-
- Exec=webmirror
- Icon=webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
- Categories=Network;WebDevelopment;
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Now the xdg\-desktop\-menu tool can be used to add the shinythings\-webmirror\&.desktop file to the desktop application menu:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-desktop\-menu install \&./shinythings\-webmirror\&.desktop
-.fi
-.if n \{\
-.RE
-.\}
-.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\&.
-.PP
-In the next 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
-First the company needs to create two \&.desktop files that describe the two menu items\&. Since the items are to be added to a new submenu it is not necassery to include a Categories= line:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shinythings\-webmirror\&.desktop:
-
- [Desktop Entry]
- Encoding=UTF\-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings\-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
-
-shinythings\-webmirror\-admin\&.desktop:
-
- [Desktop Entry]
- Encoding=UTF\-8
- Type=Application
-
- Exec=webmirror\-admintool
- Icon=shinythings\-webmirror\-admintool
-
- Name=WebMirror Admin Tool
- Name[nl]=WebSpiegel Administratie Tool
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-In addition a \&.directory file needs to be created to provide a title and icon for the sub\-menu itself:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shinythings\-webmirror\&.directory:
-
- [Desktop Entry]
- Encoding=UTF\-8
-
- Icon=shinythings\-webmirror\-menu
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-These file can now be installed with:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-desktop\-menu install \&./shinythings\-webmirror\&.directory \e
- \&./shinythings\-webmirror\&.desktop \&./shinythings\-webmirror\-admin\&.desktop
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-The menu entries could also be installed one by one:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-desktop\-menu install \-\-noupdate \&./shinythings\-webmirror\&.directory \e
- \&./shinythings\-webmirror\&.desktop
-xdg\-desktop\-menu install \-\-noupdate \&./shinythings\-webmirror\&.directory \e
- \&./shinythings\-webmirror\-admin\&.desktop
-xdg\-desktop\-menu forceupdate
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Although the result is the same it is slightly more efficient to install all files at the same time\&.
-.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:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-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
-.if n \{\
-.RE
-.\}
-.sp
-.SH "AUTHORS"
-.PP
-\fBKevin Krammer\fR
-.RS 4
-Author.
-.RE
-.PP
-\fBJeremy White\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-email.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-email.1
deleted file mode 100644
index 09d170942d3..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-email.1
+++ /dev/null
@@ -1,199 +0,0 @@
-'\" t
-.\" Title: xdg-email
-.\" Author: Kevin Krammer
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-email Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-EMAIL" "1" "12/31/2010" "xdg-utils 1.0" "xdg-email Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-email \- command line tool for sending mail using the user\*(Aqs preferred e\-mail composer
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-email\fR\ 'u
-\fBxdg\-email\fR [\fB\-\-utf8\fR] [\fB\-\-cc\fR\ \fIaddress\fR] [\fB\-\-bcc\fR\ \fIaddress\fR] [\fB\-\-subject\fR\ \fItext\fR] [\fB\-\-body\fR\ \fItext\fR] [\fB\-\-attach\fR\ \fIfile\fR] [\fImailto\-uri\fR | \fIaddress(es)\fR]
-.HP \w'\fBxdg\-email\fR\ 'u
-\fBxdg\-email\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-xdg\-email opens the user\*(Aqs preferred e\-mail composer in order to send a mail to
-\fIaddress(es)\fR
-or
-\fImailto\-uri\fR\&. RFC2368 defines mailto: URIs\&. xdg\-email limits support to, cc, subject and body fields in
-\fImailto\-uri\fR, all other fields are silently ignored\&.
-\fIaddress(es)\fR
-must follow the syntax of RFC822\&. Multiple addresses may be provided as separate arguments\&.
-.PP
-All information provided on the command line is used to prefill corresponding fields in the user\*(Aqs e\-mail composer\&. The user will have the opportunity to change any of this information before actually sending the e\-mail\&.
-.PP
-xdg\-email is for use inside a desktop session only\&. It is not recommended to use xdg\-email as root\&.
-.PP
-See http://portland\&.freedesktop\&.org/EmailConfig for information on how the user can change the e\-mail composer that is used\&.
-.SH "OPTIONS"
-.PP
-\fB\-\-utf8\fR
-.RS 4
-Indicates that all command line options that follow are in utf8\&. Without this option, command line options are expected to be encoded according to locale\&. If the locale already specifies utf8 this option has no effect\&. This option does not affect mailto URIs that are passed on the command line\&.
-.RE
-.PP
-\fB\-\-cc\fR \fIaddress\fR
-.RS 4
-Specify a recipient to be copied on the e\-mail\&.
-.RE
-.PP
-\fB\-\-bcc\fR \fIaddress\fR
-.RS 4
-Specify a recipient to be blindly copied on the e\-mail\&.
-.RE
-.PP
-\fB\-\-subject\fR \fItext\fR
-.RS 4
-Specify a subject for the e\-mail\&.
-.RE
-.PP
-\fB\-\-body\fR \fItext\fR
-.RS 4
-Specify a body for the e\-mail\&. Since the user will be able to make changes before actually sending the e\-mail, this can be used to provide the user with a template for the e\-mail\&.
-\fItext\fR
-may contain linebreaks\&.
-.RE
-.PP
-\fB\-\-attach\fR \fIfile\fR
-.RS 4
-Specify an attachment for the e\-mail\&.
-\fIfile\fR
-must point to an existing file\&.
-.sp
-Some e\-mail applications require the file to remain present after xdg\-email returns\&.
-.RE
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "ENVIRONMENT VARIABLES"
-.PP
-xdg\-email honours the following environment variables:
-.PP
-XDG_UTILS_DEBUG_LEVEL
-.RS 4
-Setting this environment variable to a non\-zero numerical value makes xdg\-email do more verbose reporting on stderr\&. Setting a higher value increases the verbosity\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.PP
-\fB5\fR
-.RS 4
-No permission to read one of the files passed on the command line\&.
-.RE
-.SH "CONFIGURATION"
-.PP
-Visit http://portland\&.freedesktop\&.org/EmailConfig for information how to configure xdg\-email to use the email client of your choice\&.
-.SH "EXAMPLES"
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-email \*(AqJeremy White <jwhite@example\&.com>\*(Aq
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-email \-\-attach /tmp/logo\&.png \e
- \-\-subject \*(AqLogo contest\*(Aq \e
- \-\-body \*(AqAttached you find the logo for the contest\&.\*(Aq \e
- \*(Aqjwhite@example\&.com\*(Aq
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-email \-\-subject \*(AqYour password is about to expire\*(Aq \e
- \*(Aqjwhite@example\&.com\*(Aq \*(Aqbastian@example\&.com\*(Aq \*(Aqwhipple@example\&.com\*(Aq
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-.SH "AUTHORS"
-.PP
-\fBKevin Krammer\fR
-.RS 4
-Author.
-.RE
-.PP
-\fBJeremy White\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-icon-resource.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-icon-resource.1
deleted file mode 100644
index 283b903631b..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-icon-resource.1
+++ /dev/null
@@ -1,244 +0,0 @@
-'\" t
-.\" Title: xdg-icon-resource
-.\" Author: Kevin Krammer
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-icon-resource Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-ICON\-RESOURCE" "1" "12/31/2010" "xdg-utils 1.0" "xdg-icon-resource Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-icon-resource \- command line tool for (un)installing icon resources
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-icon\-resource\fR\ 'u
-\fBxdg\-icon\-resource\fR install [\fB\-\-noupdate\fR] [\fB\-\-novendor\fR] [\fB\-\-theme\ \fR\fB\fItheme\fR\fR] [\fB\-\-context\ \fR\fB\fIcontext\fR\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fB\-\-size\ \fR\fB\fIsize\fR\fR \fIicon\-file\fR [\fIicon\-name\fR]
-.HP \w'\fBxdg\-icon\-resource\fR\ 'u
-\fBxdg\-icon\-resource\fR uninstall [\fB\-\-noupdate\fR] [\fB\-\-theme\ \fR\fB\fItheme\fR\fR] [\fB\-\-context\ \fR\fB\fIcontext\fR\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fB\-\-size\ \fR\fB\fIsize\fR\fR \fIicon\-name\fR
-.HP \w'\fBxdg\-icon\-resource\fR\ 'u
-\fBxdg\-icon\-resource\fR forceupdate [\fB\-\-theme\ \fR\fB\fItheme\fR\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR]
-.HP \w'\fBxdg\-icon\-resource\fR\ 'u
-\fBxdg\-icon\-resource\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-The xdg\-icon\-resource program can be used to install icon resources into the desktop icon system in order to illustrate menu entries, to depict desktop icons or to graphically represent file types\&.
-.PP
-The desktop icon system identifies icons by name\&. Depending on the required size, the choice of icon theme and the context in which the icon is used, the desktop icon system locates an appropriate icon resource to depict an icon\&. Icon resources can be XPM files or PNG files\&.
-.PP
-The desktop icon system works according to the XDG Icon Theme Specification at http://www\&.freedesktop\&.org/Standards/icon\-theme\-spec
-.SH "COMMANDS"
-.PP
-install
-.RS 4
-Installs the icon file indicated by
-\fIicon\-file\fR
-to the desktop icon system under the name
-\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
-\fI\&.png\fR
-or
-\fI\&.xpm\fR
-as extension\&. If a corresponding
-\fI\&.icon\fR
-file exists in the same location as
-\fIicon\-file\fR
-it will be installed as well\&.
-.RE
-.PP
-uninstall
-.RS 4
-Removes the icon indicated by
-\fIicon\-name\fR
-from the desktop icon system\&. Note that icon names do not have an extension\&.
-.RE
-.PP
-forceupdate
-.RS 4
-Force an update of the desktop icon system\&. This is only useful if the last call to xdg\-icon\-resource included the
-\fB\-\-noupdate\fR
-option\&.
-.RE
-.SH "OPTIONS"
-.PP
-\fB\-\-noupdate\fR
-.RS 4
-Postpone updating the desktop icon system\&. If multiple icons are added in sequence this flag can be used to indicate that additional changes will follow and that it is not necassery to update the desktop icon system right away\&.
-.RE
-.PP
-\fB\-\-novendor\fR
-.RS 4
-Normally, xdg\-icon\-resource checks to ensure that an icon file to be installed in the
-\fIapps\fR
-context has a proper 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\&.
-.RE
-.PP
-\fB\-\-theme\fR \fItheme\fR
-.RS 4
-Installs or removes the icon file as part of
-\fItheme\fR\&. If no theme is specified the icons will be installed as part of the default
-\fIhicolor\fR
-theme\&. Applications may install icons under multiple themes but should at least install icons for the default
-\fIhicolor\fR
-theme\&.
-.RE
-.PP
-\fB\-\-context\fR \fIcontext\fR
-.RS 4
-Specifies the context for the icon\&. Icons to be used in the application menu and as desktop icon should use
-\fIapps\fR
-as context which is the default context\&. Icons to be used as file icons should use
-\fImimetypes\fR
-as context\&. Other common contexts are
-\fIactions\fR,
-\fIdevices\fR,
-\fIemblems\fR,
-\fIfilesystems\fR
-and
-\fIstock\fR\&.
-.RE
-.PP
-\fB\-\-size\fR \fIsize\fR
-.RS 4
-Specifies the size of the icon\&. All icons must be square\&. Common sizes for icons in the apps context are: 16, 22, 32, 48, 64 and 128\&. Common sizes for icons in the mimetypes context are: 16, 22, 32, 48, 64 and 128
-.RE
-.PP
-\fB\-\-mode\fR \fImode\fR
-.RS 4
-\fImode\fR
-can be
-\fIuser\fR
-or
-\fIsystem\fR\&. In user mode the file is (un)installed for the current user only\&. In system mode the file is (un)installed for all users on the system\&. Usually only root is allowed to install in system mode\&.
-.sp
-The default is to use system mode when called by root and to use user mode when called by a non\-root user\&.
-.RE
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "ENVIRONMENT VARIABLES"
-.PP
-xdg\-icon\-resource honours the following environment variables:
-.PP
-XDG_UTILS_DEBUG_LEVEL
-.RS 4
-Setting this environment variable to a non\-zero numerical value makes xdg\-icon\-resource do more verbose reporting on stderr\&. Setting a higher value increases the verbosity\&.
-.RE
-.PP
-XDG_UTILS_INSTALL_MODE
-.RS 4
-This environment variable can be used by the user or administrator to override the installation mode\&. Valid values are
-\fIuser\fR
-and
-\fIsystem\fR\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.PP
-\fB5\fR
-.RS 4
-No permission to read one of the files passed on the command line\&.
-.RE
-.SH "SEE ALSO"
-.PP
-\fBxdg-desktop-icon\fR(1),
-\fBxdg-desktop-menu\fR(1),
-\fBxdg-mime\fR(1)
-.SH "EXAMPLES"
-.PP
-To install an icon resource to depict a launcher for the application myfoobar, the company ShinyThings Inc\&. can use:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-icon\-resource install \-\-size 64 shinythings\-myfoobar\&.png
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-To install an icon for a new application/x\-foobar file type one can use:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-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
-.if n \{\
-.RE
-.\}
-.sp
-This will install two icons with the name application\-x\-foobar but with different sizes\&.
-.SH "AUTHORS"
-.PP
-\fBKevin Krammer\fR
-.RS 4
-Author.
-.RE
-.PP
-\fBJeremy White\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-mime.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-mime.1
deleted file mode 100644
index 50811e46db7..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-mime.1
+++ /dev/null
@@ -1,286 +0,0 @@
-'\" t
-.\" Title: xdg-mime
-.\" Author: Kevin Krammer
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-mime Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-MIME" "1" "12/31/2010" "xdg-utils 1.0" "xdg-mime Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-mime \- command line tool for querying information about file type handling and adding descriptions for new file types
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-mime\fR\ 'u
-\fBxdg\-mime\fR query {filetype | default} \&.\&.\&.
-.HP \w'\fBxdg\-mime\fR\ 'u
-\fBxdg\-mime\fR default \fIapplication\fR \fImimetype(s)\fR
-.HP \w'\fBxdg\-mime\fR\ 'u
-\fBxdg\-mime\fR install [\fB\-\-mode\ \fR\fB\fImode\fR\fR] [\fB\-\-novendor\fR] \fImimetypes\-file\fR
-.HP \w'\fBxdg\-mime\fR\ 'u
-\fBxdg\-mime\fR uninstall [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fImimetypes\-file\fR
-.HP \w'\fBxdg\-mime\fR\ 'u
-\fBxdg\-mime\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-The xdg\-mime program can be used to query information about file types and to add descriptions for new file types\&.
-.SH "COMMANDS"
-.PP
-query
-.RS 4
-Returns information related to file types\&.
-.sp
-The
-\fIquery\fR
-option is for use inside a desktop session only\&. It is not recommended to use xdg\-mime query as root\&.
-.sp
-The following queries are supported:
-.sp
-query filetype
-\fIFILE\fR: Returns the file type of
-\fIFILE\fR
-in the form of a MIME type\&.
-.sp
-query default
-\fImimetype\fR: Returns the default application that the desktop environment uses for opening files of type
-\fImimetype\fR\&. The default application is identified by its *\&.desktop file\&.
-.RE
-.PP
-default
-.RS 4
-Ask the desktop environment to make
-\fIapplication\fR
-the default application for opening files of type
-\fImimetype\fR\&. An application can be made the default for several file types by specifying multiple mimetypes\&.
-.sp
-
-\fIapplication\fR
-is the desktop file id of the application and has the form vendor\-name\&.desktop
-\fIapplication\fR
-must already be installed in the desktop menu before it can be made the default handler\&. The aplication\*(Aqs desktop file must list support for all the MIME types that it wishes to be the default handler for\&.
-.sp
-Requests to make an application a default handler may be subject to system policy or approval by the end\-user\&. xdg\-mime query can be used to verify whether an application is the actual default handler for a specific file type\&.
-.sp
-The
-\fIdefault\fR
-option is for use inside a desktop session only\&. It is not recommended to use xdg\-mime default as root\&.
-.RE
-.PP
-install
-.RS 4
-Adds the file type descriptions provided in
-\fImimetypes\-file\fR
-to the desktop environment\&.
-\fImimetypes\-file\fR
-must be a XML file that follows the freedesktop\&.org Shared MIME\-info Database specification and that has a mime\-info element as its document root\&. For each new file type one or more icons with name
-\fItype\fR\-\fIsubtype\fR
-must be installed with the
-\fBxdg\-icon\-resource\fR
-command in the
-\fImimetypes\fR
-context\&. For example the filetype application/vnd\&.oasis\&.opendocument\&.text requires an icon named application\-vnd\&.oasis\&.opendocument\&.text to be installed (unless the file type recommends another icon name)\&.
-.RE
-.PP
-uninstall
-.RS 4
-Removes the file type descriptions provided in
-\fImimetypes\-file\fR
-and previously added with
-\fBxdg\-mime install\fR
-from the desktop environment\&.
-\fImimetypes\-file\fR
-must be a XML file that follows the freedesktop\&.org Shared MIME\-info Database specification and that has a mime\-info element as its document root\&.
-.RE
-.SH "OPTIONS"
-.PP
-\fB\-\-mode\fR \fImode\fR
-.RS 4
-\fImode\fR
-can be
-\fIuser\fR
-or
-\fIsystem\fR\&. In user mode the file is (un)installed for the current user only\&. In system mode the file is (un)installed for all users on the system\&. Usually only root is allowed to install in system mode\&.
-.sp
-The default is to use system mode when called by root and to use user mode when called by a non\-root user\&.
-.RE
-.PP
-\fB\-\-novendor\fR
-.RS 4
-Normally, xdg\-mime checks to ensure that the
-\fImimetypes\-file\fR
-to be installed has a proper 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\&.
-.RE
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "ENVIRONMENT VARIABLES"
-.PP
-xdg\-mime honours the following environment variables:
-.PP
-XDG_UTILS_DEBUG_LEVEL
-.RS 4
-Setting this environment variable to a non\-zero numerical value makes xdg\-mime do more verbose reporting on stderr\&. Setting a higher value increases the verbosity\&.
-.RE
-.PP
-XDG_UTILS_INSTALL_MODE
-.RS 4
-This environment variable can be used by the user or administrator to override the installation mode\&. Valid values are
-\fIuser\fR
-and
-\fIsystem\fR\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.PP
-\fB5\fR
-.RS 4
-No permission to read one of the files passed on the command line\&.
-.RE
-.SH "SEE ALSO"
-.PP
-\fBxdg-icon-resource\fR(1),
-\fBxdg-desktop-menu\fR(1)
-.SH "EXAMPLES"
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-mime query filetype /tmp/foobar\&.png
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Prints the MIME type of the file /tmp/foobar\&.png, in this case image/png
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-mime query default image/png
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Prints the \&.desktop filename of the application which is registered to open PNG files\&.
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-mime install shinythings\-shiny\&.xml
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Adds a file type description for "shiny"\-files\&. "shinythings\-" is used as the vendor prefix\&. The file type description could look as folows\&.
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-shinythings\-shiny\&.xml:
-
-<?xml version="1\&.0"?>
-<mime\-info xmlns=\*(Aqhttp://www\&.freedesktop\&.org/standards/shared\-mime\-info\*(Aq>
- <mime\-type type="text/x\-shiny">
- <comment>Shiny new file type</comment>
- <glob pattern="*\&.shiny"/>
- <glob pattern="*\&.shi"/>
- </mime\-type>
-</mime\-info>
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-An icon for this new file type must also be installed, for example with:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 shiny\-file\-icon\&.png text\-x\-shiny
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-.SH "AUTHORS"
-.PP
-\fBKevin Krammer\fR
-.RS 4
-Author.
-.RE
-.PP
-\fBJeremy White\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-open.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-open.1
deleted file mode 100644
index 984c58c891e..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-open.1
+++ /dev/null
@@ -1,124 +0,0 @@
-'\" t
-.\" Title: xdg-open
-.\" Author: Kevin Krammer
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-open Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-OPEN" "1" "12/31/2010" "xdg-utils 1.0" "xdg-open Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-open \- opens a file or URL in the user\*(Aqs preferred application
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-open\fR\ 'u
-\fBxdg\-open\fR {\fB\fIfile\fR\fR | \fB\fIURL\fR\fR}
-.HP \w'\fBxdg\-open\fR\ 'u
-\fBxdg\-open\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-xdg\-open opens a file or URL in the user\*(Aqs preferred application\&. If a URL is provided the URL will be opened in the user\*(Aqs 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\&.
-.PP
-xdg\-open is for use inside a desktop session only\&. It is not recommended to use xdg\-open as root\&.
-.SH "OPTIONS"
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.SH "EXAMPLES"
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-open \*(Aqhttp://www\&.freedesktop\&.org/\*(Aq
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Opens the Freedesktop\&.org website in the user\*(Aqs default browser
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-open /tmp/foobar\&.png
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Opens the PNG image file /tmp/foobar\&.png in the user\*(Aqs default image viewing application\&.
-.SH "AUTHORS"
-.PP
-\fBKevin Krammer\fR
-.RS 4
-Author.
-.RE
-.PP
-\fBJeremy White\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-screensaver.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-screensaver.1
deleted file mode 100644
index dc684097b80..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-screensaver.1
+++ /dev/null
@@ -1,154 +0,0 @@
-'\" t
-.\" Title: xdg-screensaver
-.\" Author: Bryce Harrington
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 12/31/2010
-.\" Manual: xdg-screensaver Manual
-.\" Source: xdg-utils 1.0
-.\" Language: English
-.\"
-.TH "XDG\-SCREENSAVER" "1" "12/31/2010" "xdg-utils 1.0" "xdg-screensaver Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-screensaver \- command line tool for controlling the screensaver
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-screensaver\fR\ 'u
-\fBxdg\-screensaver\fR \fBsuspend\ \fR\fB\fIWindowID\fR\fR
-.HP \w'\fBxdg\-screensaver\fR\ 'u
-\fBxdg\-screensaver\fR \fBresume\ \fR\fB\fIWindowID\fR\fR
-.HP \w'\fBxdg\-screensaver\fR\ 'u
-\fBxdg\-screensaver\fR {\fBactivate\fR | \fBlock\fR | \fBreset\fR | \fBstatus\fR}
-.HP \w'\fBxdg\-screensaver\fR\ 'u
-\fBxdg\-screensaver\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-xdg\-screensaver provides commands to control the screensaver\&.
-.PP
-xdg\-screensaver is for use inside a desktop session only\&. It is not recommended to use xdg\-screensaver as root\&.
-.SH "COMMANDS"
-.PP
-\fBsuspend \fR\fB\fIWindowID\fR\fR
-.RS 4
-Suspends the screensaver and monitor power management\&.
-\fIWindowID\fR
-must be the X Window ID of an existing window of the calling application\&. The window must remain in existance for the duration of the suspension\&.
-.sp
-WindowID can be represented as either a decimal number or as a hexadecimal number consisting of the prefix
-\fI0x\fR
-followed by one or more hexadecimal digits\&.
-.sp
-The screensaver can be suspended in relation to multiple windows at the same time\&. In that case screensaver operation is only restored once the screensaver has been resumed in relation to each of the windows
-.RE
-.PP
-\fBresume \fR\fB\fIWindowID\fR\fR
-.RS 4
-Resume the screensaver and monitor power management after being suspended\&.
-\fIWindowID\fR
-must be the same X Window ID that was passed to a previous call of
-\fBxdg\-screensaver suspend\fR
-.RE
-.PP
-\fBactivate\fR
-.RS 4
-Turns the screensaver on immediately\&. This may result in the screen getting locked, depending on existing system policies\&.
-.RE
-.PP
-\fBlock\fR
-.RS 4
-Lock the screen immediately\&.
-.RE
-.PP
-\fBreset\fR
-.RS 4
-Turns the screensaver off immediately\&. If the screen was locked the user may be asked to authenticate first\&.
-.RE
-.PP
-\fBstatus\fR
-.RS 4
-Prints
-\fIenabled\fR
-to stdout if the screensaver is enabled to turn on after a period of inactivity and prints
-\fIdisabled\fR
-if the screensaver is not enabled\&.
-.RE
-.SH "OPTIONS"
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.SH "EXAMPLES"
-.PP
-
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-xdg\-screensaver suspend 0x1c00007
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-Causes the screensaver to be disabled till
-\fBxdg\-screensaver resume 0x1c00007\fR
-is called\&.
-\fI0x1c00007\fR
-must be the X Window ID of an existing window\&.
-.SH "AUTHOR"
-.PP
-\fBBryce Harrington\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2006
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/man/xdg-settings.1 b/chromium/third_party/xdg-utils/scripts/man/xdg-settings.1
deleted file mode 100644
index d02fa2ba139..00000000000
--- a/chromium/third_party/xdg-utils/scripts/man/xdg-settings.1
+++ /dev/null
@@ -1,154 +0,0 @@
-'\" t
-.\" Title: xdg-settings
-.\" Author: Mike Mammarella
-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 07/20/2011
-.\" Manual: xdg-settings Manual
-.\" Source: [FIXME: source]
-.\" Language: English
-.\"
-.TH "XDG\-SETTINGS" "1" "07/20/2011" "[FIXME: source]" "xdg-settings Manual"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-xdg-settings \- get various settings from the desktop environment
-.SH "SYNOPSIS"
-.HP \w'\fBxdg\-settings\fR\ 'u
-\fBxdg\-settings\fR {\fB\fIget\fR\fR | \fB\fIcheck\fR\fR | \fB\fIset\fR\fR} {\fBproperty\fR} [\fBsubproperty\fR] [\fBvalue\fR]
-.HP \w'\fBxdg\-settings\fR\ 'u
-\fBxdg\-settings\fR {\fB\-\-help\fR | \fB\-\-list\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
-.SH "DESCRIPTION"
-.PP
-xdg\-settings gets various settings from the desktop environment\&. For instance, desktop environments often provide proxy configuration and default web browser settings\&. Using xdg\-settings these parameters can be extracted for use by applications that do not use the desktop environment\*(Aqs libraries (which would use the settings natively)\&.
-.PP
-xdg\-settings is for use inside a desktop session only\&. It is not recommended to use xdg\-settings as root\&.
-.SH "OPTIONS"
-.PP
-\fB\-\-help\fR
-.RS 4
-Show command synopsis\&.
-.RE
-.PP
-\fB\-\-list\fR
-.RS 4
-List all properties xdg\-settings knows about\&.
-.RE
-.PP
-\fB\-\-manual\fR
-.RS 4
-Show this manualpage\&.
-.RE
-.PP
-\fB\-\-version\fR
-.RS 4
-Show the xdg\-utils version information\&.
-.RE
-.SH "PROPERTIES"
-.PP
-When using xdg\-settings to get, check or set a destkop setting, properties and possibly sub\-properties are used to specify the setting to be changed\&.
-.PP
-Some properties (such as default\-web\-browser) fully describe the setting to be changed\&. Other properties (such as default\-url\-scheme\-handler) require more information (in this case the actual scheme to set the default handler for) which must be provided in a sub\-property\&.
-.SH "EXIT CODES"
-.PP
-An exit code of 0 indicates success while a non\-zero exit code indicates failure\&. The following failure codes can be returned:
-.PP
-\fB1\fR
-.RS 4
-Error in command line syntax\&.
-.RE
-.PP
-\fB2\fR
-.RS 4
-One of the files passed on the command line did not exist\&.
-.RE
-.PP
-\fB3\fR
-.RS 4
-A required tool could not be found\&.
-.RE
-.PP
-\fB4\fR
-.RS 4
-The action failed\&.
-.RE
-.SH "EXAMPLES"
-.PP
-Get the desktop file name of the current default web browser
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
- xdg\-settings get default\-web\-browser
-
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Check whether the default web browser is firefox\&.desktop, which can be false even if "get default\-web\-browser" says that is the current value (if only some of the underlying settings actually reflect that value)
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
- xdg\-settings check default\-web\-browser firefox\&.desktop
-
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Set the default web browser to google\-chrome\&.desktop
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
- xdg\-settings set default\-web\-browser google\-chrome\&.desktop
-
-.fi
-.if n \{\
-.RE
-.\}
-.PP
-Set the default mailto URL scheme handler to be evolution\&.desktop
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
- xdg\-settings set default\-url\-scheme\-handler mailto evolution\&.desktop
-
-.fi
-.if n \{\
-.RE
-.\}
-.sp
-.SH "AUTHOR"
-.PP
-\fBMike Mammarella\fR
-.RS 4
-Author.
-.RE
-.SH "COPYRIGHT"
-.br
-Copyright \(co 2009-2011
-.br
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-copy b/chromium/third_party/xdg-utils/scripts/xdg-copy
deleted file mode 100755
index 10b87177810..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-copy
+++ /dev/null
@@ -1,303 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-copy
-#
-# Utility script to copy files specified by URLs, including
-# downloading and uploading from/to remote sites.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
- xdg-copy -- command line tool for copying files between desktop URIs
-
-Synopsis
-
- xdg-copy source destination
-
- xdg-copy { --help | --manual | --version }
-
-Description
-
- xdg-copy copies source to destination and provides visual feedback to the
- user during the operation. Both source and destination 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.
-
- xdg-copy is for use inside a desktop session only. It is not recommended
- to use xdg-copy as root.
-
-Options
-
- --help
- Show command synopsis.
-
- --manual
- Show this manualpage.
-
- --version
- Show the xdg-utils version information.
-
-Exit Codes
-
- An exit code of 0 indicates success while a non-zero exit code indicates
- failure. The following failure codes can be returned:
-
- 1
- Error in command line syntax.
-
- 2
- One of the files passed on the command line did not exist.
-
- 3
- A required tool could not be found.
-
- 4
- The action failed.
-
-Examples
-
- xdg-copy "http://portland.freedesktop.org/png/freedesktop-logo.png" .
-
- xdg-copy "/tmp/foobar.png" "/home/user/foobar-copy.png"
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
- xdg-copy -- command line tool for copying files between desktop URIs
-
-Synopsis
-
- xdg-copy source destination
-
- xdg-copy { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-copy: $@" >&2
- echo "Try 'xdg-copy --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-copy' or 'xdg-copy --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-copy: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-copy: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-copy: $@" >&2
- fi
-
- exit 4
-}
-
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- --help)
- usage
- echo "Use 'man xdg-copy' or 'xdg-copy --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-copy 1.0beta1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- fi
-}
-
-#----------------------------------------------------------------------------
-
-
-
-copy_kde()
-{
- kfmclient copy "$1" "$2"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-copy_gnome()
-{
- if gvfs-copy --help 2>/dev/null 1>&2; then
- gvfs-copy "$1" "$2"
- else
- gnomevfs-copy "$1" "$2"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-source=
-dest=
-while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$dest" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- if [ -n "$source" ] ; then
- dest=$parm
- else
- source=$parm
- fi
- ;;
- esac
-done
-
-if [ -z "${source}" ] ; then
- exit_failure_syntax "source argument missing"
-fi
-if [ -z "${dest}" ] ; then
- exit_failure_syntax "destination argument missing"
-fi
-
-detectDE
-
-case "$DE" in
- kde)
- copy_kde "$source" "$dest"
- ;;
-
- gnome)
- copy_gnome "$source" "$dest"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for copying '$source' to '$dest'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-copy.in b/chromium/third_party/xdg-utils/scripts/xdg-copy.in
deleted file mode 100644
index 6838cd63490..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-copy.in
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-copy
-#
-# Utility script to copy files specified by URLs, including
-# downloading and uploading from/to remote sites.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-copy_kde()
-{
- kfmclient copy "$1" "$2"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-copy_gnome()
-{
- if gvfs-copy --help 2>/dev/null 1>&2; then
- gvfs-copy "$1" "$2"
- else
- gnomevfs-copy "$1" "$2"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-source=
-dest=
-while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$dest" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- if [ -n "$source" ] ; then
- dest=$parm
- else
- source=$parm
- fi
- ;;
- esac
-done
-
-if [ -z "${source}" ] ; then
- exit_failure_syntax "source argument missing"
-fi
-if [ -z "${dest}" ] ; then
- exit_failure_syntax "destination argument missing"
-fi
-
-detectDE
-
-case "$DE" in
- kde)
- copy_kde "$source" "$dest"
- ;;
-
- gnome*)
- copy_gnome "$source" "$dest"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for copying '$source' to '$dest'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-desktop-icon b/chromium/third_party/xdg-utils/scripts/xdg-desktop-icon
deleted file mode 100755
index fd71f31af17..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-desktop-icon
+++ /dev/null
@@ -1,670 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-desktop-icon
-#
-# Utility script to install desktop items on a Linux desktop.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-usage()
-{
-cat << _USAGE
-xdg-desktop-icon - command line tool for (un)installing icons to the desktop
-
-Synopsis
-
-xdg-desktop-icon install [--novendor] FILE
-
-xdg-desktop-icon uninstall FILE
-
-xdg-desktop-icon { --help | --manual | --version }
-
-_USAGE
-}
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-desktop-icon - command line tool for (un)installing icons to the desktop
-
-Synopsis
-
-xdg-desktop-icon install [--novendor] FILE
-
-xdg-desktop-icon uninstall FILE
-
-xdg-desktop-icon { --help | --manual | --version }
-
-Description
-
-The xdg-desktop-icon program can be used to install an application launcher or
-other file on the desktop of the current user.
-
-An application launcher is represented by a *.desktop file. Desktop files are
-defined by the freedesktop.org Desktop Entry Specification. The most important
-aspects of *.desktop files are summarized below.
-
-Commands
-
-install
- Installs FILE to the desktop of the current user. FILE can be a *.desktop
- file or any other type of file.
-uninstall
- Removes FILE from the desktop of the current user.
-
-Options
-
---novendor
-
- Normally, xdg-desktop-icon checks to ensure that a *.desktop file to be
- installed has a vendor prefix. This option can be used to disable that
- check.
-
- 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.
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Desktop Files
-
-An application launcher can be added to the desktop by installing a *.desktop
-file. A *.desktop file consists of a [Desktop Entry] header followed by several
-Key=Value lines.
-
-A *.desktop file can provide a name and description for an application in
-several different languages. This is done by adding a language code as used by
-LC_MESSAGES in square brackets behind the Key. This way one can specify
-different values for the same Key depending on the currently selected language.
-
-The following keys are often used:
-
-Value=1.0
- This is a mandatory field to indicate that the *.desktop file follows the
- 1.0 version of the specification.
-Type=Application
- This is a mandatory field that indicates that the *.desktop file describes
- an application launcher.
-Name=Application Name
- The name of the application. For example Mozilla
-GenericName=Generic Name
- A generic description of the application. For example Web Browser
-Comment=Comment
- Optional field to specify a tooltip for the application. For example Visit
- websites on the Internet
-Icon=Icon File
- The icon to use for the application. This can either be an absolute path to
- an image file or an icon-name. If an icon-name is provided an image lookup
- by name is done in the user's current icon theme. The xdg-icon-resource
- command can be used to install image files into icon themes. The advantage
- of using an icon-name instead of an absolute path is that with an icon-name
- the application icon can be provided in several different sizes as well as
- in several differently themed styles.
-Exec=Command Line
- 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.
-
-For a complete oveview of the *.desktop file format please visit http://
-www.freedesktop.org/wiki/Standards/desktop-entry-spec
-
-Environment Variables
-
-xdg-desktop-icon honours the following environment variables:
-
-XDG_UTILS_DEBUG_LEVEL
- Setting this environment variable to a non-zero numerical value makes
- xdg-desktop-icon do more verbose reporting on stderr. Setting a higher
- value increases the verbosity.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-5
- No permission to read one of the files passed on the command line.
-
-See Also
-
-xdg-icon-resource(1)
-
-Examples
-
-The company ShinyThings Inc. has developed an application named "WebMirror" and
-would like to add a launcher for for on the desktop. The company will use
-"shinythings" as its vendor id. In order to add the application to the desktop
-there needs to be a .desktop file for the application:
-
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
-Now the xdg-desktop-icon tool can be used to add the webmirror.desktop file to
-the desktop:
-
-xdg-desktop-icon install ./shinythings-webmirror.desktop
-
-To add a README file to the desktop as well, the following command can be used:
-
-xdg-desktop-icon install ./shinythings-README
-
-_MANUALPAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-icon: $@" >&2
- echo "Try 'xdg-desktop-icon --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-desktop-icon' or 'xdg-desktop-icon --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-icon: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-icon: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-icon: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-icon: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-icon: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-desktop-icon: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-desktop-icon --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-desktop-icon' or 'xdg-desktop-icon --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-desktop-icon 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-action=
-desktop_file=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$desktop_file" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- if [ "$action" = "install" ] ; then
- check_input_file "$parm"
- fi
- desktop_file=$parm
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-if [ -z "$desktop_file" ] ; then
- exit_failure_syntax "FILE argument missing"
-fi
-
-filetype=
-case "$desktop_file" in
- *.desktop)
- filetype=desktop
- if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$desktop_file"
- fi
- ;;
- *)
- filetype=other
- ;;
-esac
-
-my_umask=077
-desktop_dir="$HOME/Desktop"
-if xdg-user-dir 2>/dev/null 1>&2; then
- desktop_dir=`xdg-user-dir DESKTOP`
-fi
-desktop_dir_kde=`kde${KDE_SESSION_VERSION}-config --userpath desktop 2> /dev/null`
-if gconftool-2 -g /apps/nautilus/preferences/desktop_is_home_dir 2> /dev/null | grep true > /dev/null; then
- desktop_dir_gnome="$HOME"
- # Don't create $HOME/Desktop if it doesn't exist
- [ -w "$desktop_dir" ] || desktop_dir=
-fi
-if [ -n "$desktop_dir_kde" ]; then
- if [ ! -d "$desktop_dir_kde" ]; then
- save_umask=`umask`
- umask $my_umask
- mkdir -p "$desktop_dir_kde"
- umask $save_umask
- fi
- # Is the KDE desktop dir != $HOME/Desktop ?
- if [ "x`readlink -f "$desktop_dir"`" != "x`readlink -f "$desktop_dir_kde"`" ]; then
- # If so, don't create $HOME/Desktop if it doesn't exist
- [ -w "$desktop_dir" ] || desktop_dir=
- else
- desktop_dir_kde=
- fi
-fi
-
-basefile=`basename "$desktop_file"`
-
-DEBUG 1 "$action $desktop_file in $desktop_dir $desktop_dir_kde $desktop_dir_gnome"
-
-case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in "$desktop_dir" "$desktop_dir_kde" "$desktop_dir_gnome" ; do
- if [ -n "$x" ]; then
- mkdir -p "$x"
- eval 'cp "$desktop_file" "$x/$basefile"'$xdg_redirect_output
- chmod u+x "$x/$basefile"
- fi
- done
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in "$desktop_dir" "$desktop_dir_kde" "$desktop_dir_gnome" ; do
- if [ -n "$x" ]; then
- rm -f "$x/$basefile"
- fi
- done
-
- ;;
-esac
-
-exit_success
-
-
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-desktop-icon.in b/chromium/third_party/xdg-utils/scripts/xdg-desktop-icon.in
deleted file mode 100644
index c7551742db9..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-desktop-icon.in
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-desktop-icon
-#
-# Utility script to install desktop items on a Linux desktop.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-#@xdg-utils-common@
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-action=
-desktop_file=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$desktop_file" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- if [ "$action" = "install" ] ; then
- check_input_file "$parm"
- fi
- desktop_file=$parm
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-if [ -z "$desktop_file" ] ; then
- exit_failure_syntax "FILE argument missing"
-fi
-
-filetype=
-case "$desktop_file" in
- *.desktop)
- filetype=desktop
- if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$desktop_file"
- fi
- ;;
- *)
- filetype=other
- ;;
-esac
-
-my_umask=077
-desktop_dir="$HOME/Desktop"
-if xdg-user-dir 2>/dev/null 1>&2; then
- desktop_dir=`xdg-user-dir DESKTOP`
-fi
-desktop_dir_kde=`kde${KDE_SESSION_VERSION}-config --userpath desktop 2> /dev/null`
-if gconftool-2 -g /apps/nautilus/preferences/desktop_is_home_dir 2> /dev/null | grep true > /dev/null; then
- desktop_dir_gnome="$HOME"
- # Don't create $HOME/Desktop if it doesn't exist
- [ -w "$desktop_dir" ] || desktop_dir=
-fi
-if [ -n "$desktop_dir_kde" ]; then
- if [ ! -d "$desktop_dir_kde" ]; then
- save_umask=`umask`
- umask $my_umask
- mkdir -p "$desktop_dir_kde"
- umask $save_umask
- fi
- # Is the KDE desktop dir != $HOME/Desktop ?
- if [ "x`readlink -f "$desktop_dir"`" != "x`readlink -f "$desktop_dir_kde"`" ]; then
- # If so, don't create $HOME/Desktop if it doesn't exist
- [ -w "$desktop_dir" ] || desktop_dir=
- else
- desktop_dir_kde=
- fi
-fi
-
-basefile=`basename "$desktop_file"`
-
-DEBUG 1 "$action $desktop_file in $desktop_dir $desktop_dir_kde $desktop_dir_gnome"
-
-case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in "$desktop_dir" "$desktop_dir_kde" "$desktop_dir_gnome" ; do
- if [ -n "$x" ]; then
- mkdir -p "$x"
- eval 'cp "$desktop_file" "$x/$basefile"'$xdg_redirect_output
- chmod u+x "$x/$basefile"
- fi
- done
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in "$desktop_dir" "$desktop_dir_kde" "$desktop_dir_gnome" ; do
- if [ -n "$x" ]; then
- rm -f "$x/$basefile"
- fi
- done
-
- ;;
-esac
-
-exit_success
-
-
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-desktop-menu b/chromium/third_party/xdg-utils/scripts/xdg-desktop-menu
deleted file mode 100755
index c65af2b5b2c..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-desktop-menu
+++ /dev/null
@@ -1,1335 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-desktop-menu
-#
-# Utility script to install menu items on a Linux desktop.
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-desktop-menu - command line tool for (un)installing desktop menu items
-
-Synopsis
-
-xdg-desktop-menu install [--noupdate] [--novendor] [--mode mode] directory-file
-(s) desktop-file(s)
-
-xdg-desktop-menu uninstall [--noupdate] [--mode mode] directory-file(s)
-desktop-file(s)
-
-xdg-desktop-menu forceupdate [--mode mode]
-
-xdg-desktop-menu { --help | --manual | --version }
-
-Description
-
-The xdg-desktop-menu program can be used to install new menu entries to the
-desktop's application menu.
-
-The application menu works according to the XDG Desktop Menu Specification at
-http://www.freedesktop.org/Standards/menu-spec
-
-Commands
-
-install
-
- Install one or more applications in a submenu of the desktop menu system.
-
- desktop-file: A desktop file represents a single menu entry in the menu.
- Desktop files are defined by the freedesktop.org Desktop Entry
- Specification. The most important aspects of *.desktop files are summarized
- below.
-
- Menu entries can be added to the menu system in two different ways. They
- can either be added to a predefined submenu in the menu system based on one
- or more category keywords, or they can be added to a new submenu.
-
- To add a menu entry to a predefined submenu the desktop file that
- represents the menu entry must have a Categories= entry that lists one or
- more keywords. The menu item will be included in an appropriate submenu
- based on the included keywords.
-
- To add menu items to a new submenu the desktop-files must be preceded by a
- directory-file that describes the submenu. If multiple desktop-files are
- specified, all entries will be added to the same menu. If entries are
- installed to a menu that has been created with a previous call to
- xdg-desktop-menu the entries will be installed in addition to any already
- existing entries.
-
- directory-file: The *.directory file indicated by directory-file 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.
-
- 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.
-
- Directory files follow the syntax defined by the freedesktop.org Desktop
- Entry Specification.
-
-uninstall
-
- Remove applications or submenus from the desktop menu system previously
- installed with xdg-desktop-menu install.
-
- A submenu and the associated directory file is only removed when the
- submenu no longer contains any menu entries.
-
-forceupdate
-
- Force an update of the menu system.
-
- This command is only useful if the last call to xdg-desktop-menu included
- the --noupdate option.
-
-Options
-
---noupdate
- 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.
---novendor
-
- 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.
-
- 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.
-
---mode mode
-
- mode can be user or system. In user mode the file is (un)installed for the
- current user only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in system mode.
-
- The default is to use system mode when called by root and to use user mode
- when called by a non-root user.
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Desktop Files
-
-An application item in the application menu is represented by a *.desktop file.
-A *.desktop file consists of a [Desktop Entry] header followed by several Key=
-Value lines.
-
-A *.desktop file can provide a name and description for an application in
-several different languages. This is done by adding a language code as used by
-LC_MESSAGES in square brackets behind the Key. This way one can specify
-different values for the same Key depending on the currently selected language.
-
-The following keys are often used:
-
-Value=1.0
- This is a mandatory field to indicate that the *.desktop file follows the
- 1.0 version of the specification.
-Type=Application
- This is a mandatory field that indicates that the *.desktop file describes
- an application launcher.
-Name=Application Name
- The name of the application. For example Mozilla
-GenericName=Generic Name
- A generic description of the application. For example Web Browser
-Comment=Comment
- Optional field to specify a tooltip for the application. For example Visit
- websites on the Internet
-Icon=Icon File
- The icon to use for the application. This can either be an absolute path to
- an image file or an icon-name. If an icon-name is provided an image lookup
- by name is done in the user's current icon theme. The xdg-icon-resource
- command can be used to install image files into icon themes. The advantage
- of using an icon-name instead of an absolute path is that with an icon-name
- the application icon can be provided in several different sizes as well as
- in several differently themed styles.
-Exec=Command Line
- 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.
-Categories=Categories
-
- 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. When menu entries are
- explicitly assigned to a new submenu it is not necassery to list any
- categories.
-
- When using categories it is recommended to include one of the following
- categories: AudioVideo, Development, Education, Game, Graphics, Network,
- Office, Settings, System, Utility.
-
- See Appendix A of the XDG Desktop Menu Specification for information about
- additional categories. http://standards.freedesktop.org/menu-spec/
- menu-spec-1.0.html
-
-MimeType=Mimetypes
- A list of mimetypes separated by semi-colons. This field is used to
- indicate which file types the application is able to open.
-
-For a complete oveview of the *.desktop file format please visit http://
-www.freedesktop.org/wiki/Standards/desktop-entry-spec
-
-Directory Files
-
-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 [Desktop Entry] header followed by several Key=
-Value lines.
-
-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 Key. This way one can specify
-different values for the same Key depending on the currently selected language.
-
-The following keys are relevqnt for submenus:
-
-Value=1.0
- This is a mandatory field to indicate that the *.directory file follows the
- 1.0 version of the Desktop Entry specification.
-Type=Directory
- This is a mandatory field that indicates that the *.directory file
- describes a submenu.
-Name=Menu Name
- The title of submenu. For example Mozilla
-Comment=Comment
- Optional field to specify a tooltip for the submenu.
-Icon=Icon File
- 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 xdg-icon-resource
- 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.
-
-Environment Variables
-
-xdg-desktop-menu honours the following environment variables:
-
-XDG_UTILS_DEBUG_LEVEL
- Setting this environment variable to a non-zero numerical value makes
- xdg-desktop-menu do more verbose reporting on stderr. Setting a higher
- value increases the verbosity.
-XDG_UTILS_INSTALL_MODE
- This environment variable can be used by the user or administrator to
- override the installation mode. Valid values are user and system.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-5
- No permission to read one of the files passed on the command line.
-
-See Also
-
-xdg-desktop-icon(1), xdg-icon-resource(1), xdg-mime(1)
-
-Examples
-
-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 Categories entry:
-
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
- Categories=Network;WebDevelopment;
-
-Now the xdg-desktop-menu tool can be used to add the
-shinythings-webmirror.desktop file to the desktop application menu:
-
-xdg-desktop-menu install ./shinythings-webmirror.desktop
-
-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.
-
-In the next 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.
-
-First the company needs to create two .desktop files that describe the two menu
-items. Since the items are to be added to a new submenu it is not necassery to
-include a Categories= line:
-
-shinythings-webmirror.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror
- Icon=shinythings-webmirror
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
-
-shinythings-webmirror-admin.desktop:
-
- [Desktop Entry]
- Encoding=UTF-8
- Type=Application
-
- Exec=webmirror-admintool
- Icon=shinythings-webmirror-admintool
-
- Name=WebMirror Admin Tool
- Name[nl]=WebSpiegel Administratie Tool
-
-In addition a .directory file needs to be created to provide a title and icon
-for the sub-menu itself:
-
-shinythings-webmirror.directory:
-
- [Desktop Entry]
- Encoding=UTF-8
-
- Icon=shinythings-webmirror-menu
-
- Name=WebMirror
- Name[nl]=WebSpiegel
-
-These file can now be installed with:
-
-xdg-desktop-menu install ./shinythings-webmirror.directory \
- ./shinythings-webmirror.desktop ./shinythings-webmirror-admin.desktop
-
-The menu entries could also be installed one by one:
-
-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
-
-Although the result is the same it is slightly more efficient to install all
-files at the same time.
-
-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:
-
-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
-}
-
-usage()
-{
-cat << _USAGE
-xdg-desktop-menu - command line tool for (un)installing desktop menu items
-
-Synopsis
-
-xdg-desktop-menu install [--noupdate] [--novendor] [--mode mode] directory-file
-(s) desktop-file(s)
-
-xdg-desktop-menu uninstall [--noupdate] [--mode mode] directory-file(s)
-desktop-file(s)
-
-xdg-desktop-menu forceupdate [--mode mode]
-
-xdg-desktop-menu { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-menu: $@" >&2
- echo "Try 'xdg-desktop-menu --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-desktop-menu' or 'xdg-desktop-menu --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-menu: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-menu: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-menu: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-menu: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-desktop-menu: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-desktop-menu: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-desktop-menu --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-desktop-menu' or 'xdg-desktop-menu --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-desktop-menu 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-update_desktop_database()
-{
-# echo Update desktop database: $mode
- if [ "$mode" = "system" ] ; then
- for x in `echo $PATH | sed 's/:/ /g'` /opt/gnome/bin; do
- if [ -x $x/update-desktop-database ] ; then
- DEBUG 1 "Running $x/update-desktop-database"
- eval '$x/update-desktop-database'$xdg_redirect_output
- return
- fi
- done
- fi
-}
-
-# Make application $1/$2 the default for all the mimetypes it support,
-# iff such mimetype didn't had a default application already.
-# $1 Install dir for desktop file
-# $2 base name of desktop file
-make_lazy_default()
-{
- local mimetypes
- local xdg_user_dir
- local xdg_default_dirs
-
- DEBUG 1 "make_lazy_default $1/$2"
- mimetypes=`awk '
-{
- if (match($0,/MimeType=/)) {
- split(substr($0,RSTART+9),mimetypes,";")
- for (n in mimetypes)
- {
- if (mimetypes[n])
- print mimetypes[n]
- }
- }
-}' "$1/$2" 2> /dev/null`
-
- for MIME in $mimetypes ; do
- xdg_default_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_default_dirs" ] || xdg_default_dirs=/usr/local/share/:/usr/share/
- if [ x"$mode" = x"user" ] ; then
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
- xdg_default_dirs="$xdg_user_dir:$xdg_default_dirs"
- fi
- local default_app
- for x in `echo "$xdg_default_dirs" | sed 's/:/ /g'`; do
- DEBUG 2 "Checking $x/applications/defaults.list"
- default_app=`grep "$MIME=" $x/applications/defaults.list 2> /dev/null | cut -d '=' -f 2`
- if [ -n "$default_app" ] ; then
- DEBUG 2 "Found default apps for $MIME: $default_app"
- default_app="$default_app;"
- break;
- fi
- done
- DEBUG 2 "Current default apps for $MIME: $default_app"
- if echo "$default_app" | grep "$2" > /dev/null 2> /dev/null; then
- # App already listed as default
- continue;
- fi
- default_file="$(readlink -f "$1/defaults.list")"
- DEBUG 1 "Updating $default_file"
- grep -v "$MIME=" $default_file > ${default_file}.new 2> /dev/null
- if ! grep "[Default Applications]" ${default_file}.new > /dev/null; then
- echo "[Default Applications]" >> ${default_file}.new
- fi
- echo $MIME="$default_app$2" >> ${default_file}.new
- mv ${default_file}.new $default_file
- done
-}
-
-update_submenu()
-{
- DEBUG 1 "update_submenu $1"
- menu_file="$1"
-
- xdg_dir_name=menus
- xdg_user_dir="$XDG_CONFIG_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.config"
- xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
- xdg_system_dirs="$XDG_CONFIG_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg
- xdg_global_dir=
- for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
- done
- xdg_user_dir="$xdg_user_dir/applications-merged"
- xdg_global_dir="$xdg_global_dir/applications-merged"
-
- DEBUG 3 "Install locations for *.menu file:"
- DEBUG 3 "xdg_user_dir: $xdg_user_dir"
- DEBUG 3 "xdg_global_dir: $xdg_global_dir"
- DEBUG 3 "kde_user_dir: $kde_user_dir"
- DEBUG 3 "kde_global_dir: $kde_global_dir"
- DEBUG 3 "gnome_user_dir: $gnome_user_dir"
- DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
- if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
- my_chmod=0600
- else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- my_chmod=0644
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system menu directory found."
- fi
- fi
-
- if [ -z "$menu_file" ] ; then
- # Work around for SUSE/gnome 2.12 to pick up new ~/.local/share/applications
- save_umask=`umask`
- umask $my_umask
-
- mkdir -p $xdg_dir
- touch $xdg_dir/xdg-desktop-menu-dummy.menu
-
- umask $save_umask
- return
- fi
-
- if [ $action = "install" -a -f "/etc/xdg/menus/gnome-applications.menu" ] ; then
- # Work around for Debian Gnome
- gnome_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/gnome-applications-merged^'`
- if [ ! -e "$gnome_xdg_dir" ] ; then
- DEBUG 1 "Debian Workaround: Link '$xdg_dir' to '$gnome_xdg_dir'"
- mkdir -p `dirname "$gnome_xdg_dir"`
- eval 'ln -s "applications-merged" "$gnome_xdg_dir"'$xdg_redirect_output
- fi
- fi
- if [ $action = "install" -a -f "/etc/mandrake-release" ] ; then
- # Work around for Mandriva 2006
- mandrake_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/applications-mdk-merged^'`
- if [ ! -e "$mandrake_xdg_dir" ] ; then
- DEBUG 1 "Mandriva Workaround: Link '$xdg_dir' to '$mandrake_xdg_dir'"
- mkdir -p `dirname "$mandrake_xdg_dir"`
- eval 'ln -s "applications-merged" "$mandrake_xdg_dir"'$xdg_redirect_output
- fi
- fi
- if [ $action = "install" -a x"$mode" = x"user" -a -d "/etc/xdg/menus/kde-applications-merged" ] ; then
- # Work around for Fedora Core 5 + patched KDE
- kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
- if [ ! -e "$kde_xdg_dir" ] ; then
- DEBUG 1 "Fedora Workaround: Link '$xdg_dir' to '$kde_xdg_dir'"
- mkdir -p `dirname "$kde_xdg_dir"`
- eval 'ln -s "applications-merged" "$kde_xdg_dir"'$xdg_redirect_output
- fi
- fi
- if [ $action = "install" -a x"$mode" = x"system" -a -d "/etc/xdg/menus/kde-applications-merged" -a ! -d "/etc/xdg/menus/applications-merged" ] ; then
- # Work around for Kubuntu 6.06
- kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
- DEBUG 1 "Kubuntu Workaround: Link '$xdg_dir' to 'kde-applications-merged'"
- eval 'ln -s "kde-applications-merged" "$xdg_dir"'$xdg_redirect_output
- fi
-
- orig_menu_file=$xdg_dir/$menu_file
-
- DEBUG 1 "Updating $orig_menu_file ($action)"
-
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- orig_desktop_files=
- if [ -r "$orig_menu_file" ] ; then
- awk '
-# List all files within <Filename> tags
-BEGIN {
- RS="<"
-}
-/^Filename/ {
- if (match($0,/>/)) {
- print substr($0,RSTART+1)
- }
-}' $orig_menu_file > $tmpfile
- fi
-
- orig_desktop_files=`cat $tmpfile`
- new_desktop_files=
- if [ $action = "install" ] ; then
- for desktop_file in $desktop_files; do
- basefile=`basename "$desktop_file"`
- if ! grep '^'$basefile'$' $tmpfile > /dev/null 2> /dev/null ; then
- # Append
- echo "$basefile" >> $tmpfile
- fi
- done
- new_desktop_files=`cat $tmpfile`
- fi
- if [ $action = "uninstall" ] ; then
- echo > $tmpfile
- for desktop_file in $desktop_files; do
- echo "$desktop_file" >> $tmpfile
- done
- # Files to uninstall are listed in $tmpfile
- # Existing files are in $orig_desktop_files
- for desktop_file in $orig_desktop_files; do
- if ! grep '^'$desktop_file'$' $tmpfile > /dev/null 2> /dev/null; then
- # Keep this file, it's not in the uninstall list
- new_desktop_files="$new_desktop_files $desktop_file"
- fi
- done
- fi
- rm -f "$tmpfile"
-
- DEBUG 3 "Files to list in $menu_file: $new_desktop_files"
-
- if [ -n "$new_desktop_files" ] ; then
- # Install/update
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- (
- echo '<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"'
- echo ' "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">'
- echo '<!-- Do not edit manually - generated and managed by xdg-desktop-menu -->'
- echo '<Menu>'
- echo ' <Name>Applications</Name>'
-
- for desktop_file in $directory_files; do
- basefile=`basename "$desktop_file"`
- basefilename=`echo "$basefile"|cut -d '.' -f 1`
- echo "<Menu>"
- echo " <Name>$basefilename</Name>"
- echo " <Directory>$basefile</Directory>"
- done
-
- echo " <Include>"
- for desktop_file in $new_desktop_files; do
- echo " <Filename>$desktop_file</Filename>"
- done
- echo " </Include>"
-
- for desktop_file in $directory_files; do
- echo "</Menu>"
- done
-
- echo '</Menu>'
- ) > $tmpfile
- chmod $my_chmod $tmpfile
-
- save_umask=`umask`
- umask $my_umask
-
- mkdir -p $xdg_dir
- eval 'cp $tmpfile $xdg_dir/$menu_file'$xdg_redirect_output
-
- umask $save_umask
- rm -f "$tmpfile"
- else
- # Uninstall
- rm -f $xdg_dir/$menu_file
- fi
-
- # Uninstall .directory files only if no longer referenced
- if [ $action = "uninstall" ] ; then
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- for menu_file in $xdg_dir/*; do
- if grep 'generated and managed by xdg-desktop-menu' $menu_file > /dev/null 2> /dev/null; then
- awk '
-# List all files within <Directory> tags
-BEGIN {
- RS="<"
-}
-/^Directory/ {
- if (match($0,/>/)) {
- print substr($0,RSTART+1)
- }
-}' $menu_file >> $tmpfile
- fi
- done
- orig_directory_files="$directory_files"
- directory_files=
- for desktop_file in $orig_directory_files; do
- if ! grep '^'$desktop_file'$' $tmpfile > /dev/null 2> /dev/null; then
- # No longer in use, safe to delete
- directory_files="$directory_files $desktop_file"
- fi
- done
- rm -f "$tmpfile"
- fi
-}
-
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-mode=
-action=
-update=yes
-desktop_files=
-directory_files=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- forceupdate)
- action=forceupdate
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --noupdate)
- update=no
- ;;
-
- --mode)
- if [ -z "$1" ] ; then
- exit_failure_syntax "mode argument missing for --mode"
- fi
- case "$1" in
- user)
- mode="user"
- ;;
-
- system)
- mode="system"
- ;;
-
- *)
- exit_failure_syntax "unknown mode '$1'"
- ;;
- esac
- shift
- ;;
-
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ "$action" = "install" ] ; then
- check_input_file "$parm"
- fi
- case "$parm" in
- *.directory)
- if [ -n "$desktop_files" ] ; then
- exit_failure_syntax "'$parm' must preceed any *.desktop file"
- fi
- directory_files="$directory_files $parm"
- ;;
- *.desktop)
- desktop_files="$desktop_files $parm"
- ;;
- *)
- exit_failure_syntax "file to $action must be a *.directory or *.desktop file"
- ;;
- esac
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-if [ -n "$XDG_UTILS_INSTALL_MODE" ] ; then
- if [ "$XDG_UTILS_INSTALL_MODE" = "system" ] ; then
- mode="system"
- elif [ "$XDG_UTILS_INSTALL_MODE" = "user" ] ; then
- mode="user"
- fi
-fi
-
-if [ -z "$mode" ] ; then
- if [ `whoami` = "root" ] ; then
- mode="system"
- else
- mode="user"
- fi
-fi
-
-if [ x"$action" = x"forceupdate" ] ; then
- update_desktop_database
- exit_success
-fi
-
-if [ -z "$desktop_files" ] ; then
- exit_failure_syntax "desktop-file argument missing"
-fi
-
-menu_name=
-for desktop_file in $directory_files; do
- if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$desktop_file"
- fi
-
- basefilename=`basename "$desktop_file" | cut -d '.' -f 1`
- if [ -z "$menu_name" ] ; then
- menu_name="$basefilename"
- else
- menu_name="$menu_name-$basefilename"
- fi
-done
-
-if [ -n "$menu_name" ] ; then
- if [ x"$mode" = x"user" ] ; then
- update_submenu "user-$menu_name.menu"
- else
- update_submenu "$menu_name.menu"
- fi
-else
- # Work around for SUSE/gnome 2.12 to pick up new ~/.local/share/applications
- if [ x"$mode" = x"user" ] ; then
- update_submenu
- fi
-fi
-
-# Install *.directory files
-
-xdg_dir_name=desktop-directories
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-xdg_global_dir=
-for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-
-DEBUG 3 "Install locations for *.directory files:"
-DEBUG 3 "xdg_user_dir: $xdg_user_dir"
-DEBUG 3 "xdg_global_dir: $xdg_global_dir"
-DEBUG 3 "kde_user_dir: $kde_user_dir"
-DEBUG 3 "kde_global_dir: $kde_global_dir"
-DEBUG 3 "gnome_user_dir: $gnome_user_dir"
-DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
-else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system menu directory found."
- fi
-fi
-
-for desktop_file in $directory_files; do
- basefile=`basename "$desktop_file"`
-
- DEBUG 1 "$action $desktop_file in $xdg_dir $kde_dir $gnome_dir"
-
- case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- mkdir -p $x
- eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output
- done
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- rm -f $x/$basefile
- done
-
- ;;
- esac
-done
-
-# Install *.desktop files
-xdg_dir_name=applications
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-xdg_global_dir=
-for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-
-kde_user_dir=`kde${KDE_SESSION_VERSION}-config --path apps 2> /dev/null | cut -d ':' -f 1`
-kde_global_dir=`kde${KDE_SESSION_VERSION}-config --path apps 2> /dev/null | cut -d ':' -f 2`
-[ -w $kde_global_dir ] || kde_global_dir=
-
-gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir="/usr/share/gnome/apps"
-[ -w $gnome_global_dir ] || gnome_global_dir=
-
-DEBUG 3 "Install locations for *.desktop files:"
-DEBUG 3 "xdg_user_dir: $xdg_user_dir"
-DEBUG 3 "xdg_global_dir: $xdg_global_dir"
-DEBUG 3 "kde_user_dir: $kde_user_dir"
-DEBUG 3 "kde_global_dir: $kde_global_dir"
-DEBUG 3 "gnome_user_dir: $gnome_user_dir"
-DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
-else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system menu directory found."
- fi
-fi
-
-for desktop_file in $desktop_files; do
- if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$desktop_file"
- fi
-
- basefile=`basename "$desktop_file"`
-
- DEBUG 1 "$action $desktop_file in $xdg_dir $kde_dir $gnome_dir"
-
- case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- mkdir -p $x
- eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output
- done
-
- if [ -f $kde_dir/$basefile ] ; then
- echo "OnlyShowIn=Old;" >> $kde_dir/$basefile
- fi
-
- if [ -f $gnome_dir/$basefile ] ; then
- echo "OnlyShowIn=Old;" >> $gnome_dir/$basefile
- fi
-
- make_lazy_default "$xdg_dir" "$basefile"
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- rm -f $x/$basefile
- done
-
- ;;
- esac
-done
-
-if [ x"$update" = x"yes" ] ; then
- update_desktop_database
-fi
-
-exit_success
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-desktop-menu.in b/chromium/third_party/xdg-utils/scripts/xdg-desktop-menu.in
deleted file mode 100644
index 6c1e3a385bb..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-desktop-menu.in
+++ /dev/null
@@ -1,628 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-desktop-menu
-#
-# Utility script to install menu items on a Linux desktop.
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-update_desktop_database()
-{
-# echo Update desktop database: $mode
- if [ "$mode" = "system" ] ; then
- for x in `echo $PATH | sed 's/:/ /g'` /opt/gnome/bin; do
- if [ -x $x/update-desktop-database ] ; then
- DEBUG 1 "Running $x/update-desktop-database"
- eval '$x/update-desktop-database'$xdg_redirect_output
- return
- fi
- done
- fi
-}
-
-# Make application $1/$2 the default for all the mimetypes it support,
-# iff such mimetype didn't had a default application already.
-# $1 Install dir for desktop file
-# $2 base name of desktop file
-make_lazy_default()
-{
- local mimetypes
- local xdg_user_dir
- local xdg_default_dirs
-
- DEBUG 1 "make_lazy_default $1/$2"
- mimetypes=`awk '
-{
- if (match($0,/MimeType=/)) {
- split(substr($0,RSTART+9),mimetypes,";")
- for (n in mimetypes)
- {
- if (mimetypes[n])
- print mimetypes[n]
- }
- }
-}' "$1/$2" 2> /dev/null`
-
- for MIME in $mimetypes ; do
- xdg_default_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_default_dirs" ] || xdg_default_dirs=/usr/local/share/:/usr/share/
- if [ x"$mode" = x"user" ] ; then
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
- xdg_default_dirs="$xdg_user_dir:$xdg_default_dirs"
- fi
- local default_app
- for x in `echo "$xdg_default_dirs" | sed 's/:/ /g'`; do
- DEBUG 2 "Checking $x/applications/defaults.list"
- default_app=`grep "$MIME=" $x/applications/defaults.list 2> /dev/null | cut -d '=' -f 2`
- if [ -n "$default_app" ] ; then
- DEBUG 2 "Found default apps for $MIME: $default_app"
- default_app="$default_app;"
- break;
- fi
- done
- DEBUG 2 "Current default apps for $MIME: $default_app"
- if echo "$default_app" | grep "$2" > /dev/null 2> /dev/null; then
- # App already listed as default
- continue;
- fi
- default_file="$(readlink -f "$1/defaults.list")"
- DEBUG 1 "Updating $default_file"
- grep -v "$MIME=" $default_file > ${default_file}.new 2> /dev/null
- if ! grep "[Default Applications]" ${default_file}.new > /dev/null; then
- echo "[Default Applications]" >> ${default_file}.new
- fi
- echo $MIME="$default_app$2" >> ${default_file}.new
- mv ${default_file}.new $default_file
- done
-}
-
-update_submenu()
-{
- DEBUG 1 "update_submenu $1"
- menu_file="$1"
-
- xdg_dir_name=menus
- xdg_user_dir="$XDG_CONFIG_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.config"
- xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
- xdg_system_dirs="$XDG_CONFIG_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg
- xdg_global_dir=
- for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
- done
- xdg_user_dir="$xdg_user_dir/applications-merged"
- xdg_global_dir="$xdg_global_dir/applications-merged"
-
- DEBUG 3 "Install locations for *.menu file:"
- DEBUG 3 "xdg_user_dir: $xdg_user_dir"
- DEBUG 3 "xdg_global_dir: $xdg_global_dir"
- DEBUG 3 "kde_user_dir: $kde_user_dir"
- DEBUG 3 "kde_global_dir: $kde_global_dir"
- DEBUG 3 "gnome_user_dir: $gnome_user_dir"
- DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
- if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
- my_chmod=0600
- else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- my_chmod=0644
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system menu directory found."
- fi
- fi
-
- if [ -z "$menu_file" ] ; then
- # Work around for SUSE/gnome 2.12 to pick up new ~/.local/share/applications
- save_umask=`umask`
- umask $my_umask
-
- mkdir -p $xdg_dir
- touch $xdg_dir/@NAME@-dummy.menu
-
- umask $save_umask
- return
- fi
-
- if [ $action = "install" -a -f "/etc/xdg/menus/gnome-applications.menu" ] ; then
- # Work around for Debian Gnome
- gnome_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/gnome-applications-merged^'`
- if [ ! -e "$gnome_xdg_dir" ] ; then
- DEBUG 1 "Debian Workaround: Link '$xdg_dir' to '$gnome_xdg_dir'"
- mkdir -p `dirname "$gnome_xdg_dir"`
- eval 'ln -s "applications-merged" "$gnome_xdg_dir"'$xdg_redirect_output
- fi
- fi
- if [ $action = "install" -a -f "/etc/mandrake-release" ] ; then
- # Work around for Mandriva 2006
- mandrake_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/applications-mdk-merged^'`
- if [ ! -e "$mandrake_xdg_dir" ] ; then
- DEBUG 1 "Mandriva Workaround: Link '$xdg_dir' to '$mandrake_xdg_dir'"
- mkdir -p `dirname "$mandrake_xdg_dir"`
- eval 'ln -s "applications-merged" "$mandrake_xdg_dir"'$xdg_redirect_output
- fi
- fi
- if [ $action = "install" -a x"$mode" = x"user" -a -d "/etc/xdg/menus/kde-applications-merged" ] ; then
- # Work around for Fedora Core 5 + patched KDE
- kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
- if [ ! -e "$kde_xdg_dir" ] ; then
- DEBUG 1 "Fedora Workaround: Link '$xdg_dir' to '$kde_xdg_dir'"
- mkdir -p `dirname "$kde_xdg_dir"`
- eval 'ln -s "applications-merged" "$kde_xdg_dir"'$xdg_redirect_output
- fi
- fi
- if [ $action = "install" -a x"$mode" = x"system" -a -d "/etc/xdg/menus/kde-applications-merged" -a ! -d "/etc/xdg/menus/applications-merged" ] ; then
- # Work around for Kubuntu 6.06
- kde_xdg_dir=`echo "$xdg_dir" | sed -e 's^/applications-merged^/kde-applications-merged^'`
- DEBUG 1 "Kubuntu Workaround: Link '$xdg_dir' to 'kde-applications-merged'"
- eval 'ln -s "kde-applications-merged" "$xdg_dir"'$xdg_redirect_output
- fi
-
- orig_menu_file=$xdg_dir/$menu_file
-
- DEBUG 1 "Updating $orig_menu_file ($action)"
-
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- orig_desktop_files=
- if [ -r "$orig_menu_file" ] ; then
- awk '
-# List all files within <Filename> tags
-BEGIN {
- RS="<"
-}
-/^Filename/ {
- if (match($0,/>/)) {
- print substr($0,RSTART+1)
- }
-}' $orig_menu_file > $tmpfile
- fi
-
- orig_desktop_files=`cat $tmpfile`
- new_desktop_files=
- if [ $action = "install" ] ; then
- for desktop_file in $desktop_files; do
- basefile=`basename "$desktop_file"`
- if ! grep '^'$basefile'$' $tmpfile > /dev/null 2> /dev/null ; then
- # Append
- echo "$basefile" >> $tmpfile
- fi
- done
- new_desktop_files=`cat $tmpfile`
- fi
- if [ $action = "uninstall" ] ; then
- echo > $tmpfile
- for desktop_file in $desktop_files; do
- echo "$desktop_file" >> $tmpfile
- done
- # Files to uninstall are listed in $tmpfile
- # Existing files are in $orig_desktop_files
- for desktop_file in $orig_desktop_files; do
- if ! grep '^'$desktop_file'$' $tmpfile > /dev/null 2> /dev/null; then
- # Keep this file, it's not in the uninstall list
- new_desktop_files="$new_desktop_files $desktop_file"
- fi
- done
- fi
- rm -f "$tmpfile"
-
- DEBUG 3 "Files to list in $menu_file: $new_desktop_files"
-
- if [ -n "$new_desktop_files" ] ; then
- # Install/update
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- (
- echo '<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"'
- echo ' "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">'
- echo '<!-- Do not edit manually - generated and managed by @NAME@ -->'
- echo '<Menu>'
- echo ' <Name>Applications</Name>'
-
- for desktop_file in $directory_files; do
- basefile=`basename "$desktop_file"`
- basefilename=`echo "$basefile"|cut -d '.' -f 1`
- echo "<Menu>"
- echo " <Name>$basefilename</Name>"
- echo " <Directory>$basefile</Directory>"
- done
-
- echo " <Include>"
- for desktop_file in $new_desktop_files; do
- echo " <Filename>$desktop_file</Filename>"
- done
- echo " </Include>"
-
- for desktop_file in $directory_files; do
- echo "</Menu>"
- done
-
- echo '</Menu>'
- ) > $tmpfile
- chmod $my_chmod $tmpfile
-
- save_umask=`umask`
- umask $my_umask
-
- mkdir -p $xdg_dir
- eval 'cp $tmpfile $xdg_dir/$menu_file'$xdg_redirect_output
-
- umask $save_umask
- rm -f "$tmpfile"
- else
- # Uninstall
- rm -f $xdg_dir/$menu_file
- fi
-
- # Uninstall .directory files only if no longer referenced
- if [ $action = "uninstall" ] ; then
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- for menu_file in $xdg_dir/*; do
- if grep 'generated and managed by @NAME@' $menu_file > /dev/null 2> /dev/null; then
- awk '
-# List all files within <Directory> tags
-BEGIN {
- RS="<"
-}
-/^Directory/ {
- if (match($0,/>/)) {
- print substr($0,RSTART+1)
- }
-}' $menu_file >> $tmpfile
- fi
- done
- orig_directory_files="$directory_files"
- directory_files=
- for desktop_file in $orig_directory_files; do
- if ! grep '^'$desktop_file'$' $tmpfile > /dev/null 2> /dev/null; then
- # No longer in use, safe to delete
- directory_files="$directory_files $desktop_file"
- fi
- done
- rm -f "$tmpfile"
- fi
-}
-
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-mode=
-action=
-update=yes
-desktop_files=
-directory_files=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- forceupdate)
- action=forceupdate
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --noupdate)
- update=no
- ;;
-
- --mode)
- if [ -z "$1" ] ; then
- exit_failure_syntax "mode argument missing for --mode"
- fi
- case "$1" in
- user)
- mode="user"
- ;;
-
- system)
- mode="system"
- ;;
-
- *)
- exit_failure_syntax "unknown mode '$1'"
- ;;
- esac
- shift
- ;;
-
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ "$action" = "install" ] ; then
- check_input_file "$parm"
- fi
- case "$parm" in
- *.directory)
- if [ -n "$desktop_files" ] ; then
- exit_failure_syntax "'$parm' must preceed any *.desktop file"
- fi
- directory_files="$directory_files $parm"
- ;;
- *.desktop)
- desktop_files="$desktop_files $parm"
- ;;
- *)
- exit_failure_syntax "file to $action must be a *.directory or *.desktop file"
- ;;
- esac
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-if [ -n "$XDG_UTILS_INSTALL_MODE" ] ; then
- if [ "$XDG_UTILS_INSTALL_MODE" = "system" ] ; then
- mode="system"
- elif [ "$XDG_UTILS_INSTALL_MODE" = "user" ] ; then
- mode="user"
- fi
-fi
-
-if [ -z "$mode" ] ; then
- if [ `whoami` = "root" ] ; then
- mode="system"
- else
- mode="user"
- fi
-fi
-
-if [ x"$action" = x"forceupdate" ] ; then
- update_desktop_database
- exit_success
-fi
-
-if [ -z "$desktop_files" ] ; then
- exit_failure_syntax "desktop-file argument missing"
-fi
-
-menu_name=
-for desktop_file in $directory_files; do
- if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$desktop_file"
- fi
-
- basefilename=`basename "$desktop_file" | cut -d '.' -f 1`
- if [ -z "$menu_name" ] ; then
- menu_name="$basefilename"
- else
- menu_name="$menu_name-$basefilename"
- fi
-done
-
-if [ -n "$menu_name" ] ; then
- if [ x"$mode" = x"user" ] ; then
- update_submenu "user-$menu_name.menu"
- else
- update_submenu "$menu_name.menu"
- fi
-else
- # Work around for SUSE/gnome 2.12 to pick up new ~/.local/share/applications
- if [ x"$mode" = x"user" ] ; then
- update_submenu
- fi
-fi
-
-# Install *.directory files
-
-xdg_dir_name=desktop-directories
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-xdg_global_dir=
-for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-
-DEBUG 3 "Install locations for *.directory files:"
-DEBUG 3 "xdg_user_dir: $xdg_user_dir"
-DEBUG 3 "xdg_global_dir: $xdg_global_dir"
-DEBUG 3 "kde_user_dir: $kde_user_dir"
-DEBUG 3 "kde_global_dir: $kde_global_dir"
-DEBUG 3 "gnome_user_dir: $gnome_user_dir"
-DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
-else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system menu directory found."
- fi
-fi
-
-for desktop_file in $directory_files; do
- basefile=`basename "$desktop_file"`
-
- DEBUG 1 "$action $desktop_file in $xdg_dir $kde_dir $gnome_dir"
-
- case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- mkdir -p $x
- eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output
- done
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- rm -f $x/$basefile
- done
-
- ;;
- esac
-done
-
-# Install *.desktop files
-xdg_dir_name=applications
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-xdg_global_dir=
-for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-
-kde_user_dir=`kde${KDE_SESSION_VERSION}-config --path apps 2> /dev/null | cut -d ':' -f 1`
-kde_global_dir=`kde${KDE_SESSION_VERSION}-config --path apps 2> /dev/null | cut -d ':' -f 2`
-[ -w $kde_global_dir ] || kde_global_dir=
-
-gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir="/usr/share/gnome/apps"
-[ -w $gnome_global_dir ] || gnome_global_dir=
-
-DEBUG 3 "Install locations for *.desktop files:"
-DEBUG 3 "xdg_user_dir: $xdg_user_dir"
-DEBUG 3 "xdg_global_dir: $xdg_global_dir"
-DEBUG 3 "kde_user_dir: $kde_user_dir"
-DEBUG 3 "kde_global_dir: $kde_global_dir"
-DEBUG 3 "gnome_user_dir: $gnome_user_dir"
-DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
-else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system menu directory found."
- fi
-fi
-
-for desktop_file in $desktop_files; do
- if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$desktop_file"
- fi
-
- basefile=`basename "$desktop_file"`
-
- DEBUG 1 "$action $desktop_file in $xdg_dir $kde_dir $gnome_dir"
-
- case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- mkdir -p $x
- eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output
- done
-
- if [ -f $kde_dir/$basefile ] ; then
- echo "OnlyShowIn=Old;" >> $kde_dir/$basefile
- fi
-
- if [ -f $gnome_dir/$basefile ] ; then
- echo "OnlyShowIn=Old;" >> $gnome_dir/$basefile
- fi
-
- make_lazy_default "$xdg_dir" "$basefile"
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in $xdg_dir $kde_dir $gnome_dir ; do
- rm -f $x/$basefile
- done
-
- ;;
- esac
-done
-
-if [ x"$update" = x"yes" ] ; then
- update_desktop_database
-fi
-
-exit_success
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-email b/chromium/third_party/xdg-utils/scripts/xdg-email
deleted file mode 100755
index 7dfc2bbc1d0..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-email
+++ /dev/null
@@ -1,865 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-email
-#
-# Utility script to open the users favorite email program, using the
-# RFC 2368 mailto: URI spec
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-email - command line tool for sending mail using the user's preferred
-e-mail composer
-
-Synopsis
-
-xdg-email [--utf8] [--cc address] [--bcc address] [--subject text] [--body text
-] [--attach file] [ mailto-uri | address(es) ]
-
-xdg-email { --help | --manual | --version }
-
-Description
-
-xdg-email opens the user's preferred e-mail composer in order to send a mail to
-address(es) or mailto-uri. RFC2368 defines mailto: URIs. xdg-email limits
-support to, cc, subject and body fields in mailto-uri, all other fields are
-silently ignored. address(es) must follow the syntax of RFC822. Multiple
-addresses may be provided as separate arguments.
-
-All information provided on the command line is used to prefill corresponding
-fields in the user's e-mail composer. The user will have the opportunity to
-change any of this information before actually sending the e-mail.
-
-xdg-email is for use inside a desktop session only. It is not recommended to
-use xdg-email as root.
-
-See http://portland.freedesktop.org/EmailConfig for information on how the user
-can change the e-mail composer that is used.
-
-Options
-
---utf8
- Indicates that all command line options that follow are in utf8. Without
- this option, command line options are expected to be encoded according to
- locale. If the locale already specifies utf8 this option has no effect.
- This option does not affect mailto URIs that are passed on the command
- line.
---cc address
- Specify a recipient to be copied on the e-mail.
---bcc address
- Specify a recipient to be blindly copied on the e-mail.
---subject text
- Specify a subject for the e-mail.
---body text
- Specify a body for the e-mail. Since the user will be able to make changes
- before actually sending the e-mail, this can be used to provide the user
- with a template for the e-mail. text may contain linebreaks.
---attach file
-
- Specify an attachment for the e-mail. file must point to an existing file.
-
- Some e-mail applications require the file to remain present after xdg-email
- returns.
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Environment Variables
-
-xdg-email honours the following environment variables:
-
-XDG_UTILS_DEBUG_LEVEL
- Setting this environment variable to a non-zero numerical value makes
- xdg-email do more verbose reporting on stderr. Setting a higher value
- increases the verbosity.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-5
- No permission to read one of the files passed on the command line.
-
-Configuration
-
-Visit http://portland.freedesktop.org/EmailConfig for information how to
-configure xdg-email to use the email client of your choice.
-
-Examples
-
-xdg-email 'Jeremy White <jwhite@example.com>'
-
-xdg-email --attach /tmp/logo.png \
- --subject 'Logo contest' \
- --body 'Attached you find the logo for the contest.' \
- 'jwhite@example.com'
-
-xdg-email --subject 'Your password is about to expire' \
- 'jwhite@example.com' 'bastian@example.com' 'whipple@example.com'
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-email - command line tool for sending mail using the user's preferred
-e-mail composer
-
-Synopsis
-
-xdg-email [--utf8] [--cc address] [--bcc address] [--subject text] [--body text
-] [--attach file] [ mailto-uri | address(es) ]
-
-xdg-email { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-email: $@" >&2
- echo "Try 'xdg-email --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-email' or 'xdg-email --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-email: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-email: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-email: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-email: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-email: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-email: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-email --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-email' or 'xdg-email --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-email 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-run_thunderbird()
-{
- local THUNDERBIRD MAILTO NEWMAILTO TO CC BCC SUBJECT BODY ATTACH
- THUNDERBIRD="$1"
- MAILTO=$(echo "$2" | sed 's/^mailto://')
- echo "$MAILTO" | grep -qs "^?"
- if [ "$?" = "0" ] ; then
- MAILTO=$(echo "$MAILTO" | sed 's/^?//')
- else
- MAILTO=$(echo "$MAILTO" | sed 's/^/to=/' | sed 's/?/\&/')
- fi
-
- MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
- TO=$(echo "$MAILTO" | grep '^to=' | sed 's/^to=//' | awk '{ printf "%s,",$0 }')
- CC=$(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//' | awk '{ printf "%s,",$0 }')
- BCC=$(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//' | awk '{ printf "%s,",$0 }')
- SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
- BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
- ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }' | sed 's/,$//')
-
- if [ -z "$TO" ] ; then
- NEWMAILTO=
- else
- NEWMAILTO="to='$TO'"
- fi
- if [ -n "$CC" ] ; then
- NEWMAILTO="${NEWMAILTO},cc='$CC'"
- fi
- if [ -n "$BCC" ] ; then
- NEWMAILTO="${NEWMAILTO},bcc='$BCC'"
- fi
- if [ -n "$SUBJECT" ] ; then
- NEWMAILTO="${NEWMAILTO},$SUBJECT"
- fi
- if [ -n "$BODY" ] ; then
- NEWMAILTO="${NEWMAILTO},$BODY"
- fi
-
- if [ -n "$ATTACH" ] ; then
- NEWMAILTO="${NEWMAILTO},attachment='${ATTACH}'"
- fi
-
- NEWMAILTO=$(echo "$NEWMAILTO" | sed 's/^,//')
- DEBUG 1 "Running $THUNDERBIRD -compose \"$NEWMAILTO\""
- "$THUNDERBIRD" -compose "$NEWMAILTO"
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_kde()
-{
- local client kde_email_profile_name
- kde_email_profile_name=`kreadconfig --file emaildefaults --group Defaults --key Profile`
- client=`kreadconfig --file emaildefaults --group PROFILE_"$kde_email_profile_name" --key EmailClient | cut -d ' ' -f 1`
- echo $client | grep thunderbird > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- run_thunderbird "$client" "$1"
- fi
-
- if [ -f /etc/SuSE-release ] ; then
- # Workaround for SUSE 10.0
- [ -z "$client" ] && client="kmail"
- if ! which "$client" > /dev/null 2> /dev/null; then
- DEBUG 3 "KDE has $client configured as email client which isn't installed"
- if which gnome-open > /dev/null 2> /dev/null && which evolution > /dev/null 2> /dev/null; then
- DEBUG 3 "Try gnome-open instead"
- open_gnome "$1"
- fi
- fi
- fi
- DEBUG 1 "Running kmailservice \"$1\""
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- KMAILSERVICE=`kde4-config --locate kmailservice --path exe 2>/dev/null`
- $KMAILSERVICE "$1"
- else
- KMAILSERVICE=`which kmailservice 2>/dev/null`
- # KDE3 uses locale's encoding when decoding the URI, so set it to UTF-8
- LC_ALL=C.UTF-8 $KMAILSERVICE "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_gnome3()
-{
- local client
- local desktop
- desktop=`xdg-mime query default "x-scheme-handler/mailto"`
- client=`desktop_file_to_binary "$browser"`
- echo $client | grep thunderbird > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- run_thunderbird "$client" "$1"
- fi
-
- if gvfs-open --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gvfs-open \"$1\""
- gvfs-open "$1"
- else
- DEBUG 1 "Running gnome-open \"$1\""
- gnome-open "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_gnome()
-{
- local client
- client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1` || ""
- echo $client | grep thunderbird > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- run_thunderbird "$client" "$1"
- fi
-
- if gvfs-open --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gvfs-open \"$1\""
- gvfs-open "$1"
- else
- DEBUG 1 "Running gnome-open \"$1\""
- gnome-open "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-
-open_xfce()
-{
- DEBUG 1 "Running exo-open \"$1\""
- exo-open "$1"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_generic()
-{
- IFS=":"
- for browser in $BROWSER; do
- if [ x"$browser" != x"" ]; then
-
- browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
- if [ $? -ne 0 ]; then browser_with_arg=$browser;
- fi
-
- if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
- else $browser_with_arg;
- fi
-
- if [ $? -eq 0 ]; then exit_success;
- fi
- fi
- done
-
- exit_failure_operation_impossible "no method available for opening '$1'"
-}
-
-url_encode()
-{
-result=$(echo "$1" | $utf8 | awk '
- BEGIN {
- for ( i=1; i<=255; ++i ) ord [ sprintf ("%c", i) "" ] = i + 0
- e = ""
- linenr = 1
- }
- {
- if ( linenr++ != 1 ) {
- e = e "%0D%0A"
- }
- for ( i=1; i<=length ($0); ++i ) {
- c = substr ($0, i, 1)
- if ( ord [c] > 127 ) {
- e = e "%" sprintf("%02X", ord [c])
- } else if ( c ~ /[@a-zA-Z0-9.-\\\/]/ ) {
- e = e c
- } else {
- e = e "%" sprintf("%02X", ord [c])
- }
- }
- }
- END {
- print e
- }
-')
-}
-
-options=
-mailto=
-utf8="iconv -t utf8"
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --utf8)
- utf8="cat"
- ;;
-
- --to)
- if [ -z "$1" ] ; then
- exit_failure_syntax "email address argument missing for --to"
- fi
- url_encode "$1"
- options="${options}to=${result}&"
- shift
- ;;
-
- --cc)
- if [ -z "$1" ] ; then
- exit_failure_syntax "email address argument missing for --cc"
- fi
- url_encode "$1"
- options="${options}cc=${result}&"
- shift
- ;;
-
- --bcc)
- if [ -z "$1" ] ; then
- exit_failure_syntax "email address argument missing for --bcc"
- fi
- url_encode "$1"
- options="${options}bcc=${result}&"
- shift
- ;;
-
- --subject)
- if [ -z "$1" ] ; then
- exit_failure_syntax "text argument missing for --subject option"
- fi
- url_encode "$1"
- options="${options}subject=${result}&"
- shift
- ;;
-
- --body)
- if [ -z "$1" ] ; then
- exit_failure_syntax "text argument missing for --body option"
- fi
- url_encode "$1"
- options="${options}body=${result}&"
- shift
- ;;
-
- --attach)
- if [ -z "$1" ] ; then
- exit_failure_syntax "file argument missing for --attach option"
- fi
- check_input_file "$1"
- file=`readlink -f "$1"` # Normalize path
- if [ -z "$file" -o ! -f "$file" ] ; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
-
- url_encode "$file"
- options="${options}attach=${result}&"
- shift
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- mailto:*)
- mailto="$parm"
- ;;
-
- *@*)
- url_encode "$parm"
- if [ -z "${mailto}" ] ; then
- mailto="mailto:"${result}"?"
- else
- options="${options}to=${result}&"
- fi
- ;;
-
- *)
- exit_failure_syntax "unexpected argument '$parm'"
- ;;
- esac
-done
-
-if [ -z "${mailto}" ] ; then
- # TO address is optional
- mailto="mailto:?"
-fi
-
-case $mailto in
- *\?)
- mailto="${mailto}${options}"
- ;;
-
- *\?*)
- mailto="${mailto}&${options}"
- ;;
-
- *)
- mailto="${mailto}?${options}"
- ;;
-esac
-
-# Strip trailing ? and &
-mailto=`echo "${mailto}"| sed 's/[?&]$//'`
-
-# Shouldn't happen
-[ x"${mailto}" != x"" ] || exit_failure_syntax
-
-if which xdg-email-hook.sh > /dev/null 2> /dev/null; then
- xdg-email-hook.sh "${mailto}"
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-fi
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- DE=generic
-fi
-
-# if BROWSER variable is not set, check some well known browsers instead
-if [ x"$BROWSER" = x"" ]; then
- BROWSER=links2:elinks:links:lynx:w3m
- if [ -n "$DISPLAY" ]; then
- BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
- fi
-fi
-
-case "$DE" in
- kde)
- open_kde "${mailto}"
- ;;
-
- gnome)
- open_gnome "${mailto}"
- ;;
-
- gnome3)
- open_gnome3 "${mailto}"
- ;;
-
- xfce)
- open_xfce "${mailto}"
- ;;
-
- generic|lxde)
- open_generic "${mailto}"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening '${mailto}'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-email.in b/chromium/third_party/xdg-utils/scripts/xdg-email.in
deleted file mode 100644
index bbfb6043122..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-email.in
+++ /dev/null
@@ -1,404 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-email
-#
-# Utility script to open the users favorite email program, using the
-# RFC 2368 mailto: URI spec
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-run_thunderbird()
-{
- local THUNDERBIRD MAILTO NEWMAILTO TO CC BCC SUBJECT BODY ATTACH
- THUNDERBIRD="$1"
- MAILTO=$(echo "$2" | sed 's/^mailto://')
- echo "$MAILTO" | grep -qs "^?"
- if [ "$?" = "0" ] ; then
- MAILTO=$(echo "$MAILTO" | sed 's/^?//')
- else
- MAILTO=$(echo "$MAILTO" | sed 's/^/to=/' | sed 's/?/\&/')
- fi
-
- MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
- TO=$(echo "$MAILTO" | grep '^to=' | sed 's/^to=//' | awk '{ printf "%s,",$0 }')
- CC=$(echo "$MAILTO" | grep '^cc=' | sed 's/^cc=//' | awk '{ printf "%s,",$0 }')
- BCC=$(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//' | awk '{ printf "%s,",$0 }')
- SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
- BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
- ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }' | sed 's/,$//')
-
- if [ -z "$TO" ] ; then
- NEWMAILTO=
- else
- NEWMAILTO="to='$TO'"
- fi
- if [ -n "$CC" ] ; then
- NEWMAILTO="${NEWMAILTO},cc='$CC'"
- fi
- if [ -n "$BCC" ] ; then
- NEWMAILTO="${NEWMAILTO},bcc='$BCC'"
- fi
- if [ -n "$SUBJECT" ] ; then
- NEWMAILTO="${NEWMAILTO},$SUBJECT"
- fi
- if [ -n "$BODY" ] ; then
- NEWMAILTO="${NEWMAILTO},$BODY"
- fi
-
- if [ -n "$ATTACH" ] ; then
- NEWMAILTO="${NEWMAILTO},attachment='${ATTACH}'"
- fi
-
- NEWMAILTO=$(echo "$NEWMAILTO" | sed 's/^,//')
- DEBUG 1 "Running $THUNDERBIRD -compose \"$NEWMAILTO\""
- "$THUNDERBIRD" -compose "$NEWMAILTO"
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_kde()
-{
- local client kde_email_profile_name
- kde_email_profile_name=`kreadconfig --file emaildefaults --group Defaults --key Profile`
- client=`kreadconfig --file emaildefaults --group PROFILE_"$kde_email_profile_name" --key EmailClient | cut -d ' ' -f 1`
- echo $client | grep thunderbird > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- run_thunderbird "$client" "$1"
- fi
-
- if [ -f /etc/SuSE-release ] ; then
- # Workaround for SUSE 10.0
- [ -z "$client" ] && client="kmail"
- if ! which "$client" > /dev/null 2> /dev/null; then
- DEBUG 3 "KDE has $client configured as email client which isn't installed"
- if which gnome-open > /dev/null 2> /dev/null && which evolution > /dev/null 2> /dev/null; then
- DEBUG 3 "Try gnome-open instead"
- open_gnome "$1"
- fi
- fi
- fi
- DEBUG 1 "Running kmailservice \"$1\""
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- KMAILSERVICE=`kde4-config --locate kmailservice --path exe 2>/dev/null`
- $KMAILSERVICE "$1"
- else
- KMAILSERVICE=`which kmailservice 2>/dev/null`
- # KDE3 uses locale's encoding when decoding the URI, so set it to UTF-8
- LC_ALL=C.UTF-8 $KMAILSERVICE "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_gnome3()
-{
- local client
- local desktop
- desktop=`xdg-mime query default "x-scheme-handler/mailto"`
- client=`desktop_file_to_binary "$browser"`
- echo $client | grep thunderbird > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- run_thunderbird "$client" "$1"
- fi
-
- if gvfs-open --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gvfs-open \"$1\""
- gvfs-open "$1"
- else
- DEBUG 1 "Running gnome-open \"$1\""
- gnome-open "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_gnome()
-{
- local client
- client=`gconftool-2 --get /desktop/gnome/url-handlers/mailto/command | cut -d ' ' -f 1` || ""
- echo $client | grep thunderbird > /dev/null 2>&1
- if [ $? -eq 0 ] ; then
- run_thunderbird "$client" "$1"
- fi
-
- if gvfs-open --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gvfs-open \"$1\""
- gvfs-open "$1"
- else
- DEBUG 1 "Running gnome-open \"$1\""
- gnome-open "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-
-open_xfce()
-{
- DEBUG 1 "Running exo-open \"$1\""
- exo-open "$1"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_generic()
-{
- IFS=":"
- for browser in $BROWSER; do
- if [ x"$browser" != x"" ]; then
-
- browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
- if [ $? -ne 0 ]; then browser_with_arg=$browser;
- fi
-
- if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1";
- else $browser_with_arg;
- fi
-
- if [ $? -eq 0 ]; then exit_success;
- fi
- fi
- done
-
- exit_failure_operation_impossible "no method available for opening '$1'"
-}
-
-url_encode()
-{
-result=$(echo "$1" | $utf8 | awk '
- BEGIN {
- for ( i=1; i<=255; ++i ) ord [ sprintf ("%c", i) "" ] = i + 0
- e = ""
- linenr = 1
- }
- {
- if ( linenr++ != 1 ) {
- e = e "%0D%0A"
- }
- for ( i=1; i<=length ($0); ++i ) {
- c = substr ($0, i, 1)
- if ( ord [c] > 127 ) {
- e = e "%" sprintf("%02X", ord [c])
- } else if ( c ~ /[@a-zA-Z0-9.-\\\/]/ ) {
- e = e c
- } else {
- e = e "%" sprintf("%02X", ord [c])
- }
- }
- }
- END {
- print e
- }
-')
-}
-
-options=
-mailto=
-utf8="iconv -t utf8"
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --utf8)
- utf8="cat"
- ;;
-
- --to)
- if [ -z "$1" ] ; then
- exit_failure_syntax "email address argument missing for --to"
- fi
- url_encode "$1"
- options="${options}to=${result}&"
- shift
- ;;
-
- --cc)
- if [ -z "$1" ] ; then
- exit_failure_syntax "email address argument missing for --cc"
- fi
- url_encode "$1"
- options="${options}cc=${result}&"
- shift
- ;;
-
- --bcc)
- if [ -z "$1" ] ; then
- exit_failure_syntax "email address argument missing for --bcc"
- fi
- url_encode "$1"
- options="${options}bcc=${result}&"
- shift
- ;;
-
- --subject)
- if [ -z "$1" ] ; then
- exit_failure_syntax "text argument missing for --subject option"
- fi
- url_encode "$1"
- options="${options}subject=${result}&"
- shift
- ;;
-
- --body)
- if [ -z "$1" ] ; then
- exit_failure_syntax "text argument missing for --body option"
- fi
- url_encode "$1"
- options="${options}body=${result}&"
- shift
- ;;
-
- --attach)
- if [ -z "$1" ] ; then
- exit_failure_syntax "file argument missing for --attach option"
- fi
- check_input_file "$1"
- file=`readlink -f "$1"` # Normalize path
- if [ -z "$file" -o ! -f "$file" ] ; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
-
- url_encode "$file"
- options="${options}attach=${result}&"
- shift
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- mailto:*)
- mailto="$parm"
- ;;
-
- *@*)
- url_encode "$parm"
- if [ -z "${mailto}" ] ; then
- mailto="mailto:"${result}"?"
- else
- options="${options}to=${result}&"
- fi
- ;;
-
- *)
- exit_failure_syntax "unexpected argument '$parm'"
- ;;
- esac
-done
-
-if [ -z "${mailto}" ] ; then
- # TO address is optional
- mailto="mailto:?"
-fi
-
-case $mailto in
- *\?)
- mailto="${mailto}${options}"
- ;;
-
- *\?*)
- mailto="${mailto}&${options}"
- ;;
-
- *)
- mailto="${mailto}?${options}"
- ;;
-esac
-
-# Strip trailing ? and &
-mailto=`echo "${mailto}"| sed 's/[?&]$//'`
-
-# Shouldn't happen
-[ x"${mailto}" != x"" ] || exit_failure_syntax
-
-if which @NAME@-hook.sh > /dev/null 2> /dev/null; then
- @NAME@-hook.sh "${mailto}"
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-fi
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- DE=generic
-fi
-
-# if BROWSER variable is not set, check some well known browsers instead
-if [ x"$BROWSER" = x"" ]; then
- BROWSER=links2:elinks:links:lynx:w3m
- if [ -n "$DISPLAY" ]; then
- BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
- fi
-fi
-
-case "$DE" in
- kde)
- open_kde "${mailto}"
- ;;
-
- gnome)
- open_gnome "${mailto}"
- ;;
-
- gnome3)
- open_gnome3 "${mailto}"
- ;;
-
- xfce)
- open_xfce "${mailto}"
- ;;
-
- generic|lxde)
- open_generic "${mailto}"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening '${mailto}'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-file-dialog b/chromium/third_party/xdg-utils/scripts/xdg-file-dialog
deleted file mode 100755
index 3f6fae702a5..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-file-dialog
+++ /dev/null
@@ -1,603 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-file-dialog
-#
-# Utility script to file selection dialogs
-# on XDG compliant systems.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
- xdg-file-dialog -- command line tool for providing file and directory
- selection dialogs
-
-Synopsis
-
- xdg-file-dialog openfilename [--title TITLE] [FILENAME]
-
- xdg-file-dialog openfilenamelist [--title TITLE] [FILENAME]
-
- xdg-file-dialog savefilename [--title TITLE] [FILENAME]
-
- xdg-file-dialog directory [--title TITLE] [DIRNAME]
-
- xdg-file-dialog { --help | --manual | --version }
-
-Description
-
- The xdg-file-dialog program can be used to let the native file selection
- dialog handle file and directory input.
-
- xdg-file-dialog is for use inside a desktop session only. It is not
- recommended to use xdg-file-dialog as root.
-
-Commands
-
- openfilename
- Returns the filename with path for a file to read from. FILENAME
- can optionally be used to specify path and filename of a
- preselection.
-
- openfilenamelist
- Returns one or more filenames with path for files to read from,
- each on a new line. FILENAME can optionally be used to specify
- path and filename of a preselection.
-
- savefilename
- Returns the filename with path for file to write to. FILENAME can
- optionally be used to specify path and filename of a preselection.
-
- directory
- Returns the path for an exsiting directory. DIRNAME can optionally
- be used to specify a path of a preselection.
-
-Options
-
- --title TITLE
- Sets the dialog's title (caption) to the specified text.
-
- --help
- Show command synopsis.
-
- --manual
- Show this manualpage.
-
- --version
- Show the xdg-utils version information.
-
-Exit Codes
-
- An exit code of 0 indicates success while a non-zero exit code indicates
- failure. The following failure codes can be returned:
-
- 1
- Error in command line syntax.
-
- 2
- One of the files passed on the command line did not exist.
-
- 3
- A required tool could not be found.
-
- 4
- The action failed.
-
-Examples
-
- xdg-file-dialog savefilename /tmp/foobar.png
-
- Asks for a save file name starting in directory /tmp and suggesting
- foobar.png as the filename
-
- xdg-file-dialog directory --title "Select a target folder" /tmp
-
- Asks for a directory name starting in directory /tmp using the text
- "Select a target folder" as the dialog's title/caption.
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
- xdg-file-dialog -- command line tool for providing file and directory
- selection dialogs
-
-Synopsis
-
- xdg-file-dialog openfilename [--title TITLE] [FILENAME]
-
- xdg-file-dialog openfilenamelist [--title TITLE] [FILENAME]
-
- xdg-file-dialog savefilename [--title TITLE] [FILENAME]
-
- xdg-file-dialog directory [--title TITLE] [DIRNAME]
-
- xdg-file-dialog { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-file-dialog: $@" >&2
- echo "Try 'xdg-file-dialog --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-file-dialog' or 'xdg-file-dialog --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-file-dialog: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-file-dialog: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-file-dialog: $@" >&2
- fi
-
- exit 4
-}
-
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- --help)
- usage
- echo "Use 'man xdg-file-dialog' or 'xdg-file-dialog --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-file-dialog 1.0beta1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- fi
-}
-
-#----------------------------------------------------------------------------
-
-
-
-open_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --getopenfilename "$1" ""
- else
- $DIALOG --getopenfilename "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-open_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd `dirname "$1"` 2>/dev/null
- FILENAME=`basename "$1"`
- if [ x"$FILENAME" != x"" ]; then
- FILENAME="--filename=""$FILENAME"
- fi
- fi
-
- if [ x"$FILENAME" != x"" ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --file-selection "$FILENAME"
- else
- $DIALOG --file-selection "$FILENAME"
- fi
- else
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --file-selection
- else
- $DIALOG --file-selection
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-open_multi_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --multiple --separate-output \
- --getopenfilename "$1" ""
- else
- $DIALOG --multiple --separate-output --getopenfilename "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-open_multi_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd `dirname "$1"` 2>/dev/null
- FILENAME=`basename "$1"`
- if [ x"$FILENAME" != x"" ]; then
- FILENAME="--filename=""$FILENAME"
- fi
- fi
-
- if [ x"$FILENAME" != x"" ]; then
- if [ x"$TITLE" != x"" ]; then
- LIST=`$DIALOG --title "$TITLE" --multiple --file-selection "$FILENAME"`
- else
- LIST=`$DIALOG --multiple --file-selection "$FILENAME"`
- fi
- else
- if [ x"$TITLE" != x"" ]; then
- LIST=`$DIALOG --title "$TITLE" --multiple --file-selection`
- else
- LIST=`$DIALOG --multiple --file-selection`
- fi
- fi
-
- if [ $? -eq 0 ]; then
- echo "$LIST" | sed s#'|'#\\n#g
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-save_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --getsavefilename "$1" ""
- else
- $DIALOG --getsavefilename "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-save_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd `dirname "$1"` 2>/dev/null
- FILENAME=`basename "$1"`
- if [ x"$FILENAME" != x"" ]; then
- FILENAME="--filename=""$FILENAME"
- fi
- fi
-
- if [ x"$FILENAME" != x"" ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --save --file-selection "$FILENAME"
- else
- $DIALOG --save --file-selection "$FILENAME"
- fi
- else
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --save --file-selection
- else
- $DIALOG --save --file-selection
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-directory_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --getexistingdirectory "$1" ""
- else
- $DIALOG --getexistingdirectory "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-directory_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd "$1" 2>/dev/null
- fi
-
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --directory --file-selection
- else
- $DIALOG --directory --file-selection
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-TITLE=
-action=
-filename=
-
-case $1 in
- openfilename)
- action=openfilename
- ;;
-
- openfilenamelist)
- action=openfilenamelist
- ;;
-
- savefilename)
- action=savefilename
- ;;
-
- directory)
- action=directory
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-while [ $# -gt 0 ] ; do
- parm=$1
- shift
-
- case $parm in
- --title)
- if [ -z "$1" ] ; then
- exit_failure_syntax "TITLE argument missing for --title"
- fi
- TITLE="$1"
- shift
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$filename" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- filename="$parm"
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-detectDE
-
-if [ "$action" = "openfilename" ]; then
- case "$DE" in
- kde)
- open_kde "$filename"
- ;;
-
- gnome|xfce)
- open_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a filename dialog"
- ;;
- esac
-elif [ "$action" = "openfilenamelist" ]; then
- case "$DE" in
- kde)
- open_multi_kde "$filename"
- ;;
-
- gnome|xfce)
- open_multi_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a filename dialog"
- ;;
- esac
-elif [ "$action" = "savefilename" ]; then
- case "$DE" in
- kde)
- save_kde "$filename"
- ;;
-
- gnome|xfce)
- save_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a filename dialog"
- ;;
- esac
-elif [ "$action" = "directory" ]; then
- case "$DE" in
- kde)
- directory_kde "$filename"
- ;;
-
- gnome|xfce)
- directory_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a directory dialog"
- ;;
- esac
-fi
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-file-dialog.in b/chromium/third_party/xdg-utils/scripts/xdg-file-dialog.in
deleted file mode 100644
index 14fc102c04d..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-file-dialog.in
+++ /dev/null
@@ -1,365 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-file-dialog
-#
-# Utility script to file selection dialogs
-# on XDG compliant systems.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-open_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --getopenfilename "$1" ""
- else
- $DIALOG --getopenfilename "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-open_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd `dirname "$1"` 2>/dev/null
- FILENAME=`basename "$1"`
- if [ x"$FILENAME" != x"" ]; then
- FILENAME="--filename=""$FILENAME"
- fi
- fi
-
- if [ x"$FILENAME" != x"" ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --file-selection "$FILENAME"
- else
- $DIALOG --file-selection "$FILENAME"
- fi
- else
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --file-selection
- else
- $DIALOG --file-selection
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-open_multi_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --multiple --separate-output \
- --getopenfilename "$1" ""
- else
- $DIALOG --multiple --separate-output --getopenfilename "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-open_multi_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd `dirname "$1"` 2>/dev/null
- FILENAME=`basename "$1"`
- if [ x"$FILENAME" != x"" ]; then
- FILENAME="--filename=""$FILENAME"
- fi
- fi
-
- if [ x"$FILENAME" != x"" ]; then
- if [ x"$TITLE" != x"" ]; then
- LIST=`$DIALOG --title "$TITLE" --multiple --file-selection "$FILENAME"`
- else
- LIST=`$DIALOG --multiple --file-selection "$FILENAME"`
- fi
- else
- if [ x"$TITLE" != x"" ]; then
- LIST=`$DIALOG --title "$TITLE" --multiple --file-selection`
- else
- LIST=`$DIALOG --multiple --file-selection`
- fi
- fi
-
- if [ $? -eq 0 ]; then
- echo "$LIST" | sed s#'|'#\\n#g
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-save_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --getsavefilename "$1" ""
- else
- $DIALOG --getsavefilename "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-save_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd `dirname "$1"` 2>/dev/null
- FILENAME=`basename "$1"`
- if [ x"$FILENAME" != x"" ]; then
- FILENAME="--filename=""$FILENAME"
- fi
- fi
-
- if [ x"$FILENAME" != x"" ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --save --file-selection "$FILENAME"
- else
- $DIALOG --save --file-selection "$FILENAME"
- fi
- else
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --save --file-selection
- else
- $DIALOG --save --file-selection
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-directory_kde()
-{
- DIALOG=`which kdialog`
- if [ $? -eq 0 ]; then
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --getexistingdirectory "$1" ""
- else
- $DIALOG --getexistingdirectory "$1" ""
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-directory_zenity()
-{
- DIALOG=`which zenity`
- if [ $? -eq 0 ]; then
- if [ x"$1" != x"" ]; then
- cd "$1" 2>/dev/null
- fi
-
- if [ x"$TITLE" != x"" ]; then
- $DIALOG --title "$TITLE" --directory --file-selection
- else
- $DIALOG --directory --file-selection
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-TITLE=
-action=
-filename=
-
-case $1 in
- openfilename)
- action=openfilename
- ;;
-
- openfilenamelist)
- action=openfilenamelist
- ;;
-
- savefilename)
- action=savefilename
- ;;
-
- directory)
- action=directory
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --title)
- if [ -z "$1" ] ; then
- exit_failure_syntax "TITLE argument missing for --title"
- fi
- TITLE="$1"
- shift
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$filename" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- filename="$parm"
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-detectDE
-
-if [ "$action" = "openfilename" ]; then
- case "$DE" in
- kde)
- open_kde "$filename"
- ;;
-
- gnome*|xfce|lxde)
- open_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a filename dialog"
- ;;
- esac
-elif [ "$action" = "openfilenamelist" ]; then
- case "$DE" in
- kde)
- open_multi_kde "$filename"
- ;;
-
- gnome*|xfce|lxde)
- open_multi_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a filename dialog"
- ;;
- esac
-elif [ "$action" = "savefilename" ]; then
- case "$DE" in
- kde)
- save_kde "$filename"
- ;;
-
- gnome*|xfce|lxde)
- save_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a filename dialog"
- ;;
- esac
-elif [ "$action" = "directory" ]; then
- case "$DE" in
- kde)
- directory_kde "$filename"
- ;;
-
- gnome*|xfce|lxde)
- directory_zenity "$filename"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening a directory dialog"
- ;;
- esac
-fi
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-icon-resource b/chromium/third_party/xdg-utils/scripts/xdg-icon-resource
deleted file mode 100755
index 215c5ab3d6b..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-icon-resource
+++ /dev/null
@@ -1,952 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-icon-resource
-#
-# Utility script to install icons on a Linux desktop.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-icon-resource - command line tool for (un)installing icon resources
-
-Synopsis
-
-xdg-icon-resource install [--noupdate] [--novendor] [--theme theme] [--context
-context] [--mode mode] --size size icon-file [icon-name]
-
-xdg-icon-resource uninstall [--noupdate] [--theme theme] [--context context]
-[--mode mode] --size size icon-name
-
-xdg-icon-resource forceupdate [--theme theme] [--mode mode]
-
-xdg-icon-resource { --help | --manual | --version }
-
-Description
-
-The xdg-icon-resource program can be used to install icon resources into the
-desktop icon system in order to illustrate menu entries, to depict desktop
-icons or to graphically represent file types.
-
-The desktop icon system identifies icons by name. Depending on the required
-size, the choice of icon theme and the context in which the icon is used, the
-desktop icon system locates an appropriate icon resource to depict an icon.
-Icon resources can be XPM files or PNG files.
-
-The desktop icon system works according to the XDG Icon Theme Specification at
-http://www.freedesktop.org/Standards/icon-theme-spec
-
-Commands
-
-install
- Installs the icon file indicated by icon-file to the desktop icon system
- 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 or .xpm 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 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.
-
-Options
-
---noupdate
- Postpone updating the desktop icon system. If multiple icons are added in
- sequence this flag can be used to indicate that additional changes will
- follow and that it is not necassery to update the desktop icon system right
- away.
---novendor
-
- Normally, xdg-icon-resource checks to ensure that an icon file to be
- installed in the apps context has a proper vendor prefix. This option can
- be used to disable that check.
-
- 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.
-
---theme theme
- Installs or removes the icon file as part of theme. If no theme is
- specified the icons will be installed as part of the default hicolor theme.
- Applications may install icons under multiple themes but should at least
- install icons for the default hicolor theme.
---context context
- Specifies the context for the icon. Icons to be used in the application
- menu and as desktop icon should use apps as context which is the default
- context. Icons to be used as file icons should use mimetypes as context.
- Other common contexts are actions, devices, emblems, filesystems and stock.
---size size
- Specifies the size of the icon. All icons must be square. Common sizes for
- icons in the apps context are: 16, 22, 32, 48, 64 and 128. Common sizes for
- icons in the mimetypes context are: 16, 22, 32, 48, 64 and 128
---mode mode
-
- mode can be user or system. In user mode the file is (un)installed for the
- current user only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in system mode.
-
- The default is to use system mode when called by root and to use user mode
- when called by a non-root user.
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Environment Variables
-
-xdg-icon-resource honours the following environment variables:
-
-XDG_UTILS_DEBUG_LEVEL
- Setting this environment variable to a non-zero numerical value makes
- xdg-icon-resource do more verbose reporting on stderr. Setting a higher
- value increases the verbosity.
-XDG_UTILS_INSTALL_MODE
- This environment variable can be used by the user or administrator to
- override the installation mode. Valid values are user and system.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-5
- No permission to read one of the files passed on the command line.
-
-See Also
-
-xdg-desktop-icon(1), xdg-desktop-menu(1), xdg-mime(1)
-
-Examples
-
-To install an icon resource to depict a launcher for the application myfoobar,
-the company ShinyThings Inc. can use:
-
-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
-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 but with
-different sizes.
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-icon-resource - command line tool for (un)installing icon resources
-
-Synopsis
-
-xdg-icon-resource install [--noupdate] [--novendor] [--theme theme] [--context
-context] [--mode mode] --size size icon-file [icon-name]
-
-xdg-icon-resource uninstall [--noupdate] [--theme theme] [--context context]
-[--mode mode] --size size icon-name
-
-xdg-icon-resource forceupdate [--theme theme] [--mode mode]
-
-xdg-icon-resource { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-icon-resource: $@" >&2
- echo "Try 'xdg-icon-resource --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-icon-resource' or 'xdg-icon-resource --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-icon-resource: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-icon-resource: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-icon-resource: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-icon-resource: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-icon-resource: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-icon-resource: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-icon-resource --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-icon-resource' or 'xdg-icon-resource --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-icon-resource 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-# Set GTK_UPDATE_ICON_CACHE to gtk-update-icon-cache executable path or
-# to "-" if not found.
-GTK_UPDATE_ICON_CACHE=
-find_gtk_update_icon_cache()
-{
- [ -n "$GTK_UPDATE_ICON_CACHE" ] && return;
-
- GTK_UPDATE_ICON_CACHE="-"
- 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 "Found $x/gtk-update-icon-cache"
- GTK_UPDATE_ICON_CACHE="$x/gtk-update-icon-cache"
- return
- fi
- done
-}
-
-# Start GNOME legacy workaround section
-need_dot_icon_path()
-{
- # GTK < 2.6 uses ~/.icons but not XDG_DATA_HOME/icons
- # The availability of gtk-update-icon-cache is used as indication
- # of whether the system is using GTK 2.6 or later
- find_gtk_update_icon_cache
- [ "$GTK_UPDATE_ICON_CACHE" != "-" ] && return 1;
- return 0;
-}
-
-update_icon_database()
-{
- # Touch me, I'm dirty
- touch "$1/.xdg-icon-resource-dummy"
- rm -f "$1/.xdg-icon-resource-dummy"
-
- # Don't create a cache if there wan't one already
- if [ -f "$1/icon-theme.cache" ] ; then
- find_gtk_update_icon_cache
- if [ "$GTK_UPDATE_ICON_CACHE" != "-" ] ; then
- DEBUG 1 "Running $GTK_UPDATE_ICON_CACHE -f -t \"$1\""
- eval '$GTK_UPDATE_ICON_CACHE -f -t "$1"'$xdg_redirect_output
- return
- fi
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-mode=
-action=
-update=yes
-size=
-theme=hicolor
-context=apps
-icon_file=
-icon_name=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- forceupdate)
- action=forceupdate
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case $parm in
- --noupdate)
- update=no
- ;;
-
- --mode)
- if [ -z "$1" ] ; then
- exit_failure_syntax "mode argument missing for --mode"
- fi
- case "$1" in
- user)
- mode="user"
- ;;
-
- system)
- mode="system"
- ;;
-
- *)
- exit_failure_syntax "unknown mode '$1'"
- ;;
- esac
- shift
- ;;
-
- --theme)
- if [ -z "$1" ] ; then
- exit_failure_syntax "theme argument missing for --theme"
- fi
- theme="$1"
- shift
- ;;
-
- --size)
- if [ -z "$1" ] ; then
- exit_failure_syntax "size argument missing for --size"
- fi
- if echo "$1" | grep '[^0-9]' > /dev/null 2> /dev/null; then
- exit_failure_syntax "size argument must be numeric"
- fi
- size="$1"
- shift
- ;;
-
- --context)
- if [ -z "$1" ] ; then
- exit_failure_syntax "context argument missing for --context"
- fi
- context="$1"
- shift
- ;;
-
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$icon_name" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- elif [ -n "$icon_file" ] ; then
- icon_name="$parm"
- else
- if [ "$action" = "install" ] ; then
- check_input_file "$parm"
- fi
- icon_file="$parm"
- fi
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-# Shouldn't happen
-if [ -z "$context" ] ; then
- exit_failure_syntax "context argument missing"
-fi
-
-if [ -n "$XDG_UTILS_INSTALL_MODE" ] ; then
- if [ "$XDG_UTILS_INSTALL_MODE" = "system" ] ; then
- mode="system"
- elif [ "$XDG_UTILS_INSTALL_MODE" = "user" ] ; then
- mode="user"
- fi
-fi
-
-if [ -z "$mode" ] ; then
- if [ `whoami` = "root" ] ; then
- mode="system"
- else
- mode="user"
- fi
-fi
-
-xdg_dir_name="icons/$theme"
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-xdg_user_prefix="$xdg_user_dir/icons"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_global_dir=
-xdg_global_prefix=
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs="/usr/local/share/:/usr/share/"
-for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_prefix="$x/icons"
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-[ -w $xdg_global_dir ] || xdg_global_dir=
-
-dot_icon_dir=
-dot_base_dir=
-if [ x"$mode" = x"user" ] ; then
- xdg_base_dir="$xdg_user_dir"
- #Gnome 2.8 supports ~/.icons but not XDG_DATA_HOME
- if need_dot_icon_path ; then
- dot_icon_dir="$HOME/.icons"
- dot_base_dir="$dot_icon_dir/$theme"
- fi
-else
- xdg_base_dir="$xdg_global_dir"
- if [ -z "$xdg_base_dir" ] ; then
- exit_failure_operation_impossible "No writable system icon directory found."
- fi
-fi
-
-if [ x"$action" = x"forceupdate" ] ; then
- if [ -n "$icon_file" ] ; then
- exit_failure_syntax "unexpected argument '$icon_file'"
- fi
- update_icon_database $xdg_base_dir
- if [ -n "$dot_icon_dir" ] ; then
- if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then
- update_icon_database $dot_base_dir
- fi
- fi
- exit_success
-fi
-
-if [ -z "$icon_file" ] ; then
- if [ x"$action" = x"install" ] ; then
- exit_failure_syntax "icon-file argument missing"
- else
- exit_failure_syntax "icon-name argument missing"
- fi
-fi
-
-xdg_size_name=
-extension=
-
-if [ -z "$size" ] ; then
- exit_failure_syntax "the icon size must be specified with --size"
-fi
-xdg_size_name="${size}x${size}"
-
-if [ x"$action" = x"install" ] ; then
- case $icon_file in
- *.xpm)
- extension="xpm"
- ;;
- *.png)
- extension="png"
- ;;
- *)
- exit_failure_syntax "icon file to install must be a *.png or *.xpm file"
- ;;
- esac
-fi
-
-if [ -n "$icon_name" ] ; then
- case $icon_name in
- *.png)
- exit_failure_syntax "icon name should not include an extension"
- ;;
- *.xpm)
- exit_failure_syntax "icon name should not include an extension"
- ;;
- esac
-fi
-
-# Start KDE legacy workaround section
-need_kde_icon_path()
-{
- local path
- path=`readlink -f "$1" 2> /dev/null` # Normalize path
- DEBUG 2 "need_kde_icon_path $path"
- if [ -z "$path" ] ; then
- DEBUG 2 "need_kde_icon_path RETURN 1 (not needed, no xdg icon dir)"
- return 1; # Not needed
- fi
-
- # if kde-config not found... return 0
- kde_icon_dirs=`kde${KDE_SESSION_VERSION}-config --path icon 2> /dev/null |sed 's/:/ /g'`
- DEBUG 3 "kde_icon_dirs: $kde_icon_dirs"
- if [ -z "$kde_icon_dirs" ] ; then
- DEBUG 3 "no result from kde${KDE_SESSION_VERSION}-config --path icon"
- DEBUG 2 "need_kde_icon_path RETURN 1 (not needed, no kde icon path)"
- return 1; # Not needed
- fi
- needed=0 # Needed
- for y in $kde_icon_dirs ; do
- x=`readlink -f "$y"` # Normalize path
- DEBUG 3 "Normalize $y --> $x"
- if [ -n "$x" ] ; then
- if [ "$x" = "$path" ] ; then
- needed=1 # Not needed
- fi
- if [ -w "$x" ] ; then
- kde_global_prefix="$x"
- # Take last writable dir
- fi
- fi
- done
- DEBUG 2 "kde_global_prefix: $kde_global_prefix"
- [ $needed -eq "1" ] && DEBUG 2 "need_kde_icon_path RETURN $needed (not needed)"
- [ $needed -eq "0" ] && DEBUG 2 "need_kde_icon_path RETURN $needed (needed)"
- return $needed
-}
-
-kde_dir=
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_base_dir/$xdg_size_name/$context"
- #KDE 3.x doesn't support XDG_DATA_HOME for icons
- #Check if xdg_dir prefix is listed by kde-config --path icon
- #If not, install additional symlink to kdedir
- if need_kde_icon_path "$xdg_user_prefix" ; then
- kde_user_icon_dir=`kde${KDE_SESSION_VERSION}-config --path icon | cut -d ':' -f 1`
- kde_user_dir="$kde_user_icon_dir/$theme"
- kde_dir="$kde_user_dir/$xdg_size_name/$context"
- fi
- #Gnome 2.8 supports ~/.icons but not XDG_DATA_HOME
- if [ -n "$dot_icon_dir" ] ; then
- if [ -L "$dot_icon_dir" ] ; then
- # Don't do anything
- dot_icon_dir=
- elif [ ! -d "$dot_icon_dir/" ] ; then
- # Symlink if it doesn't exist
- eval 'ln -s ".local/share/icons" "$dot_icon_dir"'$xdg_redirect_output
- dot_icon_dir=
- else
- dot_icon_dir="$dot_icon_dir/$theme/$xdg_size_name/$context"
- fi
- fi
- my_umask=077
-else
- xdg_dir="$xdg_base_dir/$xdg_size_name/$context"
- #KDE 3.x doesn't support XDG_DATA_DIRS for icons
- #Check if xdg_dir prefix is listed by kde-config --path icon
- #If not, install additional symlink to kdedir
- if need_kde_icon_path "$xdg_global_prefix" ; then
- kde_global_dir="$kde_global_prefix/$theme"
- kde_dir="$kde_global_dir/$xdg_size_name/$context"
- fi
- my_umask=022
-fi
-# End KDE legacy workaround section
-
-# Start GNOME legacy workaround section
-need_gnome_mime=
-[ $context = "mimetypes" ] && need_gnome_mime=true
-# End GNOME legacy workaround section
-
-[ -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" "icon name"
-fi
-
-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"
-[ -n "$kde_dir" ] && DEBUG 1 "$action symlink in $kde_dir (KDE 3.x support)"
-[ -n "$need_gnome_mime" ] && DEBUG 1 "$action gnome-mime-$icon_name symlink (GNOME 2.x support)"
-[ $action = "install" -a -n "$dot_icon_dir" ] && DEBUG 1 "$action ~/.icons symlink (GNOME 2.8 support)"
-
-case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for icon_dir in $xdg_dir $dot_icon_dir; do
- mkdir -p $icon_dir
- eval 'cp "$icon_file" "$icon_dir/$icon_name.$extension"'$xdg_redirect_output
- if [ -f "$icon_icon_file" ] ; then
- eval 'cp "$icon_icon_file" "$icon_dir/$icon_icon_name"'$xdg_redirect_output
- fi
- if [ -n "$need_gnome_mime" ] ; then
- eval 'ln -s "$icon_name.$extension" "$icon_dir/gnome-mime-$icon_name.$extension"'$xdg_redirect_output
- fi
- done
- if [ -n "$kde_dir" ] ; then
- mkdir -p $kde_dir
- eval 'ln -s "$xdg_dir/$icon_name.$extension" "$kde_dir/$icon_name.$extension"'$xdg_redirect_output
- fi
-
- umask $save_umask
- ;;
-
- uninstall)
- for icon_dir in $xdg_dir $dot_icon_dir; do
- rm -f "$icon_dir/$icon_name.xpm" "$icon_dir/$icon_name.png"
- rm -f "$icon_dir/$icon_icon_name"
- if [ -n "$need_gnome_mime" ] ; then
- rm -f "$icon_dir/gnome-mime-$icon_name.xpm"
- rm -f "$icon_dir/gnome-mime-$icon_name.png"
- fi
- done
- if [ -n "$kde_dir" ] ; then
- rm -f "$kde_dir/$icon_name.xpm" "$kde_dir/$icon_name.png"
- fi
-
- ;;
-esac
-
-if [ x"$update" = x"yes" ] ; then
- update_icon_database "$xdg_base_dir"
- if [ -n "$dot_icon_dir" ] ; then
- if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then
- update_icon_database $dot_base_dir
- fi
- fi
-fi
-
-exit_success
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-icon-resource.in b/chromium/third_party/xdg-utils/scripts/xdg-icon-resource.in
deleted file mode 100644
index ca81a8bbfba..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-icon-resource.in
+++ /dev/null
@@ -1,450 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-icon-resource
-#
-# Utility script to install icons on a Linux desktop.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-# Set GTK_UPDATE_ICON_CACHE to gtk-update-icon-cache executable path or
-# to "-" if not found.
-GTK_UPDATE_ICON_CACHE=
-find_gtk_update_icon_cache()
-{
- [ -n "$GTK_UPDATE_ICON_CACHE" ] && return;
-
- GTK_UPDATE_ICON_CACHE="-"
- 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 "Found $x/gtk-update-icon-cache"
- GTK_UPDATE_ICON_CACHE="$x/gtk-update-icon-cache"
- return
- fi
- done
-}
-
-# Start GNOME legacy workaround section
-need_dot_icon_path()
-{
- # GTK < 2.6 uses ~/.icons but not XDG_DATA_HOME/icons
- # The availability of gtk-update-icon-cache is used as indication
- # of whether the system is using GTK 2.6 or later
- find_gtk_update_icon_cache
- [ "$GTK_UPDATE_ICON_CACHE" != "-" ] && return 1;
- return 0;
-}
-
-update_icon_database()
-{
- # Touch me, I'm dirty
- touch "$1/.@NAME@-dummy"
- rm -f "$1/.@NAME@-dummy"
-
- # Don't create a cache if there wan't one already
- if [ -f "$1/icon-theme.cache" ] ; then
- find_gtk_update_icon_cache
- if [ "$GTK_UPDATE_ICON_CACHE" != "-" ] ; then
- DEBUG 1 "Running $GTK_UPDATE_ICON_CACHE -f -t \"$1\""
- eval '$GTK_UPDATE_ICON_CACHE -f -t "$1"'$xdg_redirect_output
- return
- fi
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-mode=
-action=
-update=yes
-size=
-theme=hicolor
-context=apps
-icon_file=
-icon_name=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- forceupdate)
- action=forceupdate
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case $parm in
- --noupdate)
- update=no
- ;;
-
- --mode)
- if [ -z "$1" ] ; then
- exit_failure_syntax "mode argument missing for --mode"
- fi
- case "$1" in
- user)
- mode="user"
- ;;
-
- system)
- mode="system"
- ;;
-
- *)
- exit_failure_syntax "unknown mode '$1'"
- ;;
- esac
- shift
- ;;
-
- --theme)
- if [ -z "$1" ] ; then
- exit_failure_syntax "theme argument missing for --theme"
- fi
- theme="$1"
- shift
- ;;
-
- --size)
- if [ -z "$1" ] ; then
- exit_failure_syntax "size argument missing for --size"
- fi
- if echo "$1" | grep '[^0-9]' > /dev/null 2> /dev/null; then
- exit_failure_syntax "size argument must be numeric"
- fi
- size="$1"
- shift
- ;;
-
- --context)
- if [ -z "$1" ] ; then
- exit_failure_syntax "context argument missing for --context"
- fi
- context="$1"
- shift
- ;;
-
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$icon_name" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- elif [ -n "$icon_file" ] ; then
- icon_name="$parm"
- else
- if [ "$action" = "install" ] ; then
- check_input_file "$parm"
- fi
- icon_file="$parm"
- fi
- ;;
- esac
-done
-
-# Shouldn't happen
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-# Shouldn't happen
-if [ -z "$context" ] ; then
- exit_failure_syntax "context argument missing"
-fi
-
-if [ -n "$XDG_UTILS_INSTALL_MODE" ] ; then
- if [ "$XDG_UTILS_INSTALL_MODE" = "system" ] ; then
- mode="system"
- elif [ "$XDG_UTILS_INSTALL_MODE" = "user" ] ; then
- mode="user"
- fi
-fi
-
-if [ -z "$mode" ] ; then
- if [ `whoami` = "root" ] ; then
- mode="system"
- else
- mode="user"
- fi
-fi
-
-xdg_dir_name="icons/$theme"
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-xdg_user_prefix="$xdg_user_dir/icons"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_global_dir=
-xdg_global_prefix=
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs="/usr/local/share/:/usr/share/"
-for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do
- if [ -w $x/$xdg_dir_name ] ; then
- xdg_global_prefix="$x/icons"
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-[ -w $xdg_global_dir ] || xdg_global_dir=
-
-dot_icon_dir=
-dot_base_dir=
-if [ x"$mode" = x"user" ] ; then
- xdg_base_dir="$xdg_user_dir"
- #Gnome 2.8 supports ~/.icons but not XDG_DATA_HOME
- if need_dot_icon_path ; then
- dot_icon_dir="$HOME/.icons"
- dot_base_dir="$dot_icon_dir/$theme"
- fi
-else
- xdg_base_dir="$xdg_global_dir"
- if [ -z "$xdg_base_dir" ] ; then
- exit_failure_operation_impossible "No writable system icon directory found."
- fi
-fi
-
-if [ x"$action" = x"forceupdate" ] ; then
- if [ -n "$icon_file" ] ; then
- exit_failure_syntax "unexpected argument '$icon_file'"
- fi
- update_icon_database $xdg_base_dir
- if [ -n "$dot_icon_dir" ] ; then
- if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then
- update_icon_database $dot_base_dir
- fi
- fi
- exit_success
-fi
-
-if [ -z "$icon_file" ] ; then
- if [ x"$action" = x"install" ] ; then
- exit_failure_syntax "icon-file argument missing"
- else
- exit_failure_syntax "icon-name argument missing"
- fi
-fi
-
-xdg_size_name=
-extension=
-
-if [ -z "$size" ] ; then
- exit_failure_syntax "the icon size must be specified with --size"
-fi
-xdg_size_name="${size}x${size}"
-
-if [ x"$action" = x"install" ] ; then
- case $icon_file in
- *.xpm)
- extension="xpm"
- ;;
- *.png)
- extension="png"
- ;;
- *)
- exit_failure_syntax "icon file to install must be a *.png or *.xpm file"
- ;;
- esac
-fi
-
-if [ -n "$icon_name" ] ; then
- case $icon_name in
- *.png)
- exit_failure_syntax "icon name should not include an extension"
- ;;
- *.xpm)
- exit_failure_syntax "icon name should not include an extension"
- ;;
- esac
-fi
-
-# Start KDE legacy workaround section
-need_kde_icon_path()
-{
- local path
- path=`readlink -f "$1" 2> /dev/null` # Normalize path
- DEBUG 2 "need_kde_icon_path $path"
- if [ -z "$path" ] ; then
- DEBUG 2 "need_kde_icon_path RETURN 1 (not needed, no xdg icon dir)"
- return 1; # Not needed
- fi
-
- # if kde-config not found... return 0
- kde_icon_dirs=`kde${KDE_SESSION_VERSION}-config --path icon 2> /dev/null |sed 's/:/ /g'`
- DEBUG 3 "kde_icon_dirs: $kde_icon_dirs"
- if [ -z "$kde_icon_dirs" ] ; then
- DEBUG 3 "no result from kde${KDE_SESSION_VERSION}-config --path icon"
- DEBUG 2 "need_kde_icon_path RETURN 1 (not needed, no kde icon path)"
- return 1; # Not needed
- fi
- needed=0 # Needed
- for y in $kde_icon_dirs ; do
- x=`readlink -f "$y"` # Normalize path
- DEBUG 3 "Normalize $y --> $x"
- if [ -n "$x" ] ; then
- if [ "$x" = "$path" ] ; then
- needed=1 # Not needed
- fi
- if [ -w "$x" ] ; then
- kde_global_prefix="$x"
- # Take last writable dir
- fi
- fi
- done
- DEBUG 2 "kde_global_prefix: $kde_global_prefix"
- [ $needed -eq "1" ] && DEBUG 2 "need_kde_icon_path RETURN $needed (not needed)"
- [ $needed -eq "0" ] && DEBUG 2 "need_kde_icon_path RETURN $needed (needed)"
- return $needed
-}
-
-kde_dir=
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_base_dir/$xdg_size_name/$context"
- #KDE 3.x doesn't support XDG_DATA_HOME for icons
- #Check if xdg_dir prefix is listed by kde-config --path icon
- #If not, install additional symlink to kdedir
- if need_kde_icon_path "$xdg_user_prefix" ; then
- kde_user_icon_dir=`kde${KDE_SESSION_VERSION}-config --path icon | cut -d ':' -f 1`
- kde_user_dir="$kde_user_icon_dir/$theme"
- kde_dir="$kde_user_dir/$xdg_size_name/$context"
- fi
- #Gnome 2.8 supports ~/.icons but not XDG_DATA_HOME
- if [ -n "$dot_icon_dir" ] ; then
- if [ -L "$dot_icon_dir" ] ; then
- # Don't do anything
- dot_icon_dir=
- elif [ ! -d "$dot_icon_dir/" ] ; then
- # Symlink if it doesn't exist
- eval 'ln -s ".local/share/icons" "$dot_icon_dir"'$xdg_redirect_output
- dot_icon_dir=
- else
- dot_icon_dir="$dot_icon_dir/$theme/$xdg_size_name/$context"
- fi
- fi
- my_umask=077
-else
- xdg_dir="$xdg_base_dir/$xdg_size_name/$context"
- #KDE 3.x doesn't support XDG_DATA_DIRS for icons
- #Check if xdg_dir prefix is listed by kde-config --path icon
- #If not, install additional symlink to kdedir
- if need_kde_icon_path "$xdg_global_prefix" ; then
- kde_global_dir="$kde_global_prefix/$theme"
- kde_dir="$kde_global_dir/$xdg_size_name/$context"
- fi
- my_umask=022
-fi
-# End KDE legacy workaround section
-
-# Start GNOME legacy workaround section
-need_gnome_mime=
-[ $context = "mimetypes" ] && need_gnome_mime=true
-# End GNOME legacy workaround section
-
-[ -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" "icon name"
-fi
-
-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"
-[ -n "$kde_dir" ] && DEBUG 1 "$action symlink in $kde_dir (KDE 3.x support)"
-[ -n "$need_gnome_mime" ] && DEBUG 1 "$action gnome-mime-$icon_name symlink (GNOME 2.x support)"
-[ $action = "install" -a -n "$dot_icon_dir" ] && DEBUG 1 "$action ~/.icons symlink (GNOME 2.8 support)"
-
-case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for icon_dir in $xdg_dir $dot_icon_dir; do
- mkdir -p $icon_dir
- eval 'cp "$icon_file" "$icon_dir/$icon_name.$extension"'$xdg_redirect_output
- if [ -f "$icon_icon_file" ] ; then
- eval 'cp "$icon_icon_file" "$icon_dir/$icon_icon_name"'$xdg_redirect_output
- fi
- if [ -n "$need_gnome_mime" ] ; then
- eval 'ln -s "$icon_name.$extension" "$icon_dir/gnome-mime-$icon_name.$extension"'$xdg_redirect_output
- fi
- done
- if [ -n "$kde_dir" ] ; then
- mkdir -p $kde_dir
- eval 'ln -s "$xdg_dir/$icon_name.$extension" "$kde_dir/$icon_name.$extension"'$xdg_redirect_output
- fi
-
- umask $save_umask
- ;;
-
- uninstall)
- for icon_dir in $xdg_dir $dot_icon_dir; do
- rm -f "$icon_dir/$icon_name.xpm" "$icon_dir/$icon_name.png"
- rm -f "$icon_dir/$icon_icon_name"
- if [ -n "$need_gnome_mime" ] ; then
- rm -f "$icon_dir/gnome-mime-$icon_name.xpm"
- rm -f "$icon_dir/gnome-mime-$icon_name.png"
- fi
- done
- if [ -n "$kde_dir" ] ; then
- rm -f "$kde_dir/$icon_name.xpm" "$kde_dir/$icon_name.png"
- fi
-
- ;;
-esac
-
-if [ x"$update" = x"yes" ] ; then
- update_icon_database "$xdg_base_dir"
- if [ -n "$dot_icon_dir" ] ; then
- if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then
- update_icon_database $dot_base_dir
- fi
- fi
-fi
-
-exit_success
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-mime b/chromium/third_party/xdg-utils/scripts/xdg-mime
deleted file mode 100755
index e0d97993c64..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-mime
+++ /dev/null
@@ -1,1402 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-mime
-#
-# Utility script to manipulate MIME related information
-# on XDG compliant systems.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-mime - command line tool for querying information about file type handling
-and adding descriptions for new file types
-
-Synopsis
-
-xdg-mime query { filetype | default } ...
-
-xdg-mime default application mimetype(s)
-
-xdg-mime install [--mode mode] [--novendor] mimetypes-file
-
-xdg-mime uninstall [--mode mode] mimetypes-file
-
-xdg-mime { --help | --manual | --version }
-
-Description
-
-The xdg-mime program can be used to query information about file types and to
-add descriptions for new file types.
-
-Commands
-
-query
-
- Returns information related to file types.
-
- The query option is for use inside a desktop session only. It is not
- recommended to use xdg-mime query as root.
-
- The following queries are supported:
-
- query filetype FILE: Returns the file type of FILE in the form of a MIME
- type.
-
- query default mimetype: Returns the default application that the desktop
- environment uses for opening files of type mimetype. The default
- application is identified by its *.desktop file.
-
-default
-
- Ask the desktop environment to make application the default application for
- opening files of type mimetype. An application can be made the default for
- several file types by specifying multiple mimetypes.
-
- application is the desktop file id of the application and has the form
- vendor-name.desktop application must already be installed in the desktop
- menu before it can be made the default handler. The aplication's desktop
- file must list support for all the MIME types that it wishes to be the
- default handler for.
-
- Requests to make an application a default handler may be subject to system
- policy or approval by the end-user. xdg-mime query can be used to verify
- whether an application is the actual default handler for a specific file
- type.
-
- The default option is for use inside a desktop session only. It is not
- recommended to use xdg-mime default as root.
-
-install
- Adds the file type descriptions provided in mimetypes-file to the desktop
- environment. mimetypes-file must be a XML file that follows the
- freedesktop.org Shared MIME-info Database specification and that has a
- mime-info element as its document root. For each new file type one or more
- icons with name type-subtype must be installed with the xdg-icon-resource
- command in the mimetypes context. For example the filetype application/
- vnd.oasis.opendocument.text requires an icon named
- application-vnd.oasis.opendocument.text to be installed (unless the file
- type recommends another icon name).
-uninstall
- Removes the file type descriptions provided in mimetypes-file and
- previously added with xdg-mime install from the desktop environment.
- mimetypes-file must be a XML file that follows the freedesktop.org Shared
- MIME-info Database specification and that has a mime-info element as its
- document root.
-
-Options
-
---mode mode
-
- mode can be user or system. In user mode the file is (un)installed for the
- current user only. In system mode the file is (un)installed for all users
- on the system. Usually only root is allowed to install in system mode.
-
- The default is to use system mode when called by root and to use user mode
- when called by a non-root user.
-
---novendor
-
- Normally, xdg-mime checks to ensure that the mimetypes-file to be installed
- has a proper vendor prefix. This option can be used to disable that check.
-
- 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.
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Environment Variables
-
-xdg-mime honours the following environment variables:
-
-XDG_UTILS_DEBUG_LEVEL
- Setting this environment variable to a non-zero numerical value makes
- xdg-mime do more verbose reporting on stderr. Setting a higher value
- increases the verbosity.
-XDG_UTILS_INSTALL_MODE
- This environment variable can be used by the user or administrator to
- override the installation mode. Valid values are user and system.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-5
- No permission to read one of the files passed on the command line.
-
-See Also
-
-xdg-icon-resource(1), xdg-desktop-menu(1)
-
-Examples
-
-xdg-mime query filetype /tmp/foobar.png
-
-Prints the MIME type of the file /tmp/foobar.png, in this case image/png
-
-xdg-mime query default image/png
-
-Prints the .desktop filename of the application which is registered to open PNG
-files.
-
-xdg-mime install shinythings-shiny.xml
-
-Adds a file type description for "shiny"-files. "shinythings-" is used as the
-vendor prefix. The file type description could look as folows.
-
-shinythings-shiny.xml:
-
-<?xml version="1.0"?>
-<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
- <mime-type type="text/x-shiny">
- <comment>Shiny new file type</comment>
- <glob pattern="*.shiny"/>
- <glob pattern="*.shi"/>
- </mime-type>
-</mime-info>
-
-An icon for this new file type must also be installed, for example with:
-
-xdg-icon-resource install --context mimetypes --size 64 shiny-file-icon.png text-x-shiny
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-mime - command line tool for querying information about file type handling
-and adding descriptions for new file types
-
-Synopsis
-
-xdg-mime query { filetype | default } ...
-
-xdg-mime default application mimetype(s)
-
-xdg-mime install [--mode mode] [--novendor] mimetypes-file
-
-xdg-mime uninstall [--mode mode] mimetypes-file
-
-xdg-mime { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-mime: $@" >&2
- echo "Try 'xdg-mime --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-mime' or 'xdg-mime --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-mime: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-mime: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-mime: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-mime: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-mime: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-mime: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-mime --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-mime' or 'xdg-mime --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-mime 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-update_mime_database()
-{
- if [ x"$mode" = x"user" -a -n "$DISPLAY" ] ; then
- detectDE
- if [ x"$DE" = x"kde" ] ; then
- DEBUG 1 "Running kbuildsycoca"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- eval 'kbuildsycoca4'$xdg_redirect_output
- else
- eval 'kbuildsycoca'$xdg_redirect_output
- fi
- fi
- fi
- for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do
- if [ -x $x/update-mime-database ] ; then
- DEBUG 1 "Running $x/update-mime-database $1"
- eval '$x/update-mime-database $1'$xdg_redirect_output
- return
- fi
- done
-}
-
-info_kde()
-{
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- DEBUG 1 "Running kmimetypefinder \"$1\""
- kmimetypefinder "$1" 2>/dev/null | head -n 1
- else
- DEBUG 1 "Running kfile \"$1\""
- kfile "$1" 2> /dev/null | head -n 1 | cut -d "(" -f 2 | cut -d ")" -f 1
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-info_gnome()
-{
- if gvfs-info --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gvfs-info \"$1\""
- gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
- elif gnomevfs-info --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gnomevfs-info \"$1\""
- gnomevfs-info --slow-mime "$1" 2> /dev/null | grep "^MIME" | cut -d ":" -f 2 | sed s/"^ "//
- else
- # according to https://bugs.freedesktop.org/show_bug.cgi?id=33094#c5
- # neither gvfs-info or gnomevfs-info are present in a default Ubuntu Natty
- # install, so fallback to info_generic
- info_generic "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-info_generic()
-{
- if mimetype --version >/dev/null 2>&1; then
- DEBUG 1 "Running mimetype -b \"$1\""
- mimetype -b "$1"
- else
- DEBUG 1 "Running file --mime-type \"$1\""
- /usr/bin/file --mime-type "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "//
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-make_default_kde()
-{
- # $1 is vendor-name.desktop
- # $2 is mime/type
- #
- # On KDE 3, add to $KDE_CONFIG_PATH/profilerc:
- # [$2 - 1]
- # Application=$1
- #
- # Remove all [$2 - *] sections, or even better,
- # renumber [$2 - *] sections and remove duplicate
- #
- # On KDE 4, add $2=$1 to $XDG_DATA_APPS/mimeapps.list
- #
- # Example file:
- #
- # [Added Associations]
- # text/plain=kde4-kate.desktop;kde4-kwrite.desktop;
- #
- # [Removed Associations]
- # text/plain=gnome-gedit.desktop;gnu-emacs.desktop;
- vendor="$1"
- mimetype="$2"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- default_dir=`kde4-config --path xdgdata-apps 2> /dev/null | cut -d ':' -f 1`
- default_file="$default_dir/mimeapps.list"
- else
- default_dir=`kde-config --path config 2> /dev/null | cut -d ':' -f 1`
- default_file="$default_dir/profilerc"
- fi
- if [ -z "$default_dir" ]; then
- DEBUG 2 "make_default_kde: No kde runtime detected"
- return
- fi
- DEBUG 2 "make_default_kde $vendor $mimetype"
- DEBUG 1 "Updating $default_file"
- mkdir -p "$default_dir"
- [ -f "$default_file" ] || touch "$default_file"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- [ -f "$default_file" ] || touch "$default_file"
- awk -v application="$vendor" -v mimetype="$mimetype" '
- BEGIN {
- prefix=mimetype "="
- associations=0
- found=0
- blanks=0
- }
- {
- suppress=0
- if (index($0, "[Added Associations]") == 1) {
- associations=1
- } else if (index($0, "[") == 1) {
- if (associations && !found) {
- print prefix application
- found=1
- }
- associations=0
- } else if ($0 == "") {
- blanks++
- suppress=1
- } else if (associations && index($0, prefix) == 1) {
- value=substr($0, length(prefix) + 1, length)
- split(value, apps, ";")
- value=application ";"
- count=0
- for (i in apps) {
- count++
- }
- for (i=0; i < count; i++) {
- if (apps[i] != application && apps[i] != "") {
- value=value apps[i] ";"
- }
- }
- $0=prefix value
- found=1
- }
- if (!suppress) {
- while (blanks > 0) {
- print ""
- blanks--
- }
- print $0
- }
- }
- END {
- if (!found) {
- if (!associations) {
- print "[Added Associations]"
- }
- print prefix application
- }
- while (blanks > 0) {
- print ""
- blanks--
- }
- }
-' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
- eval 'kbuildsycoca4'$xdg_redirect_output
- else
- awk -v application="$vendor" -v mimetype="$mimetype" '
- BEGIN {
- header_start="[" mimetype " - "
- suppress=0
- }
- {
- if (index($0, header_start) == 1 )
- suppress=1
- else
- if (/^\[/) { suppress=0 }
-
- if (!suppress) {
- print $0
- }
- }
- END {
- print ""
- print "[" mimetype " - 1]"
- print "Application=" application
- print "AllowAsDefault=true"
- print "GenericServiceType=Application"
- print "Preference=1"
- print "ServiceType=" mimetype
- }
-' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
- fi
-}
-
-make_default_generic()
-{
- # $1 is vendor-name.desktop
- # $2 is mime/type
- # Add $2=$1 to XDG_DATA_HOME/applications/mimeapps.list
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
- default_file="$xdg_user_dir/applications/mimeapps.list"
- DEBUG 2 "make_default_generic $1 $2"
- DEBUG 1 "Updating $default_file"
- [ -f "$default_file" ] || touch "$default_file"
- awk -v mimetype="$2" -v application="$1" '
- BEGIN {
- prefix=mimetype "="
- indefault=0
- added=0
- blanks=0
- found=0
- }
- {
- suppress=0
- if (index($0, "[Default Applications]") == 1) {
- indefault=1
- found=1
- } else if (index($0, "[") == 1) {
- if (!added && indefault) {
- print prefix application
- added=1
- }
- indefault=0
- } else if ($0 == "") {
- suppress=1
- blanks++
- } else if (indefault && !added && index($0, prefix) == 1) {
- $0=prefix application
- added=1
- }
- if (!suppress) {
- while (blanks > 0) {
- print ""
- blanks--
- }
- print $0
- }
- }
- END {
- if (!added) {
- if (!found) {
- print ""
- print "[Default Applications]"
- }
- print prefix application
- }
- while (blanks > 0) {
- print ""
- blanks--
- }
- }
-' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
-}
-
-defapp_generic()
-{
- MIME="$1"
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
- xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
- xdg_system_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-
- for x in `echo "$xdg_user_dir" | sed 's/:/ /g'`; do
- mimeapps_list="$x/applications/mimeapps.list"
- if [ -f "$mimeapps_list" ] ; then
- DEBUG 2 "Checking $mimeapps_list"
- trader_result=`awk -v mimetype="$MIME" '
- BEGIN {
- prefix=mimetype "="
- indefault=0
- found=0
- }
- {
- if (index($0, "[Default Applications]") == 1) {
- indefault=1
- } else if (index($0, "[") == 1) {
- indefault=0
- } else if (!found && indefault && index($0, prefix) == 1) {
- print substr($0, length(prefix) +1, length)
- found=1
- }
- }
-' $mimeapps_list`
- if [ -n "$trader_result" ] ; then
- echo $trader_result
- exit_success
- fi
- fi
- done
-
- for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do
- DEBUG 2 "Checking $x/applications/defaults.list"
- trader_result=`grep "$MIME=" $x/applications/defaults.list 2> /dev/null | cut -d '=' -f 2 | cut -d ';' -f 1`
- if [ -n "$trader_result" ] ; then
- echo $trader_result
- exit_success
- fi
- done
- exit_success
-}
-
-defapp_kde()
-{
- MIME="$1"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- KTRADER=`which ktraderclient 2> /dev/null`
- MIMETYPE="--mimetype"
- SERVICETYPE="--servicetype"
- else
- KTRADER=`which ktradertest 2> /dev/null`
- fi
- if [ -n "$KTRADER" ] ; then
- DEBUG 1 "Running KDE trader query \"$MIME\" mimetype and \"Application\" servicetype"
- trader_result=`$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null \
- | grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' -f 2`
- if [ -n "$trader_result" ] ; then
- basename "$trader_result"
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- defapp_generic "$1"
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-mode=
-action=
-filename=
-mimetype=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- query)
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "query type argument missing"
- fi
-
- case $1 in
- filetype)
- action=info
-
- filename="$2"
- if [ -z "$filename" ] ; then
- exit_failure_syntax "FILE argument missing"
- fi
- case $filename in
- -*)
- exit_failure_syntax "unexpected option '$filename'"
- ;;
- esac
- check_input_file "$filename"
- filename=`readlink -f -- "$filename"`
- ;;
-
- default)
- action=defapp
- mimetype="$2"
- if [ -z "$mimetype" ] ; then
- exit_failure_syntax "mimetype argument missing"
- fi
- case $mimetype in
- -*)
- exit_failure_syntax "unexpected option '$mimetype'"
- ;;
-
- */*)
- # Ok
- ;;
-
- *)
- exit_failure_syntax "mimetype '$mimetype' is not in the form 'minor/major'"
- ;;
- esac
- ;;
-
- *)
- exit_failure_syntax "unknown query type '$1'"
- ;;
- esac
- ;;
-
- default)
- action=makedefault
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "application argument missing"
- fi
- case $1 in
- -*)
- exit_failure_syntax "unexpected option '$1'"
- ;;
-
- *.desktop)
- filename="$1"
- ;;
-
- *)
- exit_failure_syntax "malformed argument '$1', expected *.desktop"
- ;;
- esac
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-
-if [ "$action" = "makedefault" ]; then
- if [ -z "$1" ] ; then
- exit_failure_syntax "mimetype argument missing"
- fi
-
- while [ $# -gt 0 ] ; do
- case $1 in
- -*)
- exit_failure_syntax "unexpected option '$1'"
- ;;
- esac
- mimetype="$1"
- shift
-
- make_default_kde "$filename" "$mimetype"
- make_default_generic "$filename" "$mimetype"
- done
- exit_success
-fi
-
-if [ "$action" = "info" ]; then
- detectDE
-
- if [ x"$DE" = x"" ]; then
- if [ -x /usr/bin/file ]; then
- DE=generic
- fi
- fi
-
- case "$DE" in
- kde)
- info_kde "$filename"
- ;;
-
- gnome*)
- info_gnome "$filename"
- ;;
-
- *)
- info_generic "$filename"
- ;;
- esac
- exit_failure_operation_impossible "no method available for quering MIME type of '$filename'"
-fi
-
-if [ "$action" = "defapp" ]; then
- detectDE
-
- case "$DE" in
- kde)
- defapp_kde "$mimetype"
- ;;
-
- *)
- defapp_generic "$mimetype"
- ;;
- esac
- exit_failure_operation_impossible "no method available for quering default application for '$mimetype'"
-fi
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case $parm in
- --mode)
- if [ -z "$1" ] ; then
- exit_failure_syntax "mode argument missing for --mode"
- fi
- case "$1" in
- user)
- mode="user"
- ;;
-
- system)
- mode="system"
- ;;
-
- *)
- exit_failure_syntax "unknown mode '$1'"
- ;;
- esac
- shift
- ;;
-
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$filename" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
-
- filename="$parm"
- check_input_file "$filename"
- ;;
- esac
-done
-
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-if [ -n "$XDG_UTILS_INSTALL_MODE" ] ; then
- if [ "$XDG_UTILS_INSTALL_MODE" = "system" ] ; then
- mode="system"
- elif [ "$XDG_UTILS_INSTALL_MODE" = "user" ] ; then
- mode="user"
- fi
-fi
-
-if [ -z "$mode" ] ; then
- if [ `whoami` = "root" ] ; then
- mode="system"
- else
- mode="user"
- fi
-fi
-
-if [ -z "$filename" ] ; then
- exit_failure_syntax "mimetypes-file argument missing"
-fi
-
-if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$filename"
-fi
-
-xdg_base_dir=
-xdg_dir_name=mime/packages/
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-[ x"$mode" = x"user" ] && xdg_base_dir="$xdg_user_dir/mime"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-for x in `echo $xdg_system_dirs | sed 's/:/ /g'`; do
- if [ -w $x/$xdg_dir_name ] ; then
- [ x"$mode" = x"system" ] && xdg_base_dir="$x/mime"
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-[ -w $xdg_global_dir ] || xdg_global_dir=
-DEBUG 3 "xdg_user_dir: $xdg_user_dir"
-DEBUG 3 "xdg_global_dir: $xdg_global_dir"
-
-# Find KDE3 mimelnk directory
-kde_user_dir=
-kde_global_dir=
-kde_global_dirs=`kde${KDE_SESSION_VERSION}-config --path mime 2> /dev/null`
-DEBUG 3 "kde_global_dirs: $kde_global_dirs"
-first=
-for x in `echo $kde_global_dirs | sed 's/:/ /g'` ; do
- if [ -z "$first" ] ; then
- first=false
- kde_user_dir="$x"
- elif [ -w $x ] ; then
- kde_global_dir="$x"
- fi
-done
-DEBUG 3 "kde_user_dir: $kde_user_dir"
-DEBUG 3 "kde_global_dir: $kde_global_dir"
-
-# TODO: Gnome legacy support
-# See http://forums.fedoraforum.org/showthread.php?t=26875
-gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
-[ -w $gnome_global_dir ] || gnome_global_dir=
-DEBUG 3 "gnome_user_dir: $gnome_user_dir"
-DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
-else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system mimetype directory found."
- fi
-fi
-
-# echo "[xdg|$xdg_user_dir|$xdg_global_dir]"
-# echo "[kde|$kde_user_dir|$kde_global_dir]"
-# echo "[gnome|$gnome_user_dir|$gnome_global_dir]"
-# echo "[using|$xdg_dir|$kde_dir|$gnome_dir]"
-
-basefile=`basename "$filename"`
-#[ -z $vendor ] || basefile="$vendor-$basefile"
-
-mimetypes=
-if [ -n "$kde_dir" ] ; then
- DEBUG 2 "KDE3 mimelnk directory found, extracting mimetypes from XML file"
-
- mimetypes=`awk < "$filename" '
-# Strip XML comments
-BEGIN {
- suppress=0
-}
-{
- do
- if (suppress) {
- if (match($0,/-->/)) {
- $0=substr($0,RSTART+RLENGTH)
- suppress=0
- }
- else {
- break
- }
- }
- else {
- if (match($0,/<!--/)) {
- if (RSTART>1) print substr($0,0,RSTART)
- $0=substr($0,RSTART+RLENGTH)
- suppress=1
- }
- else {
- if ($0) print $0
- break
- }
- }
- while(1)
-}
-' | awk '
-# List MIME types listed in <mime-type> tags
-BEGIN {
- RS="<"
-}
-/^mime-info/, /^\/mime-info/ {
- if (match($0,/^mime-type/)) {
- if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) {
- print substr($0,RSTART+6,RLENGTH-6)
- }
- }
-}'`
-fi
-
-DEBUG 1 "$action mimetype in $xdg_dir"
-
-case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in $xdg_dir ; do
- mkdir -p $x
- eval 'cp $filename $x/$basefile'$xdg_redirect_output
- done
-
- if [ -n "$mimetypes" ] ; then
- # No quotes around $mimetypes
- for x in $mimetypes ; do
- DEBUG 1 "Installing $kde_dir/$x.desktop (KDE 3.x support)"
- mkdir -p `dirname $kde_dir/$x.desktop`
- awk < "$filename" '
-# Strip XML comments
-BEGIN {
- suppress=0
-}
-{
- do
- if (suppress) {
- if (match($0,/-->/)) {
- $0=substr($0,RSTART+RLENGTH)
- suppress=0
- }
- else {
- break
- }
- }
- else {
- if (match($0,/<!--/)) {
- if (RSTART>1) print substr($0,0,RSTART)
- $0=substr($0,RSTART+RLENGTH)
- suppress=1
- }
- else {
- if ($0) print $0
- break
- }
- }
- while(1)
-}
-' | awk > $kde_dir/$x.desktop '
-# Extract mimetype $x from the XML file $filename
-# Note that bash requires us to escape a single quote as '"'"'
-BEGIN {
- the_type=ARGV[1]
- the_source=ARGV[2]
- ARGC=1
- RS="<"
- found=0
- glob_patterns=""
-}
-/^mime-info/, /^\/mime-info/ {
- if (match($0,/^mime-type/)) {
- if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) {
- if (substr($0,RSTART+6,RLENGTH-6) == the_type) {
- found=1
- print "[Desktop Entry]"
- print "# Installed by xdg-mime from " the_source
- print "Type=MimeType"
- print "MimeType=" the_type
- the_icon=the_type
- sub("/", "-", the_icon)
- print "Icon=" the_icon
- }
- }
- }
- else if (found) {
- if (match($0,/^\/mime-type/)) {
- if (glob_patterns)
- print "Patterns=" glob_patterns
- exit 0
- }
-
- if (match($0,/^sub-class-of/)) {
- if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) {
- print "X-KDE-IsAlso=" substr($0,RSTART+6,RLENGTH-6)
- }
- else {
- print "Error: '"'"'type'"'"' argument missing in " RS $0
- exit 1
- }
- }
- if (match($0,/^glob/)) {
- if (match($0,/pattern="[^"]*/) || match($0,/pattern='"'"'[^'"'"']*/)) {
- glob_patterns = glob_patterns substr($0,RSTART+9,RLENGTH-9) ";"
- }
- else {
- print "Error: '"'"'pattern'"'"' argument missing in " RS $0
- exit 1
- }
- }
- if (match($0,/^comment/)) {
- if (match($0,/xml:lang="[^"]*/) || match($0,/xml:lang='"'"'[^'"'"']*/)) {
- lang=substr($0,RSTART+10,RLENGTH-10)
- }
- else {
- lang=""
- }
- if (match($0,/>/)) {
- comment=substr($0,RSTART+1)
- sub("&lt;", "<", comment)
- sub("&gt;", ">", comment)
- sub("&amp;", "\\&", comment)
- if (lang)
- print "Comment[" lang "]=" comment
- else
- print "Comment=" comment
- }
- }
- }
-}
-END {
- if (!found) {
- print "Error: Mimetype '"'"'" the_type "'"'"' not found"
- exit 1
- }
-}
-' $x $basefile
- if [ "$?" = "1" ] ; then
- grep -A 10 "^Error:" $kde_dir/$x.desktop >&2
- rm $kde_dir/$x.desktop
- exit 1
- fi
- done
- fi
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in $xdg_dir ; do
- rm -f $x/$basefile
- done
-
- # No quotes around $mimetypes
- for x in $mimetypes ; do
- if grep '^# Installed by xdg-mime' $kde_dir/$x.desktop >/dev/null 2>&1; then
- DEBUG 1 "Removing $kde_dir/$x.desktop (KDE 3.x support)"
- rm -f $kde_dir/$x.desktop
- fi
- done
- ;;
-esac
-
-update_mime_database $xdg_base_dir
-
-exit_success
-
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-mime.in b/chromium/third_party/xdg-utils/scripts/xdg-mime.in
deleted file mode 100644
index 023a465945a..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-mime.in
+++ /dev/null
@@ -1,871 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-mime
-#
-# Utility script to manipulate MIME related information
-# on XDG compliant systems.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-update_mime_database()
-{
- if [ x"$mode" = x"user" -a -n "$DISPLAY" ] ; then
- detectDE
- if [ x"$DE" = x"kde" ] ; then
- DEBUG 1 "Running kbuildsycoca"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- eval 'kbuildsycoca4'$xdg_redirect_output
- else
- eval 'kbuildsycoca'$xdg_redirect_output
- fi
- fi
- fi
- for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do
- if [ -x $x/update-mime-database ] ; then
- DEBUG 1 "Running $x/update-mime-database $1"
- eval '$x/update-mime-database $1'$xdg_redirect_output
- return
- fi
- done
-}
-
-info_kde()
-{
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- DEBUG 1 "Running kmimetypefinder \"$1\""
- kmimetypefinder "$1" 2>/dev/null | head -n 1
- else
- DEBUG 1 "Running kfile \"$1\""
- kfile "$1" 2> /dev/null | head -n 1 | cut -d "(" -f 2 | cut -d ")" -f 1
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-info_gnome()
-{
- if gvfs-info --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gvfs-info \"$1\""
- gvfs-info "$1" 2> /dev/null | grep standard::content-type | cut -d' ' -f4
- elif gnomevfs-info --help 2>/dev/null 1>&2; then
- DEBUG 1 "Running gnomevfs-info \"$1\""
- gnomevfs-info --slow-mime "$1" 2> /dev/null | grep "^MIME" | cut -d ":" -f 2 | sed s/"^ "//
- else
- # according to https://bugs.freedesktop.org/show_bug.cgi?id=33094#c5
- # neither gvfs-info or gnomevfs-info are present in a default Ubuntu Natty
- # install, so fallback to info_generic
- info_generic "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-info_generic()
-{
- if mimetype --version >/dev/null 2>&1; then
- DEBUG 1 "Running mimetype -b \"$1\""
- mimetype -b "$1"
- else
- DEBUG 1 "Running file --mime-type \"$1\""
- /usr/bin/file --mime-type "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "//
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-make_default_kde()
-{
- # $1 is vendor-name.desktop
- # $2 is mime/type
- #
- # On KDE 3, add to $KDE_CONFIG_PATH/profilerc:
- # [$2 - 1]
- # Application=$1
- #
- # Remove all [$2 - *] sections, or even better,
- # renumber [$2 - *] sections and remove duplicate
- #
- # On KDE 4, add $2=$1 to $XDG_DATA_APPS/mimeapps.list
- #
- # Example file:
- #
- # [Added Associations]
- # text/plain=kde4-kate.desktop;kde4-kwrite.desktop;
- #
- # [Removed Associations]
- # text/plain=gnome-gedit.desktop;gnu-emacs.desktop;
- vendor="$1"
- mimetype="$2"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- default_dir=`kde4-config --path xdgdata-apps 2> /dev/null | cut -d ':' -f 1`
- default_file="$default_dir/mimeapps.list"
- else
- default_dir=`kde-config --path config 2> /dev/null | cut -d ':' -f 1`
- default_file="$default_dir/profilerc"
- fi
- if [ -z "$default_dir" ]; then
- DEBUG 2 "make_default_kde: No kde runtime detected"
- return
- fi
- DEBUG 2 "make_default_kde $vendor $mimetype"
- DEBUG 1 "Updating $default_file"
- mkdir -p "$default_dir"
- [ -f "$default_file" ] || touch "$default_file"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- [ -f "$default_file" ] || touch "$default_file"
- awk -v application="$vendor" -v mimetype="$mimetype" '
- BEGIN {
- prefix=mimetype "="
- associations=0
- found=0
- blanks=0
- }
- {
- suppress=0
- if (index($0, "[Added Associations]") == 1) {
- associations=1
- } else if (index($0, "[") == 1) {
- if (associations && !found) {
- print prefix application
- found=1
- }
- associations=0
- } else if ($0 == "") {
- blanks++
- suppress=1
- } else if (associations && index($0, prefix) == 1) {
- value=substr($0, length(prefix) + 1, length)
- split(value, apps, ";")
- value=application ";"
- count=0
- for (i in apps) {
- count++
- }
- for (i=0; i < count; i++) {
- if (apps[i] != application && apps[i] != "") {
- value=value apps[i] ";"
- }
- }
- $0=prefix value
- found=1
- }
- if (!suppress) {
- while (blanks > 0) {
- print ""
- blanks--
- }
- print $0
- }
- }
- END {
- if (!found) {
- if (!associations) {
- print "[Added Associations]"
- }
- print prefix application
- }
- while (blanks > 0) {
- print ""
- blanks--
- }
- }
-' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
- eval 'kbuildsycoca4'$xdg_redirect_output
- else
- awk -v application="$vendor" -v mimetype="$mimetype" '
- BEGIN {
- header_start="[" mimetype " - "
- suppress=0
- }
- {
- if (index($0, header_start) == 1 )
- suppress=1
- else
- if (/^\[/) { suppress=0 }
-
- if (!suppress) {
- print $0
- }
- }
- END {
- print ""
- print "[" mimetype " - 1]"
- print "Application=" application
- print "AllowAsDefault=true"
- print "GenericServiceType=Application"
- print "Preference=1"
- print "ServiceType=" mimetype
- }
-' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
- fi
-}
-
-make_default_generic()
-{
- # $1 is vendor-name.desktop
- # $2 is mime/type
- # Add $2=$1 to XDG_DATA_HOME/applications/mimeapps.list
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
- default_file="$xdg_user_dir/applications/mimeapps.list"
- DEBUG 2 "make_default_generic $1 $2"
- DEBUG 1 "Updating $default_file"
- [ -f "$default_file" ] || touch "$default_file"
- awk -v mimetype="$2" -v application="$1" '
- BEGIN {
- prefix=mimetype "="
- indefault=0
- added=0
- blanks=0
- found=0
- }
- {
- suppress=0
- if (index($0, "[Default Applications]") == 1) {
- indefault=1
- found=1
- } else if (index($0, "[") == 1) {
- if (!added && indefault) {
- print prefix application
- added=1
- }
- indefault=0
- } else if ($0 == "") {
- suppress=1
- blanks++
- } else if (indefault && !added && index($0, prefix) == 1) {
- $0=prefix application
- added=1
- }
- if (!suppress) {
- while (blanks > 0) {
- print ""
- blanks--
- }
- print $0
- }
- }
- END {
- if (!added) {
- if (!found) {
- print ""
- print "[Default Applications]"
- }
- print prefix application
- }
- while (blanks > 0) {
- print ""
- blanks--
- }
- }
-' "$default_file" > "${default_file}.new" && mv "${default_file}.new" "$default_file"
-}
-
-defapp_generic()
-{
- MIME="$1"
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
- xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
- xdg_system_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-
- for x in `echo "$xdg_user_dir" | sed 's/:/ /g'`; do
- mimeapps_list="$x/applications/mimeapps.list"
- if [ -f "$mimeapps_list" ] ; then
- DEBUG 2 "Checking $mimeapps_list"
- trader_result=`awk -v mimetype="$MIME" '
- BEGIN {
- prefix=mimetype "="
- indefault=0
- found=0
- }
- {
- if (index($0, "[Default Applications]") == 1) {
- indefault=1
- } else if (index($0, "[") == 1) {
- indefault=0
- } else if (!found && indefault && index($0, prefix) == 1) {
- print substr($0, length(prefix) +1, length)
- found=1
- }
- }
-' $mimeapps_list`
- if [ -n "$trader_result" ] ; then
- echo $trader_result
- exit_success
- fi
- fi
- done
-
- for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do
- DEBUG 2 "Checking $x/applications/defaults.list"
- trader_result=`grep "$MIME=" $x/applications/defaults.list 2> /dev/null | cut -d '=' -f 2 | cut -d ';' -f 1`
- if [ -n "$trader_result" ] ; then
- echo $trader_result
- exit_success
- fi
- done
- exit_success
-}
-
-defapp_kde()
-{
- MIME="$1"
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- KTRADER=`which ktraderclient 2> /dev/null`
- MIMETYPE="--mimetype"
- SERVICETYPE="--servicetype"
- else
- KTRADER=`which ktradertest 2> /dev/null`
- fi
- if [ -n "$KTRADER" ] ; then
- DEBUG 1 "Running KDE trader query \"$MIME\" mimetype and \"Application\" servicetype"
- trader_result=`$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null \
- | grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' -f 2`
- if [ -n "$trader_result" ] ; then
- basename "$trader_result"
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- defapp_generic "$1"
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-mode=
-action=
-filename=
-mimetype=
-
-case $1 in
- install)
- action=install
- ;;
-
- uninstall)
- action=uninstall
- ;;
-
- query)
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "query type argument missing"
- fi
-
- case $1 in
- filetype)
- action=info
-
- filename="$2"
- if [ -z "$filename" ] ; then
- exit_failure_syntax "FILE argument missing"
- fi
- case $filename in
- -*)
- exit_failure_syntax "unexpected option '$filename'"
- ;;
- esac
- check_input_file "$filename"
- filename=`readlink -f -- "$filename"`
- ;;
-
- default)
- action=defapp
- mimetype="$2"
- if [ -z "$mimetype" ] ; then
- exit_failure_syntax "mimetype argument missing"
- fi
- case $mimetype in
- -*)
- exit_failure_syntax "unexpected option '$mimetype'"
- ;;
-
- */*)
- # Ok
- ;;
-
- *)
- exit_failure_syntax "mimetype '$mimetype' is not in the form 'minor/major'"
- ;;
- esac
- ;;
-
- *)
- exit_failure_syntax "unknown query type '$1'"
- ;;
- esac
- ;;
-
- default)
- action=makedefault
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "application argument missing"
- fi
- case $1 in
- -*)
- exit_failure_syntax "unexpected option '$1'"
- ;;
-
- *.desktop)
- filename="$1"
- ;;
-
- *)
- exit_failure_syntax "malformed argument '$1', expected *.desktop"
- ;;
- esac
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-shift
-
-
-if [ "$action" = "makedefault" ]; then
- if [ -z "$1" ] ; then
- exit_failure_syntax "mimetype argument missing"
- fi
-
- while [ $# -gt 0 ] ; do
- case $1 in
- -*)
- exit_failure_syntax "unexpected option '$1'"
- ;;
- esac
- mimetype="$1"
- shift
-
- make_default_kde "$filename" "$mimetype"
- make_default_generic "$filename" "$mimetype"
- done
- exit_success
-fi
-
-if [ "$action" = "info" ]; then
- detectDE
-
- if [ x"$DE" = x"" ]; then
- if [ -x /usr/bin/file ]; then
- DE=generic
- fi
- fi
-
- case "$DE" in
- kde)
- info_kde "$filename"
- ;;
-
- gnome*)
- info_gnome "$filename"
- ;;
-
- *)
- info_generic "$filename"
- ;;
- esac
- exit_failure_operation_impossible "no method available for quering MIME type of '$filename'"
-fi
-
-if [ "$action" = "defapp" ]; then
- detectDE
-
- case "$DE" in
- kde)
- defapp_kde "$mimetype"
- ;;
-
- *)
- defapp_generic "$mimetype"
- ;;
- esac
- exit_failure_operation_impossible "no method available for quering default application for '$mimetype'"
-fi
-
-vendor=true
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case $parm in
- --mode)
- if [ -z "$1" ] ; then
- exit_failure_syntax "mode argument missing for --mode"
- fi
- case "$1" in
- user)
- mode="user"
- ;;
-
- system)
- mode="system"
- ;;
-
- *)
- exit_failure_syntax "unknown mode '$1'"
- ;;
- esac
- shift
- ;;
-
- --novendor)
- vendor=false
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$filename" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
-
- filename="$parm"
- check_input_file "$filename"
- ;;
- esac
-done
-
-if [ -z "$action" ] ; then
- exit_failure_syntax "command argument missing"
-fi
-
-if [ -n "$XDG_UTILS_INSTALL_MODE" ] ; then
- if [ "$XDG_UTILS_INSTALL_MODE" = "system" ] ; then
- mode="system"
- elif [ "$XDG_UTILS_INSTALL_MODE" = "user" ] ; then
- mode="user"
- fi
-fi
-
-if [ -z "$mode" ] ; then
- if [ `whoami` = "root" ] ; then
- mode="system"
- else
- mode="user"
- fi
-fi
-
-if [ -z "$filename" ] ; then
- exit_failure_syntax "mimetypes-file argument missing"
-fi
-
-if [ "$vendor" = "true" -a "$action" = "install" ] ; then
- check_vendor_prefix "$filename"
-fi
-
-xdg_base_dir=
-xdg_dir_name=mime/packages/
-
-xdg_user_dir="$XDG_DATA_HOME"
-[ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-[ x"$mode" = x"user" ] && xdg_base_dir="$xdg_user_dir/mime"
-xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
-
-xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-for x in `echo $xdg_system_dirs | sed 's/:/ /g'`; do
- if [ -w $x/$xdg_dir_name ] ; then
- [ x"$mode" = x"system" ] && xdg_base_dir="$x/mime"
- xdg_global_dir="$x/$xdg_dir_name"
- break
- fi
-done
-[ -w $xdg_global_dir ] || xdg_global_dir=
-DEBUG 3 "xdg_user_dir: $xdg_user_dir"
-DEBUG 3 "xdg_global_dir: $xdg_global_dir"
-
-# Find KDE3 mimelnk directory
-kde_user_dir=
-kde_global_dir=
-kde_global_dirs=`kde${KDE_SESSION_VERSION}-config --path mime 2> /dev/null`
-DEBUG 3 "kde_global_dirs: $kde_global_dirs"
-first=
-for x in `echo $kde_global_dirs | sed 's/:/ /g'` ; do
- if [ -z "$first" ] ; then
- first=false
- kde_user_dir="$x"
- elif [ -w $x ] ; then
- kde_global_dir="$x"
- fi
-done
-DEBUG 3 "kde_user_dir: $kde_user_dir"
-DEBUG 3 "kde_global_dir: $kde_global_dir"
-
-# TODO: Gnome legacy support
-# See http://forums.fedoraforum.org/showthread.php?t=26875
-gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
-[ -w $gnome_global_dir ] || gnome_global_dir=
-DEBUG 3 "gnome_user_dir: $gnome_user_dir"
-DEBUG 3 "gnome_global_dir: $gnome_global_dir"
-
-if [ x"$mode" = x"user" ] ; then
- xdg_dir="$xdg_user_dir"
- kde_dir="$kde_user_dir"
- gnome_dir="$gnome_user_dir"
- my_umask=077
-else
- xdg_dir="$xdg_global_dir"
- kde_dir="$kde_global_dir"
- gnome_dir="$gnome_global_dir"
- my_umask=022
- if [ -z "${xdg_dir}${kde_dir}${gnome_dir}" ] ; then
- exit_failure_operation_impossible "No writable system mimetype directory found."
- fi
-fi
-
-# echo "[xdg|$xdg_user_dir|$xdg_global_dir]"
-# echo "[kde|$kde_user_dir|$kde_global_dir]"
-# echo "[gnome|$gnome_user_dir|$gnome_global_dir]"
-# echo "[using|$xdg_dir|$kde_dir|$gnome_dir]"
-
-basefile=`basename "$filename"`
-#[ -z $vendor ] || basefile="$vendor-$basefile"
-
-mimetypes=
-if [ -n "$kde_dir" ] ; then
- DEBUG 2 "KDE3 mimelnk directory found, extracting mimetypes from XML file"
-
- mimetypes=`awk < "$filename" '
-# Strip XML comments
-BEGIN {
- suppress=0
-}
-{
- do
- if (suppress) {
- if (match($0,/-->/)) {
- $0=substr($0,RSTART+RLENGTH)
- suppress=0
- }
- else {
- break
- }
- }
- else {
- if (match($0,/<!--/)) {
- if (RSTART>1) print substr($0,0,RSTART)
- $0=substr($0,RSTART+RLENGTH)
- suppress=1
- }
- else {
- if ($0) print $0
- break
- }
- }
- while(1)
-}
-' | awk '
-# List MIME types listed in <mime-type> tags
-BEGIN {
- RS="<"
-}
-/^mime-info/, /^\/mime-info/ {
- if (match($0,/^mime-type/)) {
- if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) {
- print substr($0,RSTART+6,RLENGTH-6)
- }
- }
-}'`
-fi
-
-DEBUG 1 "$action mimetype in $xdg_dir"
-
-case $action in
- install)
- save_umask=`umask`
- umask $my_umask
-
- for x in $xdg_dir ; do
- mkdir -p $x
- eval 'cp $filename $x/$basefile'$xdg_redirect_output
- done
-
- if [ -n "$mimetypes" ] ; then
- # No quotes around $mimetypes
- for x in $mimetypes ; do
- DEBUG 1 "Installing $kde_dir/$x.desktop (KDE 3.x support)"
- mkdir -p `dirname $kde_dir/$x.desktop`
- awk < "$filename" '
-# Strip XML comments
-BEGIN {
- suppress=0
-}
-{
- do
- if (suppress) {
- if (match($0,/-->/)) {
- $0=substr($0,RSTART+RLENGTH)
- suppress=0
- }
- else {
- break
- }
- }
- else {
- if (match($0,/<!--/)) {
- if (RSTART>1) print substr($0,0,RSTART)
- $0=substr($0,RSTART+RLENGTH)
- suppress=1
- }
- else {
- if ($0) print $0
- break
- }
- }
- while(1)
-}
-' | awk > $kde_dir/$x.desktop '
-# Extract mimetype $x from the XML file $filename
-# Note that bash requires us to escape a single quote as '"'"'
-BEGIN {
- the_type=ARGV[1]
- the_source=ARGV[2]
- ARGC=1
- RS="<"
- found=0
- glob_patterns=""
-}
-/^mime-info/, /^\/mime-info/ {
- if (match($0,/^mime-type/)) {
- if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) {
- if (substr($0,RSTART+6,RLENGTH-6) == the_type) {
- found=1
- print "[Desktop Entry]"
- print "# Installed by xdg-mime from " the_source
- print "Type=MimeType"
- print "MimeType=" the_type
- the_icon=the_type
- sub("/", "-", the_icon)
- print "Icon=" the_icon
- }
- }
- }
- else if (found) {
- if (match($0,/^\/mime-type/)) {
- if (glob_patterns)
- print "Patterns=" glob_patterns
- exit 0
- }
-
- if (match($0,/^sub-class-of/)) {
- if (match($0,/type="[^"]*/) || match($0,/type='"'"'[^'"'"']*/)) {
- print "X-KDE-IsAlso=" substr($0,RSTART+6,RLENGTH-6)
- }
- else {
- print "Error: '"'"'type'"'"' argument missing in " RS $0
- exit 1
- }
- }
- if (match($0,/^glob/)) {
- if (match($0,/pattern="[^"]*/) || match($0,/pattern='"'"'[^'"'"']*/)) {
- glob_patterns = glob_patterns substr($0,RSTART+9,RLENGTH-9) ";"
- }
- else {
- print "Error: '"'"'pattern'"'"' argument missing in " RS $0
- exit 1
- }
- }
- if (match($0,/^comment/)) {
- if (match($0,/xml:lang="[^"]*/) || match($0,/xml:lang='"'"'[^'"'"']*/)) {
- lang=substr($0,RSTART+10,RLENGTH-10)
- }
- else {
- lang=""
- }
- if (match($0,/>/)) {
- comment=substr($0,RSTART+1)
- sub("&lt;", "<", comment)
- sub("&gt;", ">", comment)
- sub("&amp;", "\\&", comment)
- if (lang)
- print "Comment[" lang "]=" comment
- else
- print "Comment=" comment
- }
- }
- }
-}
-END {
- if (!found) {
- print "Error: Mimetype '"'"'" the_type "'"'"' not found"
- exit 1
- }
-}
-' $x $basefile
- if [ "$?" = "1" ] ; then
- grep -A 10 "^Error:" $kde_dir/$x.desktop >&2
- rm $kde_dir/$x.desktop
- exit 1
- fi
- done
- fi
-
- umask $save_umask
- ;;
-
- uninstall)
- for x in $xdg_dir ; do
- rm -f $x/$basefile
- done
-
- # No quotes around $mimetypes
- for x in $mimetypes ; do
- if grep '^# Installed by xdg-mime' $kde_dir/$x.desktop >/dev/null 2>&1; then
- DEBUG 1 "Removing $kde_dir/$x.desktop (KDE 3.x support)"
- rm -f $kde_dir/$x.desktop
- fi
- done
- ;;
-esac
-
-update_mime_database $xdg_base_dir
-
-exit_success
-
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-open b/chromium/third_party/xdg-utils/scripts/xdg-open
deleted file mode 100755
index bca6fe650ad..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-open
+++ /dev/null
@@ -1,697 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-open
-#
-# Utility script to open a URL in the registered default application.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-open - opens a file or URL in the user's preferred application
-
-Synopsis
-
-xdg-open { file | URL }
-
-xdg-open { --help | --manual | --version }
-
-Description
-
-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.
-
-xdg-open is for use inside a desktop session only. It is not recommended to use
-xdg-open as root.
-
-Options
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-
-Examples
-
-xdg-open 'http://www.freedesktop.org/'
-
-Opens the Freedesktop.org website in the user's default browser
-
-xdg-open /tmp/foobar.png
-
-Opens the PNG image file /tmp/foobar.png in the user's default image viewing
-application.
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-open - opens a file or URL in the user's preferred application
-
-Synopsis
-
-xdg-open { file | URL }
-
-xdg-open { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- echo "Try 'xdg-open --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-open: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-open 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-last_word()
-{
- read first rest
- echo "$rest"
-}
-
-open_darwin()
-{
- open "$1"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_kde()
-{
- if kde-open -v 2>/dev/null 1>&2; then
- kde-open "$1"
- else
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- kfmclient openURL "$1"
- else
- kfmclient exec "$1"
- kfmclient_fix_exit_code $?
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_gnome()
-{
- if gvfs-open --help 2>/dev/null 1>&2; then
- gvfs-open "$1"
- else
- gnome-open "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_xfce()
-{
- exo-open "$1"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_generic_xdg_mime()
-{
- filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"`
- default=`xdg-mime query default "$filetype"`
- if [ -n "$default" ] ; then
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-
- xdg_system_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-
- for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
- local file
- # look for both vendor-app.desktop, vendor/app.desktop
- if [ -r "$x/applications/$default" ]; then
- file="$x/applications/$default"
- elif [ -r "$x/applications/`echo $default | sed -e 's|-|/|'`" ]; then
- file="$x/applications/`echo $default | sed -e 's|-|/|'`"
- fi
-
- if [ -r "$file" ] ; then
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command_exec=`which $command 2>/dev/null`
- arguments="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | last_word`"
- arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$1"'"*g'`"
- if [ -x "$command_exec" ] ; then
- if echo $arguments | grep -iq '%[fFuU]' ; then
- eval $command_exec $arguments_exec
- else
- eval $command_exec $arguments_exec "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- fi
- fi
- fi
- done
- fi
-}
-
-open_generic()
-{
- # Paths or file:// URLs
- if (echo "$1" | grep -q '^file://' ||
- ! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:'); then
-
- local file="$1"
-
- # Decode URLs
- if echo "$file" | grep -q '^file:///'; then
- file=${file#file://}
- file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"
- fi
- check_input_file "$file"
-
- open_generic_xdg_mime "$file"
-
- if [ -f /etc/debian_version ] &&
- which run-mailcap 2>/dev/null 1>&2; then
- run-mailcap --action=view "$file"
- if [ $? -eq 0 ]; then
- exit_success
- fi
- fi
-
- if mimeopen -v 2>/dev/null 1>&2; then
- mimeopen -L -n "$file"
- if [ $? -eq 0 ]; then
- exit_success
- fi
- fi
- fi
-
- IFS=":"
- for browser in $BROWSER; do
- if [ x"$browser" != x"" ]; then
-
- browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
- if [ $? -ne 0 ]; then
- browser_with_arg=$browser;
- fi
-
- if [ x"$browser_with_arg" = x"$browser" ]; then
- "$browser" "$1";
- else eval '$browser_with_arg'$xdg_redirect_output;
- fi
-
- if [ $? -eq 0 ]; then
- exit_success;
- fi
- fi
- done
-
- exit_failure_operation_impossible "no method available for opening '$1'"
-}
-
-open_lxde()
-{
- # pcmanfm only knows how to handle file:// urls and filepaths, it seems.
- if (echo "$1" | grep -q '^file://' ||
- ! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:')
- then
- local file="$(echo "$1" | sed 's%^file://%%')"
-
- # handle relative paths
- if ! echo "$file" | grep -q '^/'; then
- file="$(pwd)/$file"
- fi
-
- pcmanfm "$file"
-
- else
- open_generic "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-url=
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$url" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- url="$parm"
- ;;
- esac
-done
-
-if [ -z "${url}" ] ; then
- exit_failure_syntax "file or URL argument missing"
-fi
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- DE=generic
-fi
-
-# if BROWSER variable is not set, check some well known browsers instead
-if [ x"$BROWSER" = x"" ]; then
- BROWSER=links2:elinks:links:lynx:w3m
- if [ -n "$DISPLAY" ]; then
- BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
- fi
-fi
-
-case "$DE" in
- kde)
- open_kde "$url"
- ;;
-
- gnome*)
- open_gnome "$url"
- ;;
-
- xfce)
- open_xfce "$url"
- ;;
-
- lxde)
- open_lxde "$url"
- ;;
-
- generic)
- open_generic "$url"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening '$url'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-open.in b/chromium/third_party/xdg-utils/scripts/xdg-open.in
deleted file mode 100644
index b84a9cbbea2..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-open.in
+++ /dev/null
@@ -1,288 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-open
-#
-# Utility script to open a URL in the registered default application.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-last_word()
-{
- read first rest
- echo "$rest"
-}
-
-open_darwin()
-{
- open "$1"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_kde()
-{
- if kde-open -v 2>/dev/null 1>&2; then
- kde-open "$1"
- else
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- kfmclient openURL "$1"
- else
- kfmclient exec "$1"
- kfmclient_fix_exit_code $?
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_gnome()
-{
- if gvfs-open --help 2>/dev/null 1>&2; then
- gvfs-open "$1"
- else
- gnome-open "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_xfce()
-{
- exo-open "$1"
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-open_generic_xdg_mime()
-{
- filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"`
- default=`xdg-mime query default "$filetype"`
- if [ -n "$default" ] ; then
- xdg_user_dir="$XDG_DATA_HOME"
- [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
-
- xdg_system_dirs="$XDG_DATA_DIRS"
- [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
-
- for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
- local file
- # look for both vendor-app.desktop, vendor/app.desktop
- if [ -r "$x/applications/$default" ]; then
- file="$x/applications/$default"
- elif [ -r "$x/applications/`echo $default | sed -e 's|-|/|'`" ]; then
- file="$x/applications/`echo $default | sed -e 's|-|/|'`"
- fi
-
- if [ -r "$file" ] ; then
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command_exec=`which $command 2>/dev/null`
- arguments="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | last_word`"
- arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$1"'"*g'`"
- if [ -x "$command_exec" ] ; then
- if echo $arguments | grep -iq '%[fFuU]' ; then
- eval $command_exec $arguments_exec
- else
- eval $command_exec $arguments_exec "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- fi
- fi
- fi
- done
- fi
-}
-
-open_generic()
-{
- # Paths or file:// URLs
- if (echo "$1" | grep -q '^file://' ||
- ! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:'); then
-
- local file="$1"
-
- # Decode URLs
- if echo "$file" | grep -q '^file:///'; then
- file=${file#file://}
- file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"
- fi
- check_input_file "$file"
-
- open_generic_xdg_mime "$file"
-
- if [ -f /etc/debian_version ] &&
- which run-mailcap 2>/dev/null 1>&2; then
- run-mailcap --action=view "$file"
- if [ $? -eq 0 ]; then
- exit_success
- fi
- fi
-
- if mimeopen -v 2>/dev/null 1>&2; then
- mimeopen -L -n "$file"
- if [ $? -eq 0 ]; then
- exit_success
- fi
- fi
- fi
-
- IFS=":"
- for browser in $BROWSER; do
- if [ x"$browser" != x"" ]; then
-
- browser_with_arg=`printf "$browser" "$1" 2>/dev/null`
- if [ $? -ne 0 ]; then
- browser_with_arg=$browser;
- fi
-
- if [ x"$browser_with_arg" = x"$browser" ]; then
- "$browser" "$1";
- else eval '$browser_with_arg'$xdg_redirect_output;
- fi
-
- if [ $? -eq 0 ]; then
- exit_success;
- fi
- fi
- done
-
- exit_failure_operation_impossible "no method available for opening '$1'"
-}
-
-open_lxde()
-{
- # pcmanfm only knows how to handle file:// urls and filepaths, it seems.
- if (echo "$1" | grep -q '^file://' ||
- ! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:')
- then
- local file="$(echo "$1" | sed 's%^file://%%')"
-
- # handle relative paths
- if ! echo "$file" | grep -q '^/'; then
- file="$(pwd)/$file"
- fi
-
- pcmanfm "$file"
-
- else
- open_generic "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-url=
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$url" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- url="$parm"
- ;;
- esac
-done
-
-if [ -z "${url}" ] ; then
- exit_failure_syntax "file or URL argument missing"
-fi
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- DE=generic
-fi
-
-# if BROWSER variable is not set, check some well known browsers instead
-if [ x"$BROWSER" = x"" ]; then
- BROWSER=links2:elinks:links:lynx:w3m
- if [ -n "$DISPLAY" ]; then
- BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
- fi
-fi
-
-case "$DE" in
- kde)
- open_kde "$url"
- ;;
-
- gnome*)
- open_gnome "$url"
- ;;
-
- xfce)
- open_xfce "$url"
- ;;
-
- lxde)
- open_lxde "$url"
- ;;
-
- generic)
- open_generic "$url"
- ;;
-
- *)
- exit_failure_operation_impossible "no method available for opening '$url'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-screensaver b/chromium/third_party/xdg-utils/scripts/xdg-screensaver
deleted file mode 100755
index 57982222e8a..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-screensaver
+++ /dev/null
@@ -1,1067 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-screensaver
-#
-# Utility script to control screensaver.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2006, Bryce Harrington <bryce@osdl.org>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-screensaver - command line tool for controlling the screensaver
-
-Synopsis
-
-xdg-screensaver suspend WindowID
-
-xdg-screensaver resume WindowID
-
-xdg-screensaver { activate | lock | reset | status }
-
-xdg-screensaver { --help | --manual | --version }
-
-Description
-
-xdg-screensaver provides commands to control the screensaver.
-
-xdg-screensaver is for use inside a desktop session only. It is not recommended
-to use xdg-screensaver as root.
-
-Commands
-
-suspend WindowID
-
- Suspends the screensaver and monitor power management. WindowID must be the
- X Window ID of an existing window of the calling application. The window
- must remain in existance for the duration of the suspension.
-
- WindowID can be represented as either a decimal number or as a hexadecimal
- number consisting of the prefix 0x followed by one or more hexadecimal
- digits.
-
- The screensaver can be suspended in relation to multiple windows at the
- same time. In that case screensaver operation is only restored once the
- screensaver has been resumed in relation to each of the windows
-
-resume WindowID
- Resume the screensaver and monitor power management after being suspended.
- WindowID must be the same X Window ID that was passed to a previous call of
- xdg-screensaver suspend
-activate
- Turns the screensaver on immediately. This may result in the screen getting
- locked, depending on existing system policies.
-lock
- Lock the screen immediately.
-reset
- Turns the screensaver off immediately. If the screen was locked the user
- may be asked to authenticate first.
-status
- Prints enabled to stdout if the screensaver is enabled to turn on after a
- period of inactivity and prints disabled if the screensaver is not enabled.
-
-Options
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-3
- A required tool could not be found.
-4
- The action failed.
-
-Examples
-
-xdg-screensaver suspend 0x1c00007
-
-Causes the screensaver to be disabled till xdg-screensaver resume 0x1c00007 is
-called. 0x1c00007 must be the X Window ID of an existing window.
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-screensaver - command line tool for controlling the screensaver
-
-Synopsis
-
-xdg-screensaver suspend WindowID
-
-xdg-screensaver resume WindowID
-
-xdg-screensaver { activate | lock | reset | status }
-
-xdg-screensaver { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-screensaver: $@" >&2
- echo "Try 'xdg-screensaver --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-screensaver' or 'xdg-screensaver --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-screensaver: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-screensaver: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-screensaver: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-screensaver: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-screensaver: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-screensaver: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-screensaver --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-screensaver' or 'xdg-screensaver --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-screensaver 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-# Check if we can use "mv -T"
-if mv -T ... ... 2>&1 | grep '\.\.\.' > /dev/null ; then
- # We can securely move files in /tmp with mv -T
- DEBUG 1 "mv -T available"
- MV="mv -T"
- screensaver_file="/tmp/xdg-screensaver-$USER-"`echo $DISPLAY | sed 's/:/-/g'`
-else
- # No secure moves available, use home dir
- DEBUG 1 "mv -T not available"
- MV="mv"
- screensaver_file="$HOME/.xdg-screensaver-"`echo $(hostname)-$DISPLAY | sed 's/:/-/g'`
-fi
-lockfile_command=`which lockfile 2> /dev/null`
-
-lockfile()
-{
- if [ -n "$lockfile_command" ] ; then
- $lockfile_command -1 -l 10 -s 3 "$screensaver_file".lock
- else
- # Poor man's attempt at doing a lockfile
- # Be careful not to facilitate a symlink attack
- local try
- try=0
- while ! ln -s "$screensaver_file".lock "$screensaver_file".lock 2> /dev/null;
- do
- sleep 1
- try=$(($try+1))
- if [ $try -eq 3 ] ; then
- rm -f "$screensaver_file".lock || return # Can't remove lockfile
- try=0
- fi
- done
- fi
-}
-
-unlockfile()
-{
- rm -f "$screensaver_file".lock
-}
-
-perform_action()
-{
- result=1
-
- if [ "$1" = "resume" ] ; then
- # Restore DPMS state
- if [ -f "$screensaver_file.dpms" ]; then
- rm "$screensaver_file.dpms"
- # Re-enable DPMS
- xset +dpms
- fi
- fi
- if [ "$1" = "reset" ] ; then
- if xset -q | grep 'DPMS is Enabled' > /dev/null 2> /dev/null; then
- xset dpms force on
- fi
- fi
-
- case "$DE" in
- kde)
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- screensaver_freedesktop "$1"
- else
- screensaver_kde "$1"
- fi
- ;;
-
- gnome_screensaver)
- screensaver_gnome_screensaver "$1"
- ;;
-
- xscreensaver)
- screensaver_xscreensaver "$1"
- ;;
-
- '')
- screensaver_xserver "$1"
- ;;
- esac
-
- if [ "$1" = "suspend" ] ; then
- # Save DPMS state
- if xset -q | grep 'DPMS is Enabled' > /dev/null 2> /dev/null; then
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- $MV "$tmpfile" "$screensaver_file.dpms"
- # Disable DPMS
- xset -dpms
- fi
- fi
-
-}
-
-cleanup_suspend()
-{
- lockfile
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- grep -v "$window_id:$xprop_pid\$" "$screensaver_file" > "$tmpfile" 2> /dev/null
- $MV "$tmpfile" "$screensaver_file"
- if [ ! -s "$screensaver_file" ] ; then
- rm "$screensaver_file"
- unlockfile
- # $screensaver_file is empty, do resume
- perform_action resume
- else
- unlockfile
- fi
-}
-
-do_resume()
-{
- lockfile # Obtain lockfile
- # Find the PID of the trackingprocess
- xprop_pid=`grep "$window_id:" "$screensaver_file" 2> /dev/null | cut -d ':' -f 2`
- unlockfile # Free lockfile
- if [ -n "$xprop_pid" ] && ps -p "$xprop_pid" 2> /dev/null | grep xprop > /dev/null; then
- # Kill the tracking process
- kill -s TERM $xprop_pid
- fi
- cleanup_suspend
-}
-
-XPROP=`which xprop 2> /dev/null`
-
-check_window_id()
-{
- if [ -z "$XPROP" ]; then
- DEBUG 3 "xprop not found"
- return
- fi
- DEBUG 2 "Running $XPROP -id $window_id"
- if $XPROP -id $window_id > /dev/null 2> /dev/null; then
- DEBUG 3 Window $window_id exists
- else
- DEBUG 3 Window $window_id does not exist
- exit_failure_operation_failed "Window $window_id does not exist"
- fi
-}
-
-track_window()
-{
- if [ -z "$XPROP" ]; then
- # Don't track window if we don't have xprop
- return
- fi
- lockfile
-
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- # Filter stale entries from the xdg-screensaver status file
- # Return if $window_id is being tracked already
- (
- already_tracked=1
- IFS_save="$IFS"
- IFS=":"
- while read wid pid; do
- if ps -p "$pid" 2> /dev/null | grep xprop > /dev/null; then
- echo "$wid:$pid"
- if [ $wid = $window_id ] ; then
- already_tracked=0
- fi
- fi
- done
- IFS="$IFS_save"
- exit $already_tracked
- ) < $screensaver_file > $tmpfile
- already_tracked=$?
-
- if [ "$already_tracked" -eq "0" ] ; then
- $MV "$tmpfile" "$screensaver_file"
- # We are already tracking $window_id, don't do anything
- unlockfile
- return
- fi
-
- # Start tracking $window_id
- $XPROP -id $window_id -spy > /dev/null &
- xprop_pid=$!
- # Add window_id and xprop_pid to the xdg-screensave status file
- echo "$window_id:$xprop_pid" >> $tmpfile
- $MV "$tmpfile" "$screensaver_file"
- unlockfile
- # Wait for xprop to edit, it means that the window disappeared
- wait $xprop_pid
- # Clean up the administration and resume the screensaver
- cleanup_suspend
-}
-
-screensaver_freedesktop()
-{
- case "$1" in
- suspend)
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- --print-reply \
- --reply-timeout=2000 \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.Inhibit \
- string:$window_id \
- string:xdg-screensaver \
- | grep uint32 | cut -d ' ' -f 5 >| "$screensaver_file.cookie" \
- 2> /dev/null
- result=$?
- ;;
-
- resume)
- if [ -f "$screensaver_file.cookie" ] ; then
- value=`cat "$screensaver_file.cookie"`
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.UnInhibit \
- uint32:$value \
- 2> /dev/null
- rm -f "$screensaver_file.cookie"
- fi
- result=$?
- ;;
-
- activate)
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.SetActive \
- boolean:true \
- 2> /dev/null
- result=$?
- ;;
-
- lock)
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.Lock \
- 2> /dev/null
- ;;
-
- reset)
- if [ -f "$screensaver_file.cookie" ] ; then
- value=`cat "$screensaver_file.cookie"`
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.UnInhibit \
- uint32:$value \
- 2> /dev/null
- rm -f "$screensaver_file.cookie"
- fi
- result=$?
- ;;
-
- status)
- status=`dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- --print-reply \
- --reply-timeout=2000 \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.GetActive \
- | grep boolean | cut -d ' ' -f 5`
- result=$?
- if [ x"$status" = "xtrue" ]; then
- echo "enabled"
- elif [ x"$status" = "xfalse" ]; then
- echo "disabled"
- else
- echo "ERROR: dbus org.freedesktop.ScreenSaver.GetActive returned '$status'" >&2
- return 1
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1'" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_kde()
-{
- case "$1" in
- suspend)
- dcop kdesktop KScreensaverIface enable false > /dev/null
- result=$?
- ;;
-
- resume)
- dcop kdesktop KScreensaverIface configure > /dev/null
- result=$?
- ;;
-
- activate)
- dcop kdesktop KScreensaverIface save > /dev/null
- result=$?
- ;;
-
- lock)
- dcop kdesktop KScreensaverIface lock > /dev/null
- result=$?
- ;;
-
- reset)
- # Turns the screensaver off right now
- dcop kdesktop KScreensaverIface quit > /dev/null
- result=$?
- ;;
-
- status)
- status=`dcop kdesktop KScreensaverIface isEnabled`
- result=$?
- if [ x"$status" = "xtrue" ]; then
- echo "enabled"
- elif [ x"$status" = "xfalse" ]; then
- echo "disabled"
- else
- echo "ERROR: kdesktop KScreensaverIface isEnabled returned '$status'" >&2
- return 1
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1'" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_xserver()
-{
- case "$1" in
- suspend)
- xset s off > /dev/null
- result=$?
- ;;
-
- resume)
- xset s default > /dev/null
- result=$?
- ;;
-
- activate)
- xset s activate > /dev/null
- result=$?
- ;;
-
- reset)
- xset s reset > /dev/null
- result=$?
- ;;
-
- status)
- timeout=`xset q | sed '/^Screen Saver:/,/^[^ ]/ { s/.*timeout: *\([0-9]*\).*/\1/; t }; d'`
- result=$?
- if [ "$timeout" -gt 0 ]; then
- echo "enabled"
- elif [ "$timeout" -eq 0 ]; then
- echo "disabled"
- else
- echo "ERROR: xset q did not report the screensaver timeout" >&2
- return 1
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1'" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_suspend_loop()
-{
- lockfile
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- # Filter stale entries from the xdg-screensaver status file
- cat "$screensaver_file" 2> /dev/null | (
- IFS_save="$IFS"
- IFS=":"
- while read wid pid; do
- if ps -p "$pid" 2> /dev/null | grep xprop > /dev/null; then
- echo "$wid:$pid"
- fi
- done
- IFS="$IFS_save"
- ) > $tmpfile
- if [ -s "$tmpfile" ] ; then
- # Suspend pending, don't do a thing
- $MV "$tmpfile" "$screensaver_file"
- unlockfile
- return
- fi
- $MV "$tmpfile" "$screensaver_file"
- unlockfile
- (while [ -f "$screensaver_file" ]; do $*; sleep 50; done) > /dev/null 2> /dev/null &
-}
-
-screensaver_gnome_screensaver()
-{
-# DBUS interface for gnome-screensaver
-# http://people.gnome.org/~mccann/gnome-screensaver/docs/gnome-screensaver.html
- case "$1" in
- suspend)
- screensaver_suspend_loop \
- dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.SimulateUserActivity \
- 2> /dev/null
- result=$?
- ;;
-
- resume)
- # Automatic resume when $screensaver_file disappears
- result=0
- ;;
-
- activate)
- dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.SetActive \
- boolean:true \
- 2> /dev/null
- result=$?
- ;;
-
- lock)
- gnome-screensaver-command --lock > /dev/null 2> /dev/null
- result=$?
- ;;
-
- reset)
- # Turns the screensaver off right now
- dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.SimulateUserActivity \
- 2> /dev/null
- result=$?
- ;;
-
- status)
- status=`dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- --print-reply \
- --reply-timeout=2000 \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.GetActive \
- | grep boolean | cut -d ' ' -f 5`
- result=$?
- if [ x"$status" = "xtrue" -o x"$status" = "xfalse" ]; then
- echo "enabled"
- elif [ x"$result" != "x0" ]; then
- echo "ERROR: dbus org.gnome.ScreenSaver.GetActive returned '$status'" >&2
- return 1
- else
- echo "disabled"
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_xscreensaver()
-{
- case "$1" in
- suspend)
- screensaver_suspend_loop xscreensaver-command -deactivate
- result=0
- ;;
-
- resume)
- # Automatic resume when $screensaver_file disappears
- result=0
- ;;
-
- activate)
- xscreensaver-command -activate > /dev/null 2> /dev/null
- result=$?
- ;;
-
- lock)
- xscreensaver-command -lock > /dev/null 2> /dev/null
- result=$?
- ;;
-
- reset)
- # Turns the screensaver off right now
- xscreensaver-command -deactivate > /dev/null 2> /dev/null
- result=$?
- ;;
-
- status)
- result=0
- if [ -f "$screensaver_file" ] ; then
- echo "disabled"
- else
- echo "enabled"
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1" >&2
- return 1
- ;;
- esac
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-action=
-window_id=
-
-case $1 in
- suspend)
- action="$1"
-
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "WindowID argument missing"
- fi
-
- window_id="$1"
- check_window_id
- ;;
-
- resume)
- action="$1"
-
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "WindowID argument missing"
- fi
-
- window_id="$1"
- check_window_id
- ;;
-
- activate)
- action="$1"
- ;;
-
- lock)
- action="$1"
- ;;
-
- reset)
- action="$1"
- ;;
-
- status)
- action="$1"
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-detectDE
-# Consider "xscreensaver" a separate DE
-xscreensaver-command -version 2> /dev/null | grep XScreenSaver > /dev/null && DE="xscreensaver"
-# Consider "gnome-screensaver" a separate DE
-gnome-screensaver-command -q > /dev/null 2>&1 && DE="gnome_screensaver"
-
-if [ "$action" = "resume" ] ; then
- do_resume
- exit_success
-fi
-
-perform_action "$action"
-
-if [ "$action" = "suspend" ] ; then
- # Start tracking $window_id and resume the screensaver once it disappears
- ( track_window ) 2> /dev/null > /dev/null &
-fi
-
-if [ $result -eq 0 ]; then
- exit_success
-else
- exit_failure_operation_failed
-fi
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-screensaver.in b/chromium/third_party/xdg-utils/scripts/xdg-screensaver.in
deleted file mode 100644
index ea89dd0f47b..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-screensaver.in
+++ /dev/null
@@ -1,627 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-screensaver
-#
-# Utility script to control screensaver.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2006, Bryce Harrington <bryce@osdl.org>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-# Check if we can use "mv -T"
-if mv -T ... ... 2>&1 | grep '\.\.\.' > /dev/null ; then
- # We can securely move files in /tmp with mv -T
- DEBUG 1 "mv -T available"
- MV="mv -T"
- screensaver_file="/tmp/xdg-screensaver-$USER-"`echo $DISPLAY | sed 's/:/-/g'`
-else
- # No secure moves available, use home dir
- DEBUG 1 "mv -T not available"
- MV="mv"
- screensaver_file="$HOME/.xdg-screensaver-"`echo $(hostname)-$DISPLAY | sed 's/:/-/g'`
-fi
-lockfile_command=`which lockfile 2> /dev/null`
-
-lockfile()
-{
- if [ -n "$lockfile_command" ] ; then
- $lockfile_command -1 -l 10 -s 3 "$screensaver_file".lock
- else
- # Poor man's attempt at doing a lockfile
- # Be careful not to facilitate a symlink attack
- local try
- try=0
- while ! ln -s "$screensaver_file".lock "$screensaver_file".lock 2> /dev/null;
- do
- sleep 1
- try=$(($try+1))
- if [ $try -eq 3 ] ; then
- rm -f "$screensaver_file".lock || return # Can't remove lockfile
- try=0
- fi
- done
- fi
-}
-
-unlockfile()
-{
- rm -f "$screensaver_file".lock
-}
-
-perform_action()
-{
- result=1
-
- if [ "$1" = "resume" ] ; then
- # Restore DPMS state
- if [ -f "$screensaver_file.dpms" ]; then
- rm "$screensaver_file.dpms"
- # Re-enable DPMS
- xset +dpms
- fi
- fi
- if [ "$1" = "reset" ] ; then
- if xset -q | grep 'DPMS is Enabled' > /dev/null 2> /dev/null; then
- xset dpms force on
- fi
- fi
-
- case "$DE" in
- kde)
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- screensaver_freedesktop "$1"
- else
- screensaver_kde "$1"
- fi
- ;;
-
- gnome_screensaver)
- screensaver_gnome_screensaver "$1"
- ;;
-
- xscreensaver)
- screensaver_xscreensaver "$1"
- ;;
-
- '')
- screensaver_xserver "$1"
- ;;
- esac
-
- if [ "$1" = "suspend" ] ; then
- # Save DPMS state
- if xset -q | grep 'DPMS is Enabled' > /dev/null 2> /dev/null; then
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- $MV "$tmpfile" "$screensaver_file.dpms"
- # Disable DPMS
- xset -dpms
- fi
- fi
-
-}
-
-cleanup_suspend()
-{
- lockfile
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- grep -v "$window_id:$xprop_pid\$" "$screensaver_file" > "$tmpfile" 2> /dev/null
- $MV "$tmpfile" "$screensaver_file"
- if [ ! -s "$screensaver_file" ] ; then
- rm "$screensaver_file"
- unlockfile
- # $screensaver_file is empty, do resume
- perform_action resume
- else
- unlockfile
- fi
-}
-
-do_resume()
-{
- lockfile # Obtain lockfile
- # Find the PID of the trackingprocess
- xprop_pid=`grep "$window_id:" "$screensaver_file" 2> /dev/null | cut -d ':' -f 2`
- unlockfile # Free lockfile
- if [ -n "$xprop_pid" ] && ps -p "$xprop_pid" 2> /dev/null | grep xprop > /dev/null; then
- # Kill the tracking process
- kill -s TERM $xprop_pid
- fi
- cleanup_suspend
-}
-
-XPROP=`which xprop 2> /dev/null`
-
-check_window_id()
-{
- if [ -z "$XPROP" ]; then
- DEBUG 3 "xprop not found"
- return
- fi
- DEBUG 2 "Running $XPROP -id $window_id"
- if $XPROP -id $window_id > /dev/null 2> /dev/null; then
- DEBUG 3 Window $window_id exists
- else
- DEBUG 3 Window $window_id does not exist
- exit_failure_operation_failed "Window $window_id does not exist"
- fi
-}
-
-track_window()
-{
- if [ -z "$XPROP" ]; then
- # Don't track window if we don't have xprop
- return
- fi
- lockfile
-
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- # Filter stale entries from the xdg-screensaver status file
- # Return if $window_id is being tracked already
- (
- already_tracked=1
- IFS_save="$IFS"
- IFS=":"
- while read wid pid; do
- if ps -p "$pid" 2> /dev/null | grep xprop > /dev/null; then
- echo "$wid:$pid"
- if [ $wid = $window_id ] ; then
- already_tracked=0
- fi
- fi
- done
- IFS="$IFS_save"
- exit $already_tracked
- ) < $screensaver_file > $tmpfile
- already_tracked=$?
-
- if [ "$already_tracked" -eq "0" ] ; then
- $MV "$tmpfile" "$screensaver_file"
- # We are already tracking $window_id, don't do anything
- unlockfile
- return
- fi
-
- # Start tracking $window_id
- $XPROP -id $window_id -spy > /dev/null &
- xprop_pid=$!
- # Add window_id and xprop_pid to the xdg-screensave status file
- echo "$window_id:$xprop_pid" >> $tmpfile
- $MV "$tmpfile" "$screensaver_file"
- unlockfile
- # Wait for xprop to edit, it means that the window disappeared
- wait $xprop_pid
- # Clean up the administration and resume the screensaver
- cleanup_suspend
-}
-
-screensaver_freedesktop()
-{
- case "$1" in
- suspend)
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- --print-reply \
- --reply-timeout=2000 \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.Inhibit \
- string:$window_id \
- string:xdg-screensaver \
- | grep uint32 | cut -d ' ' -f 5 >| "$screensaver_file.cookie" \
- 2> /dev/null
- result=$?
- ;;
-
- resume)
- if [ -f "$screensaver_file.cookie" ] ; then
- value=`cat "$screensaver_file.cookie"`
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.UnInhibit \
- uint32:$value \
- 2> /dev/null
- rm -f "$screensaver_file.cookie"
- fi
- result=$?
- ;;
-
- activate)
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.SetActive \
- boolean:true \
- 2> /dev/null
- result=$?
- ;;
-
- lock)
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.Lock \
- 2> /dev/null
- ;;
-
- reset)
- if [ -f "$screensaver_file.cookie" ] ; then
- value=`cat "$screensaver_file.cookie"`
- dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.UnInhibit \
- uint32:$value \
- 2> /dev/null
- rm -f "$screensaver_file.cookie"
- fi
- result=$?
- ;;
-
- status)
- status=`dbus-send --session \
- --dest=org.freedesktop.ScreenSaver \
- --type=method_call \
- --print-reply \
- --reply-timeout=2000 \
- /ScreenSaver \
- org.freedesktop.ScreenSaver.GetActive \
- | grep boolean | cut -d ' ' -f 5`
- result=$?
- if [ x"$status" = "xtrue" ]; then
- echo "enabled"
- elif [ x"$status" = "xfalse" ]; then
- echo "disabled"
- else
- echo "ERROR: dbus org.freedesktop.ScreenSaver.GetActive returned '$status'" >&2
- return 1
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1'" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_kde()
-{
- case "$1" in
- suspend)
- dcop kdesktop KScreensaverIface enable false > /dev/null
- result=$?
- ;;
-
- resume)
- dcop kdesktop KScreensaverIface configure > /dev/null
- result=$?
- ;;
-
- activate)
- dcop kdesktop KScreensaverIface save > /dev/null
- result=$?
- ;;
-
- lock)
- dcop kdesktop KScreensaverIface lock > /dev/null
- result=$?
- ;;
-
- reset)
- # Turns the screensaver off right now
- dcop kdesktop KScreensaverIface quit > /dev/null
- result=$?
- ;;
-
- status)
- status=`dcop kdesktop KScreensaverIface isEnabled`
- result=$?
- if [ x"$status" = "xtrue" ]; then
- echo "enabled"
- elif [ x"$status" = "xfalse" ]; then
- echo "disabled"
- else
- echo "ERROR: kdesktop KScreensaverIface isEnabled returned '$status'" >&2
- return 1
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1'" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_xserver()
-{
- case "$1" in
- suspend)
- xset s off > /dev/null
- result=$?
- ;;
-
- resume)
- xset s default > /dev/null
- result=$?
- ;;
-
- activate)
- xset s activate > /dev/null
- result=$?
- ;;
-
- reset)
- xset s reset > /dev/null
- result=$?
- ;;
-
- status)
- timeout=`xset q | sed '/^Screen Saver:/,/^[^ ]/ { s/.*timeout: *\([0-9]*\).*/\1/; t }; d'`
- result=$?
- if [ "$timeout" -gt 0 ]; then
- echo "enabled"
- elif [ "$timeout" -eq 0 ]; then
- echo "disabled"
- else
- echo "ERROR: xset q did not report the screensaver timeout" >&2
- return 1
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1'" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_suspend_loop()
-{
- lockfile
- test "${TMPDIR+set}" = set || TMPDIR=/tmp
- tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
- # Filter stale entries from the xdg-screensaver status file
- cat "$screensaver_file" 2> /dev/null | (
- IFS_save="$IFS"
- IFS=":"
- while read wid pid; do
- if ps -p "$pid" 2> /dev/null | grep xprop > /dev/null; then
- echo "$wid:$pid"
- fi
- done
- IFS="$IFS_save"
- ) > $tmpfile
- if [ -s "$tmpfile" ] ; then
- # Suspend pending, don't do a thing
- $MV "$tmpfile" "$screensaver_file"
- unlockfile
- return
- fi
- $MV "$tmpfile" "$screensaver_file"
- unlockfile
- (while [ -f "$screensaver_file" ]; do $*; sleep 50; done) > /dev/null 2> /dev/null &
-}
-
-screensaver_gnome_screensaver()
-{
-# DBUS interface for gnome-screensaver
-# http://people.gnome.org/~mccann/gnome-screensaver/docs/gnome-screensaver.html
- case "$1" in
- suspend)
- screensaver_suspend_loop \
- dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.SimulateUserActivity \
- 2> /dev/null
- result=$?
- ;;
-
- resume)
- # Automatic resume when $screensaver_file disappears
- result=0
- ;;
-
- activate)
- dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.SetActive \
- boolean:true \
- 2> /dev/null
- result=$?
- ;;
-
- lock)
- gnome-screensaver-command --lock > /dev/null 2> /dev/null
- result=$?
- ;;
-
- reset)
- # Turns the screensaver off right now
- dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.SimulateUserActivity \
- 2> /dev/null
- result=$?
- ;;
-
- status)
- status=`dbus-send --session \
- --dest=org.gnome.ScreenSaver \
- --type=method_call \
- --print-reply \
- --reply-timeout=2000 \
- /org/gnome/ScreenSaver \
- org.gnome.ScreenSaver.GetActive \
- | grep boolean | cut -d ' ' -f 5`
- result=$?
- if [ x"$status" = "xtrue" -o x"$status" = "xfalse" ]; then
- echo "enabled"
- elif [ x"$result" != "x0" ]; then
- echo "ERROR: dbus org.gnome.ScreenSaver.GetActive returned '$status'" >&2
- return 1
- else
- echo "disabled"
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1" >&2
- return 1
- ;;
- esac
-}
-
-screensaver_xscreensaver()
-{
- case "$1" in
- suspend)
- screensaver_suspend_loop xscreensaver-command -deactivate
- result=0
- ;;
-
- resume)
- # Automatic resume when $screensaver_file disappears
- result=0
- ;;
-
- activate)
- xscreensaver-command -activate > /dev/null 2> /dev/null
- result=$?
- ;;
-
- lock)
- xscreensaver-command -lock > /dev/null 2> /dev/null
- result=$?
- ;;
-
- reset)
- # Turns the screensaver off right now
- xscreensaver-command -deactivate > /dev/null 2> /dev/null
- result=$?
- ;;
-
- status)
- result=0
- if [ -f "$screensaver_file" ] ; then
- echo "disabled"
- else
- echo "enabled"
- fi
- ;;
-
- *)
- echo "ERROR: Unknown command '$1" >&2
- return 1
- ;;
- esac
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-action=
-window_id=
-
-case $1 in
- suspend)
- action="$1"
-
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "WindowID argument missing"
- fi
-
- window_id="$1"
- check_window_id
- ;;
-
- resume)
- action="$1"
-
- shift
-
- if [ -z "$1" ] ; then
- exit_failure_syntax "WindowID argument missing"
- fi
-
- window_id="$1"
- check_window_id
- ;;
-
- activate)
- action="$1"
- ;;
-
- lock)
- action="$1"
- ;;
-
- reset)
- action="$1"
- ;;
-
- status)
- action="$1"
- ;;
-
- *)
- exit_failure_syntax "unknown command '$1'"
- ;;
-esac
-
-detectDE
-# Consider "xscreensaver" a separate DE
-xscreensaver-command -version 2> /dev/null | grep XScreenSaver > /dev/null && DE="xscreensaver"
-# Consider "gnome-screensaver" a separate DE
-gnome-screensaver-command -q > /dev/null 2>&1 && DE="gnome_screensaver"
-
-if [ "$action" = "resume" ] ; then
- do_resume
- exit_success
-fi
-
-perform_action "$action"
-
-if [ "$action" = "suspend" ] ; then
- # Start tracking $window_id and resume the screensaver once it disappears
- ( track_window ) 2> /dev/null > /dev/null &
-fi
-
-if [ $result -eq 0 ]; then
- exit_success
-else
- exit_failure_operation_failed
-fi
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-settings b/chromium/third_party/xdg-utils/scripts/xdg-settings
deleted file mode 100755
index e101297aa61..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-settings
+++ /dev/null
@@ -1,1187 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-settings
-#
-# Utility script to get various settings from the desktop environment.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009, Google Inc.
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-settings - get various settings from the desktop environment
-
-Synopsis
-
-xdg-settings { get | check | set } {property} [subproperty] [value]
-
-xdg-settings { --help | --list | --manual | --version }
-
-Description
-
-xdg-settings gets various settings from the desktop environment. For instance,
-desktop environments often provide proxy configuration and default web browser
-settings. Using xdg-settings these parameters can be extracted for use by
-applications that do not use the desktop environment's libraries (which would
-use the settings natively).
-
-xdg-settings is for use inside a desktop session only. It is not recommended to
-use xdg-settings as root.
-
-Options
-
---help
- Show command synopsis.
---list
- List all properties xdg-settings knows about.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Properties
-
-When using xdg-settings to get, check or set a destkop setting, properties and
-possibly sub-properties are used to specify the setting to be changed.
-
-Some properties (such as default-web-browser) fully describe the setting to be
-changed. Other properties (such as default-url-scheme-handler) require more
-information (in this case the actual scheme to set the default handler for)
-which must be provided in a sub-property.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-
-Examples
-
-Get the desktop file name of the current default web browser
-
- xdg-settings get default-web-browser
-
-
-Check whether the default web browser is firefox.desktop, which can be false
-even if "get default-web-browser" says that is the current value (if only some
-of the underlying settings actually reflect that value)
-
- xdg-settings check default-web-browser firefox.desktop
-
-
-Set the default web browser to google-chrome.desktop
-
- xdg-settings set default-web-browser google-chrome.desktop
-
-
-Set the default mailto URL scheme handler to be evolution.desktop
-
- xdg-settings set default-url-scheme-handler mailto evolution.desktop
-
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-settings - get various settings from the desktop environment
-
-Synopsis
-
-xdg-settings { get | check | set } {property} [subproperty] [value]
-
-xdg-settings { --help | --list | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-settings: $@" >&2
- echo "Try 'xdg-settings --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-settings' or 'xdg-settings --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-settings: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-settings: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-settings: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-settings: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-settings: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-settings: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-settings --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-settings' or 'xdg-settings --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-settings 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-check_desktop_filename()
-{
- case "$1" in
- */*)
- exit_failure_syntax "invalid application name"
- ;;
- *.desktop)
- return
- ;;
- *)
- exit_failure_syntax "invalid application name"
- ;;
- esac
-}
-
-# {{{ default browser
-# {{{ utility functions
-
-# In order to remove an application from the automatically-generated list of
-# applications for handling a given MIME type, the desktop environment may copy
-# the global .desktop file into the user's .local directory, and remove that
-# MIME type from its list. In that case, we must restore the MIME type to the
-# application's list of MIME types before we can set it as the default for that
-# MIME type. (We can't just delete the local version, since the user may have
-# made other changes to it as well. So, tweak the existing file.)
-# This function is hard-coded for text/html but it could be adapted if needed.
-fix_local_desktop_file()
-{
- if test -z "$2" ; then
- MIME="text/html"
- else
- MIME="$2"
- fi
- apps="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
- # No local desktop file?
- [ ! -f "$apps/$1" ] && return
- MIMETYPES="`grep "^MimeType=" "$apps/$1" | cut -d= -f 2-`"
- case "$MIMETYPES" in
- $MIME\;*|*\;$MIME\;*|*\;$MIME\;|*\;$MIME)
- # Already has the mime-type? Great!
- return 0
- ;;
- esac
-
- # Add the mime-type to the list
- temp="`mktemp "$apps/$1.XXXXXX"`" || return
- grep -v "^MimeType=" "$apps/$1" >> "$temp"
- echo "MimeType=$MIME;$MIMETYPES" >> "$temp"
-
- oldlines="`wc -l < "$apps/$1"`"
- newlines="`wc -l < "$temp"`"
- # The new file should have at least as many lines as the old.
- if [ $oldlines -le $newlines ]; then
- mv "$temp" "$apps/$1"
- # This can take a little bit to get noticed.
- sleep 4
- else
- rm -f "$temp"
- return 1
- fi
-}
-
-# }}} utility functions
-# {{{ MIME utilities
-
-xdg_mime_fixup()
-{
- # xdg-mime may use ktradertest, which will fork off a copy of kdeinit if
- # one does not already exist. It will exit after about 15 seconds if no
- # further processes need it around. But since it does not close its stdout,
- # the shell (via grep) will wait around for kdeinit to exit. If we start a
- # copy here, that copy will be used in xdg-mime and we will avoid waiting.
- if [ "$DE" = kde -a -z "$XDG_MIME_FIXED" ]; then
- ktradertest text/html Application > /dev/null 2>&1
- # Only do this once, as we only need it once.
- XDG_MIME_FIXED=yes
- fi
-}
-
-get_browser_mime()
-{
- if test -z "$1" ; then
- MIME="text/html"
- else
- MIME="$1"
- fi
- xdg_mime_fixup
- xdg-mime query default "$MIME"
-}
-
-set_browser_mime()
-{
- xdg_mime_fixup
- if test -z "$2" ; then
- MIME="text/html"
- else
- MIME="$2"
- fi
- orig="`get_browser_mime $MIME`"
- # Fixing the local desktop file can actually change the default browser all
- # by itself, so we fix it only after querying to find the current default.
- fix_local_desktop_file "$1" "$MIME" || return
- mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/applications"
- xdg-mime default "$1" "$MIME" || return
- if [ x"`get_browser_mime`" != x"$1" ]; then
- # Put back the original value
- xdg-mime default "$orig" "$MIME"
- exit_failure_operation_failed
- fi
-}
-
-# }}} MIME utilities
-# {{{ KDE utilities
-
-# Reads the KDE configuration setting, compensating for a bug in some versions of kreadconfig.
-read_kde_config()
-{
- configfile="$1"
- configsection="$2"
- configkey="$3"
- application="`kreadconfig --file $configfile --group $configsection --key $configkey`"
- if [ x"$application" != x ]; then
- echo "$application"
- else
- # kreadconfig in KDE 4 may not notice Key[$*]=... localized settings, so
- # check by hand if it didn't find anything (oddly kwriteconfig works
- # fine though).
- configfile_dir=`kde${KDE_SESSION_VERSION}-config --path config | cut -d ':' -f 1`
- configfile_path="$configfile_dir/$configfile"
- [ ! -f "$configfile_path" ] && return
- # This will only take the first value if there is more than one.
- grep "^$configkey"'\[$[^]=]*\]=' "$configfile_path" | head -n 1 | cut -d= -f 2-
- fi
-}
-
-# }}} KDE utilities
-# {{{ KDE
-
-# Resolves the KDE browser setting to a binary: if prefixed with !, simply removes it;
-# otherwise, uses desktop_file_to_binary to get the binary out of the desktop file.
-resolve_kde_browser()
-{
- [ -z "$browser" ] && return
- case "$browser" in
- !*)
- echo "${browser#!}"
- ;;
- *)
- desktop_file_to_binary "$browser"
- ;;
- esac
-}
-
-# Does the opposite of resolve_kde_browser: if prefixed with !, tries to find a desktop
-# file corresponding to the binary, otherwise just returns the desktop file name.
-resolve_kde_browser_desktop()
-{
- [ -z "$browser" ] && return
- case "$browser" in
- !*)
- desktop="`binary_to_desktop_file "${browser#!}"`"
- basename "$desktop"
- ;;
- *)
- echo "$browser"
- ;;
- esac
-}
-
-read_kde_browser()
-{
- read_kde_config kdeglobals General BrowserApplication
-}
-
-get_browser_kde()
-{
- browser="`read_kde_browser`"
- if [ x"$browser" = x ]; then
- # No explicit default browser; KDE will use the MIME type text/html.
- get_browser_mime
- else
- resolve_kde_browser_desktop
- fi
-}
-
-check_browser_kde()
-{
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- browser="`read_kde_browser`"
- binary="`resolve_kde_browser`"
- # Because KDE will use the handler for MIME type text/html if this value
- # is empty, we allow either the empty string or a match to $check here.
- if [ x"$binary" != x -a x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- browser="`get_browser_mime`"
- binary="`desktop_file_to_binary "$browser"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_browser_kde()
-{
- set_browser_mime "$1" || return
- kwriteconfig --file kdeglobals --group General --key BrowserApplication "$1"
-}
-
-# }}} KDE
-# {{{ GNOME
-
-get_browser_gnome()
-{
- binary="`gconftool-2 --get /desktop/gnome/applications/browser/exec | first_word`"
- if [ x"$binary" = x ]; then
- # No default browser; GNOME might use the MIME type text/html.
- get_browser_mime
- else
- # gconftool gives the binary (maybe with %s etc. afterward),
- # but we want the desktop file name, not the binary. So, we
- # have to find the desktop file to which it corresponds.
- desktop="`binary_to_desktop_file "$binary"`"
- basename "$desktop"
- fi
-}
-
-check_browser_gnome()
-{
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- binary="`gconftool-2 --get /desktop/gnome/applications/browser/exec | first_word`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- # Check HTTP and HTTPS, but not about: and unknown:.
- for protocol in http https; do
- binary="`gconftool-2 --get /desktop/gnome/url-handlers/$protocol/command | first_word`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- done
- browser="`get_browser_mime`"
- binary="`desktop_file_to_binary "$browser"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_browser_gnome()
-{
- binary="`desktop_file_to_binary "$1"`"
- [ "$binary" ] || exit_failure_file_missing
- set_browser_mime "$1" || return
-
- # Set the default browser.
- gconftool-2 --type string --set /desktop/gnome/applications/browser/exec "$binary"
- gconftool-2 --type bool --set /desktop/gnome/applications/browser/needs_term false
- gconftool-2 --type bool --set /desktop/gnome/applications/browser/nremote true
- # Set the handler for HTTP and HTTPS.
- for protocol in http https; do
- gconftool-2 --type string --set /desktop/gnome/url-handlers/$protocol/command "$binary %s"
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$protocol/needs_terminal false
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$protocol/enabled true
- done
- # Set the handler for about: and unknown URL types.
- for protocol in about unknown; do
- gconftool-2 --type string --set /desktop/gnome/url-handlers/$protocol/command "$binary %s"
- done
-}
-
-# }}} GNOME
-# {{{ GNOME 3.x
-
-get_browser_gnome3()
-{
- get_browser_mime "x-scheme-handler/http"
-}
-
-check_browser_gnome3()
-{
- desktop="$1"
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- # Check HTTP and HTTPS, but not about: and unknown:.
- for protocol in http https; do
- browser="`get_browser_mime "x-scheme-handler/$protocol"`"
- if [ x"$browser" != x"$desktop" ]; then
- echo no
- exit_success
- fi
- done
- echo yes
- exit_success
-}
-
-set_browser_gnome3()
-{
- binary="`desktop_file_to_binary "$1"`"
- [ "$binary" ] || exit_failure_file_missing
- set_browser_mime "$1" || return
-
- # Set the default browser.
- for protocol in http https about unknown; do
- set_browser_mime "$1" "x-scheme-handler/$protocol" || return
- done
-}
-# }}} GNOME 3.x
-# {{{ xfce
-
-get_browser_xfce()
-{
- search="${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/etc/xdg}"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/xfce4" ] || continue
- file="$dir/xfce4/helpers.rc"
- [ -r "$file" ] || continue
- grep -q "^WebBrowser=" "$file" || continue
- desktop="`grep "^WebBrowser=" "$file" | cut -d= -f 2-`"
- echo "$desktop.desktop"
- return
- done
- exit_failure_operation_failed
-}
-
-check_browser_xfce()
-{
- browser="`get_browser_xfce`"
- if [ x"$browser" != x"$1" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-check_xfce_desktop_file()
-{
- # Annoyingly, xfce wants its .desktop files in a separate directory instead
- # of the standard locations, and requires a few custom tweaks to them:
- # "Type" must be "X-XFCE-Helper"
- # "X-XFCE-Category" must be "WebBrowser" (for web browsers, anyway)
- # "X-XFCE-Commands" and "X-XFCE-CommandsWithParameter" must be set
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/xfce4/helpers" ] || continue
- file="$dir/xfce4/helpers/$1"
- # We have the file, no need to create it.
- [ -r "$file" ] && return
- done
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$1"
- if [ -r "$file" ]; then
- # Found a file to convert.
- target="${XDG_DATA_HOME:-$HOME/.local/share}/xfce4/helpers"
- mkdir -p "$target"
- grep -v "^Type=" "$file" > "$target/$1"
- echo "Type=X-XFCE-Helper" >> "$target/$1"
- echo "X-XFCE-Category=WebBrowser" >> "$target/$1"
- # Change %F, %f, %U, and %u to "%s".
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/%[FfUu]/"%s"/g'`"
- echo "X-XFCE-Commands=`echo "$command" | first_word`" >> "$target/$1"
- echo "X-XFCE-CommandsWithParameter=$command" >> "$target/$1"
- return
- fi
- done
- return 1
-}
-
-set_browser_xfce()
-{
- check_xfce_desktop_file "$1" || exit_failure_operation_failed
-
- helper_dir="${XDG_CONFIG_HOME:-$HOME/.config}/xfce4"
- if [ ! -d "$helper_dir" ]; then
- mkdir -p "$helper_dir" || exit_failure_operation_failed
- fi
-
- helpers_rc="$helper_dir/helpers.rc"
- # Create the file if it does not exist to avoid special cases below.
- if [ ! -r "$helpers_rc" ]; then
- touch "$helpers_rc" || exit_failure_operation_failed
- fi
-
- temp="`mktemp "$helpers_rc.XXXXXX"`" || return
- grep -v "^WebBrowser=" "$helpers_rc" >> "$temp"
- echo "WebBrowser=${1%.desktop}" >> "$temp"
-
- oldlines="`wc -l < "$helpers_rc"`"
- newlines="`wc -l < "$temp"`"
- # The new file should have at least as many lines as the old.
- if [ $oldlines -le $newlines ]; then
- mv "$temp" "$helpers_rc"
- else
- rm -f "$temp"
- return 1
- fi
-}
-
-# }}} xfce
-# }}} default browser
-
-# {{{ default url scheme handler
-
-exit_unimplemented_default_handler()
-{
- exit_failure_operation_impossible "default-url-scheme-handler not implemented for $DE"
-}
-
-# {{{ KDE
-
-# Recent versions of KDE support default scheme handler applications using the
-# mime type of x-scheme-handler/scheme. Older versions will not support this
-# but do have support for setting a default mail handler. There is also a
-# system in KDE where .protocol files can be used, however this is not
-# supported by this script. When reading a scheme handler we will use the
-# default mail handler for the mailto scheme, otherwise we will use the mime
-# type x-scheme-handler/scheme.
-
-get_url_scheme_handler_kde()
-{
- if [ "$1" = "mailto" ]; then
- handler="`read_kde_config emaildefaults PROFILE_Default EmailClient | first_word`"
- echo "handler is $handler"
- if [ x"$handler" != x ]; then
- binary_to_desktop_file "$handler"
- else
- get_browser_mime "x-scheme-handler/$1"
- fi
- else
- get_browser_mime "x-scheme-handler/$1"
- fi
-}
-
-check_url_scheme_handler_kde()
-{
- check="`desktop_file_to_binary "$2"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- if [ x"$1" = "mailto" ]; then
- binary="`read_kde_config emaildefaults PROFILE_Default EmailClient`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- fi
- handler="`get_browser_mime x-scheme-handler/$1`"
- binary="`desktop_file_to_binary "$handler"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_url_scheme_handler_kde()
-{
- set_browser_mime "$2" "x-scheme-handler/$1" || return
- if [ "$1" = "mailto" ]; then
- binary="`desktop_file_to_binary "$2"`"
- kwriteconfig --file emaildefaults --group PROFILE_Default --key EmailClient "$binary"
- fi
-}
-
-# }}} KDE
-# {{{ GNOME
-
-get_url_scheme_handler_gnome()
-{
- binary="`gconftool-2 --get /desktop/gnome/url-handlers/$1/command | first_word`"
- if [ x"$binary" != x"" ]; then
- # gconftool gives the binary (maybe with %s etc. afterward),
- # but we want the desktop file name, not the binary. So, we
- # have to find the desktop file to which it corresponds.
- desktop="`binary_to_desktop_file "$binary"`"
- basename "$desktop"
- fi
-}
-
-check_url_scheme_handler_gnome()
-{
- check="`desktop_file_to_binary "$2"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- binary="`gconftool-2 --get /desktop/gnome/url-handlers/$1/command | first_word`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_url_scheme_handler_gnome()
-{
- binary="`desktop_file_to_binary "$2"`"
- [ "$binary" ] || exit_failure_file_missing
-
- gconftool-2 --type string --set /desktop/gnome/url-handlers/$1/command "$binary %s"
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$1/needs_terminal false
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$1/enabled true
-}
-
-# }}} GNOME
-# {{{ GNOME 3.x
-
-get_url_scheme_handler_gnome3()
-{
- get_browser_mime "x-scheme-handler/$1"
-}
-
-check_url_scheme_handler_gnome3()
-{
- desktop="$2"
- check="`desktop_file_to_binary "$2"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- browser="`get_browser_mime "x-scheme-handler/$1"`"
- if [ x"$browser" != x"$desktop" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_url_scheme_handler_gnome3()
-{
- binary="`desktop_file_to_binary "$2"`"
- [ "$binary" ] || exit_failure_file_missing
- set_browser_mime "$2" || return
-
- # Set the default browser.
- set_browser_mime "$2" "x-scheme-handler/$1" || return
-}
-
-# }}} GNOME 3.x
-# {{{ xfce
-
-get_url_scheme_handler_xfce()
-{
- exit_unimplemented_default_handler "$1"
-}
-
-check_url_scheme_handler_xfce()
-{
- exit_unimplemented_default_handler "$1"
-}
-
-set_url_scheme_handler_xfce()
-{
- exit_unimplemented_default_handler "$1"
-}
-
-# }}} xfce
-# }}} default protocol handler
-
-dispatch_specific()
-{
- # The PROP comments in this function are used to generate the output of
- # the --list option. The formatting is important. Make sure to line up the
- # property descriptions with spaces so that it will look nice.
- if [ x"$op" = x"get" ]; then
- case "$parm" in
- default-web-browser) # PROP: Default web browser
- get_browser_$DE
- ;;
-
- default-url-scheme-handler) # PROP: Default handler for URL scheme
- get_url_scheme_handler_$DE "$1"
- ;;
-
- *)
- exit_failure_syntax
- ;;
- esac
- elif [ x"$op" = x"check" ]; then
- case "$parm" in
- default-web-browser)
- check_desktop_filename "$1"
- check_browser_$DE "$1"
- ;;
-
- default-url-scheme-handler)
- check_desktop_filename "$2"
- check_url_scheme_handler_$DE "$1" "$2"
- ;;
-
- *)
- exit_failure_syntax
- ;;
- esac
- else # set
- case "$parm" in
- default-web-browser)
- [ $# -eq 1 ] || exit_failure_syntax "unexpected/missing argument"
- check_desktop_filename "$1"
- set_browser_$DE "$1"
- ;;
-
- default-url-scheme-handler)
- [ $# -eq 2 ] || exit_failure_syntax "unexpected/missing argument"
- check_desktop_filename "$2"
- set_url_scheme_handler_$DE "$1" "$2"
- ;;
-
- *)
- exit_failure_syntax
- ;;
- esac
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-dispatch_generic()
-{
- # We only know how to get or check the default web browser.
- [ x"$op" != x"get" -a x"$op" != x"check" ] && exit_failure_operation_impossible
- [ x"$parm" != x"default-web-browser" ] && exit_failure_operation_impossible
-
- # First look in $BROWSER
- if [ x"$BROWSER" != x ]; then
- binary="`which "${BROWSER%%:*}"`"
- else
- # Debian and Ubuntu (and others?) have x-www-browser.
- binary="`which x-www-browser`"
- fi
-
- [ "$binary" ] || exit_failure_operation_failed
-
- binary="`readlink -f "$binary"`"
-
- [ "$binary" ] || exit_failure_operation_failed
-
- if [ x"$op" = x"get" ]; then
- desktop="`binary_to_desktop_file "$binary"`"
- basename "$desktop"
- else
- # $op = "check"
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- fi
- exit_success
-}
-
-if [ x"$1" = x"--list" ]; then
- echo "Known properties:"
- # Extract the property names from dispatch_specific() above.
- grep "^[ ]*[^)]*) # PROP:" "$0" | sed -e 's/^[ ]*\([^)]*\)) # PROP: \(.*\)$/ \1 \2/' | sort
- exit_success
-fi
-
-[ x"$1" != x ] || exit_failure_syntax "no operation given"
-[ x"$2" != x ] || exit_failure_syntax "no parameter name given"
-[ x"$1" = x"get" -o x"$3" != x ] || exit_failure_syntax "no parameter value given"
-
-op="$1"
-parm="$2"
-shift 2
-
-if [ x"$op" != x"get" -a x"$op" != x"check" -a x"$op" != x"set" ]; then
- exit_failure_syntax "invalid operation"
-fi
-
-detectDE
-
-case "$DE" in
- kde|gnome*|xfce)
- dispatch_specific "$@"
- ;;
-
- generic)
- dispatch_generic "$@"
- ;;
-
- *)
- exit_failure_operation_impossible "unknown desktop environment"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-settings.in b/chromium/third_party/xdg-utils/scripts/xdg-settings.in
deleted file mode 100644
index a503e2b349d..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-settings.in
+++ /dev/null
@@ -1,752 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-settings
-#
-# Utility script to get various settings from the desktop environment.
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009, Google Inc.
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-check_desktop_filename()
-{
- case "$1" in
- */*)
- exit_failure_syntax "invalid application name"
- ;;
- *.desktop)
- return
- ;;
- *)
- exit_failure_syntax "invalid application name"
- ;;
- esac
-}
-
-# {{{ default browser
-# {{{ utility functions
-
-# In order to remove an application from the automatically-generated list of
-# applications for handling a given MIME type, the desktop environment may copy
-# the global .desktop file into the user's .local directory, and remove that
-# MIME type from its list. In that case, we must restore the MIME type to the
-# application's list of MIME types before we can set it as the default for that
-# MIME type. (We can't just delete the local version, since the user may have
-# made other changes to it as well. So, tweak the existing file.)
-# This function is hard-coded for text/html but it could be adapted if needed.
-fix_local_desktop_file()
-{
- if test -z "$2" ; then
- MIME="text/html"
- else
- MIME="$2"
- fi
- apps="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
- # No local desktop file?
- [ ! -f "$apps/$1" ] && return
- MIMETYPES="`grep "^MimeType=" "$apps/$1" | cut -d= -f 2-`"
- case "$MIMETYPES" in
- $MIME\;*|*\;$MIME\;*|*\;$MIME\;|*\;$MIME)
- # Already has the mime-type? Great!
- return 0
- ;;
- esac
-
- # Add the mime-type to the list
- temp="`mktemp "$apps/$1.XXXXXX"`" || return
- grep -v "^MimeType=" "$apps/$1" >> "$temp"
- echo "MimeType=$MIME;$MIMETYPES" >> "$temp"
-
- oldlines="`wc -l < "$apps/$1"`"
- newlines="`wc -l < "$temp"`"
- # The new file should have at least as many lines as the old.
- if [ $oldlines -le $newlines ]; then
- mv "$temp" "$apps/$1"
- # This can take a little bit to get noticed.
- sleep 4
- else
- rm -f "$temp"
- return 1
- fi
-}
-
-# }}} utility functions
-# {{{ MIME utilities
-
-xdg_mime_fixup()
-{
- # xdg-mime may use ktradertest, which will fork off a copy of kdeinit if
- # one does not already exist. It will exit after about 15 seconds if no
- # further processes need it around. But since it does not close its stdout,
- # the shell (via grep) will wait around for kdeinit to exit. If we start a
- # copy here, that copy will be used in xdg-mime and we will avoid waiting.
- if [ "$DE" = kde -a -z "$XDG_MIME_FIXED" ]; then
- ktradertest text/html Application > /dev/null 2>&1
- # Only do this once, as we only need it once.
- XDG_MIME_FIXED=yes
- fi
-}
-
-get_browser_mime()
-{
- if test -z "$1" ; then
- MIME="text/html"
- else
- MIME="$1"
- fi
- xdg_mime_fixup
- xdg-mime query default "$MIME"
-}
-
-set_browser_mime()
-{
- xdg_mime_fixup
- if test -z "$2" ; then
- MIME="text/html"
- else
- MIME="$2"
- fi
- orig="`get_browser_mime $MIME`"
- # Fixing the local desktop file can actually change the default browser all
- # by itself, so we fix it only after querying to find the current default.
- fix_local_desktop_file "$1" "$MIME" || return
- mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/applications"
- xdg-mime default "$1" "$MIME" || return
- if [ x"`get_browser_mime`" != x"$1" ]; then
- # Put back the original value
- xdg-mime default "$orig" "$MIME"
- exit_failure_operation_failed
- fi
-}
-
-# }}} MIME utilities
-# {{{ KDE utilities
-
-# Reads the KDE configuration setting, compensating for a bug in some versions of kreadconfig.
-read_kde_config()
-{
- configfile="$1"
- configsection="$2"
- configkey="$3"
- application="`kreadconfig --file $configfile --group $configsection --key $configkey`"
- if [ x"$application" != x ]; then
- echo "$application"
- else
- # kreadconfig in KDE 4 may not notice Key[$*]=... localized settings, so
- # check by hand if it didn't find anything (oddly kwriteconfig works
- # fine though).
- configfile_dir=`kde${KDE_SESSION_VERSION}-config --path config | cut -d ':' -f 1`
- configfile_path="$configfile_dir/$configfile"
- [ ! -f "$configfile_path" ] && return
- # This will only take the first value if there is more than one.
- grep "^$configkey"'\[$[^]=]*\]=' "$configfile_path" | head -n 1 | cut -d= -f 2-
- fi
-}
-
-# }}} KDE utilities
-# {{{ KDE
-
-# Resolves the KDE browser setting to a binary: if prefixed with !, simply removes it;
-# otherwise, uses desktop_file_to_binary to get the binary out of the desktop file.
-resolve_kde_browser()
-{
- [ -z "$browser" ] && return
- case "$browser" in
- !*)
- echo "${browser#!}"
- ;;
- *)
- desktop_file_to_binary "$browser"
- ;;
- esac
-}
-
-# Does the opposite of resolve_kde_browser: if prefixed with !, tries to find a desktop
-# file corresponding to the binary, otherwise just returns the desktop file name.
-resolve_kde_browser_desktop()
-{
- [ -z "$browser" ] && return
- case "$browser" in
- !*)
- desktop="`binary_to_desktop_file "${browser#!}"`"
- basename "$desktop"
- ;;
- *)
- echo "$browser"
- ;;
- esac
-}
-
-read_kde_browser()
-{
- read_kde_config kdeglobals General BrowserApplication
-}
-
-get_browser_kde()
-{
- browser="`read_kde_browser`"
- if [ x"$browser" = x ]; then
- # No explicit default browser; KDE will use the MIME type text/html.
- get_browser_mime
- else
- resolve_kde_browser_desktop
- fi
-}
-
-check_browser_kde()
-{
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- browser="`read_kde_browser`"
- binary="`resolve_kde_browser`"
- # Because KDE will use the handler for MIME type text/html if this value
- # is empty, we allow either the empty string or a match to $check here.
- if [ x"$binary" != x -a x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- browser="`get_browser_mime`"
- binary="`desktop_file_to_binary "$browser"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_browser_kde()
-{
- set_browser_mime "$1" || return
- kwriteconfig --file kdeglobals --group General --key BrowserApplication "$1"
-}
-
-# }}} KDE
-# {{{ GNOME
-
-get_browser_gnome()
-{
- binary="`gconftool-2 --get /desktop/gnome/applications/browser/exec | first_word`"
- if [ x"$binary" = x ]; then
- # No default browser; GNOME might use the MIME type text/html.
- get_browser_mime
- else
- # gconftool gives the binary (maybe with %s etc. afterward),
- # but we want the desktop file name, not the binary. So, we
- # have to find the desktop file to which it corresponds.
- desktop="`binary_to_desktop_file "$binary"`"
- basename "$desktop"
- fi
-}
-
-check_browser_gnome()
-{
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- binary="`gconftool-2 --get /desktop/gnome/applications/browser/exec | first_word`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- # Check HTTP and HTTPS, but not about: and unknown:.
- for protocol in http https; do
- binary="`gconftool-2 --get /desktop/gnome/url-handlers/$protocol/command | first_word`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- done
- browser="`get_browser_mime`"
- binary="`desktop_file_to_binary "$browser"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_browser_gnome()
-{
- binary="`desktop_file_to_binary "$1"`"
- [ "$binary" ] || exit_failure_file_missing
- set_browser_mime "$1" || return
-
- # Set the default browser.
- gconftool-2 --type string --set /desktop/gnome/applications/browser/exec "$binary"
- gconftool-2 --type bool --set /desktop/gnome/applications/browser/needs_term false
- gconftool-2 --type bool --set /desktop/gnome/applications/browser/nremote true
- # Set the handler for HTTP and HTTPS.
- for protocol in http https; do
- gconftool-2 --type string --set /desktop/gnome/url-handlers/$protocol/command "$binary %s"
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$protocol/needs_terminal false
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$protocol/enabled true
- done
- # Set the handler for about: and unknown URL types.
- for protocol in about unknown; do
- gconftool-2 --type string --set /desktop/gnome/url-handlers/$protocol/command "$binary %s"
- done
-}
-
-# }}} GNOME
-# {{{ GNOME 3.x
-
-get_browser_gnome3()
-{
- get_browser_mime "x-scheme-handler/http"
-}
-
-check_browser_gnome3()
-{
- desktop="$1"
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- # Check HTTP and HTTPS, but not about: and unknown:.
- for protocol in http https; do
- browser="`get_browser_mime "x-scheme-handler/$protocol"`"
- if [ x"$browser" != x"$desktop" ]; then
- echo no
- exit_success
- fi
- done
- echo yes
- exit_success
-}
-
-set_browser_gnome3()
-{
- binary="`desktop_file_to_binary "$1"`"
- [ "$binary" ] || exit_failure_file_missing
- set_browser_mime "$1" || return
-
- # Set the default browser.
- for protocol in http https about unknown; do
- set_browser_mime "$1" "x-scheme-handler/$protocol" || return
- done
-}
-# }}} GNOME 3.x
-# {{{ xfce
-
-get_browser_xfce()
-{
- search="${XDG_CONFIG_HOME:-$HOME/.config}:${XDG_CONFIG_DIRS:-/etc/xdg}"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/xfce4" ] || continue
- file="$dir/xfce4/helpers.rc"
- [ -r "$file" ] || continue
- grep -q "^WebBrowser=" "$file" || continue
- desktop="`grep "^WebBrowser=" "$file" | cut -d= -f 2-`"
- echo "$desktop.desktop"
- return
- done
- exit_failure_operation_failed
-}
-
-check_browser_xfce()
-{
- browser="`get_browser_xfce`"
- if [ x"$browser" != x"$1" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-check_xfce_desktop_file()
-{
- # Annoyingly, xfce wants its .desktop files in a separate directory instead
- # of the standard locations, and requires a few custom tweaks to them:
- # "Type" must be "X-XFCE-Helper"
- # "X-XFCE-Category" must be "WebBrowser" (for web browsers, anyway)
- # "X-XFCE-Commands" and "X-XFCE-CommandsWithParameter" must be set
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/xfce4/helpers" ] || continue
- file="$dir/xfce4/helpers/$1"
- # We have the file, no need to create it.
- [ -r "$file" ] && return
- done
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$1"
- if [ -r "$file" ]; then
- # Found a file to convert.
- target="${XDG_DATA_HOME:-$HOME/.local/share}/xfce4/helpers"
- mkdir -p "$target"
- grep -v "^Type=" "$file" > "$target/$1"
- echo "Type=X-XFCE-Helper" >> "$target/$1"
- echo "X-XFCE-Category=WebBrowser" >> "$target/$1"
- # Change %F, %f, %U, and %u to "%s".
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/%[FfUu]/"%s"/g'`"
- echo "X-XFCE-Commands=`echo "$command" | first_word`" >> "$target/$1"
- echo "X-XFCE-CommandsWithParameter=$command" >> "$target/$1"
- return
- fi
- done
- return 1
-}
-
-set_browser_xfce()
-{
- check_xfce_desktop_file "$1" || exit_failure_operation_failed
-
- helper_dir="${XDG_CONFIG_HOME:-$HOME/.config}/xfce4"
- if [ ! -d "$helper_dir" ]; then
- mkdir -p "$helper_dir" || exit_failure_operation_failed
- fi
-
- helpers_rc="$helper_dir/helpers.rc"
- # Create the file if it does not exist to avoid special cases below.
- if [ ! -r "$helpers_rc" ]; then
- touch "$helpers_rc" || exit_failure_operation_failed
- fi
-
- temp="`mktemp "$helpers_rc.XXXXXX"`" || return
- grep -v "^WebBrowser=" "$helpers_rc" >> "$temp"
- echo "WebBrowser=${1%.desktop}" >> "$temp"
-
- oldlines="`wc -l < "$helpers_rc"`"
- newlines="`wc -l < "$temp"`"
- # The new file should have at least as many lines as the old.
- if [ $oldlines -le $newlines ]; then
- mv "$temp" "$helpers_rc"
- else
- rm -f "$temp"
- return 1
- fi
-}
-
-# }}} xfce
-# }}} default browser
-
-# {{{ default url scheme handler
-
-exit_unimplemented_default_handler()
-{
- exit_failure_operation_impossible "default-url-scheme-handler not implemented for $DE"
-}
-
-# {{{ KDE
-
-# Recent versions of KDE support default scheme handler applications using the
-# mime type of x-scheme-handler/scheme. Older versions will not support this
-# but do have support for setting a default mail handler. There is also a
-# system in KDE where .protocol files can be used, however this is not
-# supported by this script. When reading a scheme handler we will use the
-# default mail handler for the mailto scheme, otherwise we will use the mime
-# type x-scheme-handler/scheme.
-
-get_url_scheme_handler_kde()
-{
- if [ "$1" = "mailto" ]; then
- handler="`read_kde_config emaildefaults PROFILE_Default EmailClient | first_word`"
- echo "handler is $handler"
- if [ x"$handler" != x ]; then
- binary_to_desktop_file "$handler"
- else
- get_browser_mime "x-scheme-handler/$1"
- fi
- else
- get_browser_mime "x-scheme-handler/$1"
- fi
-}
-
-check_url_scheme_handler_kde()
-{
- check="`desktop_file_to_binary "$2"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- if [ x"$1" = "mailto" ]; then
- binary="`read_kde_config emaildefaults PROFILE_Default EmailClient`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- fi
- handler="`get_browser_mime x-scheme-handler/$1`"
- binary="`desktop_file_to_binary "$handler"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_url_scheme_handler_kde()
-{
- set_browser_mime "$2" "x-scheme-handler/$1" || return
- if [ "$1" = "mailto" ]; then
- binary="`desktop_file_to_binary "$2"`"
- kwriteconfig --file emaildefaults --group PROFILE_Default --key EmailClient "$binary"
- fi
-}
-
-# }}} KDE
-# {{{ GNOME
-
-get_url_scheme_handler_gnome()
-{
- binary="`gconftool-2 --get /desktop/gnome/url-handlers/$1/command | first_word`"
- if [ x"$binary" != x"" ]; then
- # gconftool gives the binary (maybe with %s etc. afterward),
- # but we want the desktop file name, not the binary. So, we
- # have to find the desktop file to which it corresponds.
- desktop="`binary_to_desktop_file "$binary"`"
- basename "$desktop"
- fi
-}
-
-check_url_scheme_handler_gnome()
-{
- check="`desktop_file_to_binary "$2"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- binary="`gconftool-2 --get /desktop/gnome/url-handlers/$1/command | first_word`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_url_scheme_handler_gnome()
-{
- binary="`desktop_file_to_binary "$2"`"
- [ "$binary" ] || exit_failure_file_missing
-
- gconftool-2 --type string --set /desktop/gnome/url-handlers/$1/command "$binary %s"
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$1/needs_terminal false
- gconftool-2 --type bool --set /desktop/gnome/url-handlers/$1/enabled true
-}
-
-# }}} GNOME
-# {{{ GNOME 3.x
-
-get_url_scheme_handler_gnome3()
-{
- get_browser_mime "x-scheme-handler/$1"
-}
-
-check_url_scheme_handler_gnome3()
-{
- desktop="$2"
- check="`desktop_file_to_binary "$2"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- browser="`get_browser_mime "x-scheme-handler/$1"`"
- if [ x"$browser" != x"$desktop" ]; then
- echo no
- exit_success
- fi
- echo yes
- exit_success
-}
-
-set_url_scheme_handler_gnome3()
-{
- binary="`desktop_file_to_binary "$2"`"
- [ "$binary" ] || exit_failure_file_missing
- set_browser_mime "$2" || return
-
- # Set the default browser.
- set_browser_mime "$2" "x-scheme-handler/$1" || return
-}
-
-# }}} GNOME 3.x
-# {{{ xfce
-
-get_url_scheme_handler_xfce()
-{
- exit_unimplemented_default_handler "$1"
-}
-
-check_url_scheme_handler_xfce()
-{
- exit_unimplemented_default_handler "$1"
-}
-
-set_url_scheme_handler_xfce()
-{
- exit_unimplemented_default_handler "$1"
-}
-
-# }}} xfce
-# }}} default protocol handler
-
-dispatch_specific()
-{
- # The PROP comments in this function are used to generate the output of
- # the --list option. The formatting is important. Make sure to line up the
- # property descriptions with spaces so that it will look nice.
- if [ x"$op" = x"get" ]; then
- case "$parm" in
- default-web-browser) # PROP: Default web browser
- get_browser_$DE
- ;;
-
- default-url-scheme-handler) # PROP: Default handler for URL scheme
- get_url_scheme_handler_$DE "$1"
- ;;
-
- *)
- exit_failure_syntax
- ;;
- esac
- elif [ x"$op" = x"check" ]; then
- case "$parm" in
- default-web-browser)
- check_desktop_filename "$1"
- check_browser_$DE "$1"
- ;;
-
- default-url-scheme-handler)
- check_desktop_filename "$2"
- check_url_scheme_handler_$DE "$1" "$2"
- ;;
-
- *)
- exit_failure_syntax
- ;;
- esac
- else # set
- case "$parm" in
- default-web-browser)
- [ $# -eq 1 ] || exit_failure_syntax "unexpected/missing argument"
- check_desktop_filename "$1"
- set_browser_$DE "$1"
- ;;
-
- default-url-scheme-handler)
- [ $# -eq 2 ] || exit_failure_syntax "unexpected/missing argument"
- check_desktop_filename "$2"
- set_url_scheme_handler_$DE "$1" "$2"
- ;;
-
- *)
- exit_failure_syntax
- ;;
- esac
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-dispatch_generic()
-{
- # We only know how to get or check the default web browser.
- [ x"$op" != x"get" -a x"$op" != x"check" ] && exit_failure_operation_impossible
- [ x"$parm" != x"default-web-browser" ] && exit_failure_operation_impossible
-
- # First look in $BROWSER
- if [ x"$BROWSER" != x ]; then
- binary="`which "${BROWSER%%:*}"`"
- else
- # Debian and Ubuntu (and others?) have x-www-browser.
- binary="`which x-www-browser`"
- fi
-
- [ "$binary" ] || exit_failure_operation_failed
-
- binary="`readlink -f "$binary"`"
-
- [ "$binary" ] || exit_failure_operation_failed
-
- if [ x"$op" = x"get" ]; then
- desktop="`binary_to_desktop_file "$binary"`"
- basename "$desktop"
- else
- # $op = "check"
- check="`desktop_file_to_binary "$1"`"
- if [ -z "$check" ]; then
- echo no
- exit_success
- fi
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
- fi
- echo yes
- fi
- exit_success
-}
-
-if [ x"$1" = x"--list" ]; then
- echo "Known properties:"
- # Extract the property names from dispatch_specific() above.
- grep "^[ ]*[^)]*) # PROP:" "$0" | sed -e 's/^[ ]*\([^)]*\)) # PROP: \(.*\)$/ \1 \2/' | sort
- exit_success
-fi
-
-[ x"$1" != x ] || exit_failure_syntax "no operation given"
-[ x"$2" != x ] || exit_failure_syntax "no parameter name given"
-[ x"$1" = x"get" -o x"$3" != x ] || exit_failure_syntax "no parameter value given"
-
-op="$1"
-parm="$2"
-shift 2
-
-if [ x"$op" != x"get" -a x"$op" != x"check" -a x"$op" != x"set" ]; then
- exit_failure_syntax "invalid operation"
-fi
-
-detectDE
-
-case "$DE" in
- kde|gnome*|xfce)
- dispatch_specific "$@"
- ;;
-
- generic)
- dispatch_generic "$@"
- ;;
-
- *)
- exit_failure_operation_impossible "unknown desktop environment"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-su b/chromium/third_party/xdg-utils/scripts/xdg-su
deleted file mode 100755
index 88cf2280f3a..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-su
+++ /dev/null
@@ -1,438 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-su
-#
-# Utility script to run a command as an alternate user, generally
-# the root user, with a graphical prompt for the root
-# password if needed
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-su - run a GUI program as root after prompting for the root password
-
-Synopsis
-
-xdg-su [-u user] -c command
-
-xdg-su { --help | --manual | --version }
-
-Description
-
-xdg-su provides a graphical dialog that prompts the user for a password to run
-command as user or as root if no user was specified.
-
-xdg-su is for use inside a desktop session only.
-
-xdg-su discards any stdout and stderr output from command.
-
-Options
-
--u user
- run command as user. The default is to run as root.
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-2
- One of the files passed on the command line did not exist.
-3
- A required tool could not be found.
-4
- The action failed.
-
-See Also
-
-su(1)
-
-Examples
-
-xdg-su -u root -c "/opt/shinythings/bin/install-GUI --install fast"
-
-Runs the /opt/shinythings/bin/install-GUI command with root permissions.
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-su - run a GUI program as root after prompting for the root password
-
-Synopsis
-
-xdg-su [-u user] -c command
-
-xdg-su { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-su: $@" >&2
- echo "Try 'xdg-su --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-su' or 'xdg-su --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-su: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-su: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-su: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-su: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-su: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-su: 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 "Use --novendor to override or 'xdg-su --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-su' or 'xdg-su --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-su 1.0beta2"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- fi
-}
-
-#----------------------------------------------------------------------------
-
-
-
-su_kde()
-{
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- KDESU=`kde4-config --locate kdesu --path exe 2>/dev/null`
- else
- KDESU=`which kdesu 2>/dev/null`
- fi
- if [ $? -eq 0 ] ; then
- if [ -z "$user" ] ; then
- $KDESU -c "$cmd"
- else
- $KDESU -u "$user" -c "$cmd"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- su_generic
- fi
-}
-
-su_gnome()
-{
- GSU=`which gnomesu 2>/dev/null`
- if [ $? -ne 0 ] ; then
- GSU=`which xsu 2>/dev/null`
- fi
- if [ $? -eq 0 ] ; then
- if [ -z "$user" ] ; then
- $GSU -c "$cmd"
- else
- $GSU -u "$user" -c "$cmd"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- su_generic
- fi
-}
-
-su_generic()
-{
- if [ -z "$user" ] ; then
- xterm -geom 60x5 -T "xdg-su: $cmd" -e su -c "$cmd"
- else
- xterm -geom 60x5 -T "xdg-su: $cmd" -e su -c "$cmd" "$user"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-user=
-cmd=
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- -u)
- if [ -z "$1" ] ; then
- exit_failure_syntax "user argument missing for -u"
- fi
- user="$1"
- shift
- ;;
-
- -c)
- if [ -z "$1" ] ; then
- exit_failure_syntax "command argument missing for -c"
- fi
- cmd="$1"
- shift
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- exit_failure_syntax "unexpected argument '$parm'"
- ;;
- esac
-done
-
-if [ -z "${cmd}" ] ; then
- exit_failure_syntax "command missing"
-fi
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- XSU=`which xsu 2>/dev/null`
- if [ $? -eq 0 ] ; then
- DE=generic
- fi
-fi
-
-case "$DE" in
- kde)
- su_kde
- ;;
-
- gnome)
- su_gnome
- ;;
-
- generic)
- su_generic
- ;;
-
- *)
- [ x"$user" = x"" ] && user=root
- exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-su.in b/chromium/third_party/xdg-utils/scripts/xdg-su.in
deleted file mode 100644
index 5985e8a9747..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-su.in
+++ /dev/null
@@ -1,161 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-su
-#
-# Utility script to run a command as an alternate user, generally
-# the root user, with a graphical prompt for the root
-# password if needed
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-su_kde()
-{
- if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
- KDESU=`kde4-config --locate kdesu --path exe 2>/dev/null`
- else
- KDESU=`which kdesu 2>/dev/null`
- fi
- if [ $? -eq 0 ] ; then
- if [ -z "$user" ] ; then
- $KDESU -c "$cmd"
- else
- $KDESU -u "$user" -c "$cmd"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- su_generic
- fi
-}
-
-su_gnome()
-{
- GSU=`which gnomesu 2>/dev/null`
- if [ $? -ne 0 ] ; then
- GSU=`which xsu 2>/dev/null`
- fi
- if [ $? -eq 0 ] ; then
- if [ -z "$user" ] ; then
- $GSU -c "$cmd"
- else
- $GSU -u "$user" -c "$cmd"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- su_generic
- fi
-}
-
-su_generic()
-{
- if [ -z "$user" ] ; then
- xterm -geom 60x5 -T "xdg-su: $cmd" -e su -c "$cmd"
- else
- xterm -geom 60x5 -T "xdg-su: $cmd" -e su -c "$cmd" "$user"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-[ x"$1" != x"" ] || exit_failure_syntax
-
-user=
-cmd=
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- -u)
- if [ -z "$1" ] ; then
- exit_failure_syntax "user argument missing for -u"
- fi
- user="$1"
- shift
- ;;
-
- -c)
- if [ -z "$1" ] ; then
- exit_failure_syntax "command argument missing for -c"
- fi
- cmd="$1"
- shift
- ;;
-
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- exit_failure_syntax "unexpected argument '$parm'"
- ;;
- esac
-done
-
-if [ -z "${cmd}" ] ; then
- exit_failure_syntax "command missing"
-fi
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- XSU=`which xsu 2>/dev/null`
- if [ $? -eq 0 ] ; then
- DE=generic
- fi
-fi
-
-case "$DE" in
- kde)
- su_kde
- ;;
-
- gnome*|lxde)
- su_gnome
- ;;
-
- generic)
- su_generic
- ;;
-
- *)
- [ x"$user" = x"" ] && user=root
- exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-terminal b/chromium/third_party/xdg-utils/scripts/xdg-terminal
deleted file mode 100755
index ab7dec7ebf3..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-terminal
+++ /dev/null
@@ -1,484 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-terminal
-#
-# Utility script to open the registered terminal emulator
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-#
-# LICENSE:
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-Name
-
-xdg-terminal - opens the user's preferred terminal emulator application
-
-Synopsis
-
-xdg-terminal [command]
-
-xdg-terminal { --help | --manual | --version }
-
-Description
-
-xdg-terminal opens the user's preferred terminal emulator application. If a
-command is provided the command will be executed by the shell within the newly
-opened terminal window.
-
-xdg-terminal is for use inside a desktop session only. It is not recommended to
-use xdg-terminal as root.
-
-Options
-
---help
- Show command synopsis.
---manual
- Show this manualpage.
---version
- Show the xdg-utils version information.
-
-Exit Codes
-
-An exit code of 0 indicates success while a non-zero exit code indicates
-failure. The following failure codes can be returned:
-
-1
- Error in command line syntax.
-3
- A required tool could not be found.
-4
- The action failed.
-
-Examples
-
-xdg-terminal
-
-Opens the user's default terminal emulator, just starting an interactive shell.
-
-xdg-terminal top
-
-Opens the user's default terminal emulator and lets it run the top executable.
-
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-xdg-terminal - opens the user's preferred terminal emulator application
-
-Synopsis
-
-xdg-terminal [command]
-
-xdg-terminal { --help | --manual | --version }
-
-_USAGE
-}
-
-#@xdg-utils-common@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-terminal: $@" >&2
- echo "Try 'xdg-terminal --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-terminal: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-terminal: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-terminal: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-terminal: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "xdg-terminal: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "xdg-terminal: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "xdg-terminal 1.0.2"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- else DE=""
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`kde${KDE_SESSION_VERSION}-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
-
-terminal_kde()
-{
- terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole`
-
- terminal_exec=`which $terminal 2>/dev/null`
-
- if [ -x "$terminal_exec" ]; then
- if [ x"$1" == x"" ]; then
- $terminal_exec
- else
- $terminal_exec -e "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable"
- fi
-}
-
-terminal_gnome()
-{
- term_exec_key="/desktop/gnome/applications/terminal/exec"
- term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg"
-
- term_exec=`gconftool-2 --get ${term_exec_key}`
- term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}`
-
- terminal_exec=`which $term_exec 2>/dev/null`
-
- if [ -x "$terminal_exec" ]; then
- if [ x"$1" == x"" ]; then
- $terminal_exec
- else
- if [ x"$term_exec_arg" == x"" ]; then
- $terminal_exec "$1"
- else
- $terminal_exec "$term_exec_arg" "$1"
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable"
- fi
-}
-
-terminal_xfce()
-{
- if [ x"$1" == x"" ]; then
- exo-open --launch TerminalEmulator
- else
- exo-open --launch TerminalEmulator "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-terminal_generic()
-{
- # if $TERM is not set, try xterm
- if [ x"$TERM" == x"" ]; then
- TERM=xterm
- fi
-
- terminal_exec=`which $TERM >/dev/null 2>/dev/null`
-
- if [ -x "$terminal_exec" ]; then
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable"
- fi
-}
-
-terminal_lxde()
-{
- if which lxterminal &>/dev/null; then
- if [ x"$1" == x"" ]; then
- lxterminal
- else
- lxterminal -e "$1"
- fi
- else
- terminal_generic "$1"
- fi
-}
-
-#[ x"$1" != x"" ] || exit_failure_syntax
-
-command=
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$command" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- command="$parm"
- ;;
- esac
-done
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- # if TERM variable is not set, try xterm
- if [ x"$TERM" = x"" ]; then
- TERM=xterm
- fi
- DE=generic
-fi
-
-case "$DE" in
- kde)
- terminal_kde "$command"
- ;;
-
- gnome)
- terminal_gnome "$command"
- ;;
-
- xfce)
- terminal_xfce "$command"
- ;;
-
- lxde)
- terminal_lxde "$command"
- ;;
-
- generic)
- terminal_generic "$command"
- ;;
-
- *)
- exit_failure_operation_impossible "no terminal emulator available"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-terminal.in b/chromium/third_party/xdg-utils/scripts/xdg-terminal.in
deleted file mode 100644
index a4f2acf1547..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-terminal.in
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/bin/sh
-#---------------------------------------------
-# xdg-terminal
-#
-# Utility script to open the registered terminal emulator
-#
-# Refer to the usage() function below for usage.
-#
-# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-#
-# LICENSE:
-#
-#---------------------------------------------
-
-manualpage()
-{
-cat << _MANUALPAGE
-_MANUALPAGE
-}
-
-usage()
-{
-cat << _USAGE
-_USAGE
-}
-
-#@xdg-utils-common@
-
-terminal_kde()
-{
- terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole`
-
- terminal_exec=`which $terminal 2>/dev/null`
-
- if [ -x "$terminal_exec" ]; then
- if [ x"$1" == x"" ]; then
- $terminal_exec
- else
- $terminal_exec -e "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable"
- fi
-}
-
-terminal_gnome()
-{
- term_exec_key="/desktop/gnome/applications/terminal/exec"
- term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg"
-
- term_exec=`gconftool-2 --get ${term_exec_key}`
- term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}`
-
- terminal_exec=`which $term_exec 2>/dev/null`
-
- if [ -x "$terminal_exec" ]; then
- if [ x"$1" == x"" ]; then
- $terminal_exec
- else
- if [ x"$term_exec_arg" == x"" ]; then
- $terminal_exec "$1"
- else
- $terminal_exec "$term_exec_arg" "$1"
- fi
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable"
- fi
-}
-
-terminal_xfce()
-{
- if [ x"$1" == x"" ]; then
- exo-open --launch TerminalEmulator
- else
- exo-open --launch TerminalEmulator "$1"
- fi
-
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
-}
-
-terminal_generic()
-{
- # if $TERM is not set, try xterm
- if [ x"$TERM" == x"" ]; then
- TERM=xterm
- fi
-
- terminal_exec=`which $TERM >/dev/null 2>/dev/null`
-
- if [ -x "$terminal_exec" ]; then
- if [ $? -eq 0 ]; then
- exit_success
- else
- exit_failure_operation_failed
- fi
- else
- exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable"
- fi
-}
-
-terminal_lxde()
-{
- if which lxterminal &>/dev/null; then
- if [ x"$1" == x"" ]; then
- lxterminal
- else
- lxterminal -e "$1"
- fi
- else
- terminal_generic "$1"
- fi
-}
-
-#[ x"$1" != x"" ] || exit_failure_syntax
-
-command=
-while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- -*)
- exit_failure_syntax "unexpected option '$parm'"
- ;;
-
- *)
- if [ -n "$command" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
- fi
- command="$parm"
- ;;
- esac
-done
-
-detectDE
-
-if [ x"$DE" = x"" ]; then
- # if TERM variable is not set, try xterm
- if [ x"$TERM" = x"" ]; then
- TERM=xterm
- fi
- DE=generic
-fi
-
-case "$DE" in
- kde)
- terminal_kde "$command"
- ;;
-
- gnome*)
- terminal_gnome "$command"
- ;;
-
- xfce)
- terminal_xfce "$command"
- ;;
-
- lxde)
- terminal_lxde "$command"
- ;;
-
- generic)
- terminal_generic "$command"
- ;;
-
- *)
- exit_failure_operation_impossible "no terminal emulator available"
- ;;
-esac
diff --git a/chromium/third_party/xdg-utils/scripts/xdg-utils-common.in b/chromium/third_party/xdg-utils/scripts/xdg-utils-common.in
deleted file mode 100644
index cea664622fd..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xdg-utils-common.in
+++ /dev/null
@@ -1,329 +0,0 @@
-
-#----------------------------------------------------------------------------
-# Common utility functions included in all XDG wrapper scripts
-#----------------------------------------------------------------------------
-
-DEBUG()
-{
- [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
- [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
- shift
- echo "$@" >&2
-}
-
-# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
-#-------------------------------------------------------------
-# map a binary to a .desktop file
-binary_to_desktop_file()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- binary="`which "$1"`"
- binary="`readlink -f "$binary"`"
- base="`basename "$binary"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" ] || continue
- [ -d "$dir/applications" -o -d "$dir/applnk" ] || continue
- for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
- [ -r "$file" ] || continue
- # Check to make sure it's worth the processing.
- grep -q "^Exec.*$base" "$file" || continue
- # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
- grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- if [ x"`readlink -f "$command"`" = x"$binary" ]; then
- # Fix any double slashes that got added path composition
- echo "$file" | sed -e 's,//*,/,g'
- return
- fi
- done
- done
-}
-
-#-------------------------------------------------------------
-# map a .desktop file to a binary
-## FIXME: handle vendor dir case
-desktop_file_to_binary()
-{
- search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
- desktop="`basename "$1"`"
- IFS=:
- for dir in $search; do
- unset IFS
- [ "$dir" -a -d "$dir/applications" ] || continue
- file="$dir/applications/$desktop"
- [ -r "$file" ] || continue
- # Remove any arguments (%F, %f, %U, %u, etc.).
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
- command="`which "$command"`"
- readlink -f "$command"
- return
- done
-}
-
-#-------------------------------------------------------------
-# Exit script on successfully completing the desired operation
-
-exit_success()
-{
- if [ $# -gt 0 ]; then
- echo "$@"
- echo
- fi
-
- exit 0
-}
-
-
-#-----------------------------------------
-# Exit script on malformed arguments, not enough arguments
-# or missing required option.
-# prints usage information
-
-exit_failure_syntax()
-{
- if [ $# -gt 0 ]; then
- echo "@NAME@: $@" >&2
- echo "Try '@NAME@ --help' for more information." >&2
- else
- usage
- echo "Use 'man @NAME@' or '@NAME@ --manual' for additional info."
- fi
-
- exit 1
-}
-
-#-------------------------------------------------------------
-# Exit script on missing file specified on command line
-
-exit_failure_file_missing()
-{
- if [ $# -gt 0 ]; then
- echo "@NAME@: $@" >&2
- fi
-
- exit 2
-}
-
-#-------------------------------------------------------------
-# Exit script on failure to locate necessary tool applications
-
-exit_failure_operation_impossible()
-{
- if [ $# -gt 0 ]; then
- echo "@NAME@: $@" >&2
- fi
-
- exit 3
-}
-
-#-------------------------------------------------------------
-# Exit script on failure returned by a tool application
-
-exit_failure_operation_failed()
-{
- if [ $# -gt 0 ]; then
- echo "@NAME@: $@" >&2
- fi
-
- exit 4
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
-
-exit_failure_file_permission_read()
-{
- if [ $# -gt 0 ]; then
- echo "@NAME@: $@" >&2
- fi
-
- exit 5
-}
-
-#------------------------------------------------------------
-# Exit script on insufficient permission to write a specified file
-
-exit_failure_file_permission_write()
-{
- if [ $# -gt 0 ]; then
- echo "@NAME@: $@" >&2
- fi
-
- exit 6
-}
-
-check_input_file()
-{
- if [ ! -e "$1" ]; then
- exit_failure_file_missing "file '$1' does not exist"
- fi
- if [ ! -r "$1" ]; then
- exit_failure_file_permission_read "no permission to read file '$1'"
- fi
-}
-
-check_vendor_prefix()
-{
- file_label="$2"
- [ -n "$file_label" ] || file_label="filename"
- file=`basename "$1"`
- case "$file" in
- [a-zA-Z]*-*)
- return
- ;;
- esac
-
- echo "@NAME@: $file_label '$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 '"$file_label"' is '"'example-$file'" >&2
- echo "Use --novendor to override or '@NAME@ --manual' for additional info." >&2
- exit 1
-}
-
-check_output_file()
-{
- # if the file exists, check if it is writeable
- # if it does not exists, check if we are allowed to write on the directory
- if [ -e "$1" ]; then
- if [ ! -w "$1" ]; then
- exit_failure_file_permission_write "no permission to write to file '$1'"
- fi
- else
- DIR=`dirname "$1"`
- if [ ! -w "$DIR" -o ! -x "$DIR" ]; then
- exit_failure_file_permission_write "no permission to create file '$1'"
- fi
- fi
-}
-
-#----------------------------------------
-# Checks for shared commands, e.g. --help
-
-check_common_commands()
-{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --help)
- usage
- echo "Use 'man @NAME@' or '@NAME@ --manual' for additional info."
- exit_success
- ;;
-
- --manual)
- manualpage
- exit_success
- ;;
-
- --version)
- echo "@NAME@ 1.1.0 rc1"
- exit_success
- ;;
- esac
- done
-}
-
-check_common_commands "$@"
-
-[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
- # Be silent
- xdg_redirect_output=" > /dev/null 2> /dev/null"
-else
- # All output to stderr
- xdg_redirect_output=" >&2"
-fi
-
-#--------------------------------------
-# Checks for known desktop environments
-# set variable DE to the desktop environments name, lowercase
-
-detectDE()
-{
- # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
- unset GREP_OPTIONS
-
- if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
- case "${XDG_CURRENT_DESKTOP}" in
- GNOME)
- DE=gnome;
- ;;
- KDE)
- DE=kde;
- ;;
- LXDE)
- DE=lxde;
- ;;
- XFCE)
- DE=xfce
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
- elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
- elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
- fi
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to checking $DESKTOP_SESSION
- case "$DESKTOP_SESSION" in
- gnome)
- DE=gnome;
- ;;
- LXDE)
- DE=lxde;
- ;;
- xfce|xfce4)
- DE=xfce;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"" ]; then
- # fallback to uname output for other platforms
- case "$(uname 2>/dev/null)" in
- Darwin)
- DE=darwin;
- ;;
- esac
- fi
-
- if [ x"$DE" = x"gnome" ]; then
- # gnome-default-applications-properties is only available in GNOME 2.x
- # but not in GNOME 3.x
- which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3"
- fi
-}
-
-#----------------------------------------------------------------------------
-# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-# It also always returns 1 in KDE 3.4 and earlier
-# Simply return 0 in such case
-
-kfmclient_fix_exit_code()
-{
- version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
- major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
- test "$major" -gt 3 && return $1
- test "$minor" -gt 5 && return $1
- test "$release" -gt 4 && return $1
- return 0
-}
diff --git a/chromium/third_party/xdg-utils/scripts/xsl/README b/chromium/third_party/xdg-utils/scripts/xsl/README
deleted file mode 100644
index 977df294fb7..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xsl/README
+++ /dev/null
@@ -1,23 +0,0 @@
-Hereyou find some XSL transformation scripts for processing mime
-type definitions in XML format as defined by the Shared MIME-info Database
-specification [1]
-
-xdg-mime actually embeds a version of these scripts, the versions in this
-directory are for entertainment purposes only
-
-[1] http://www.freedesktop.org/wiki/Standards/shared-mime-info-spec
-===
-Command: xsltproc sharedmime-list.xsl input-file.xml
-
-Lists all mimetypes contained in a shared mime Database XML input file
-===
-Command: xsltproc --stringparam type mime/type \
- --stringparam source input-file.xml \
- sharedmime2mimelnk.xsl /path/to/input-file.xml
-
-Converts the mimetype "mime/type" contained in a shared mime Database XML
-input file into KDE's mimelnk format.
-===
-TODO:
-* Add support for magic entries and convert to KDE magic chunks in
- share/config/magic/* \ No newline at end of file
diff --git a/chromium/third_party/xdg-utils/scripts/xsl/refentry2htmlindex.xsl b/chromium/third_party/xdg-utils/scripts/xsl/refentry2htmlindex.xsl
deleted file mode 100644
index caabb32533f..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xsl/refentry2htmlindex.xsl
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html"
- encoding="UTF-8"
- omit-xml-declaration="yes"
- indent="no"/>
-<xsl:template match="/">
- <xsl:for-each select='refentry/refnamediv'>
- <xsl:variable name="href">
- <xsl:value-of select="refname"/>
- <xsl:text>.html</xsl:text>
- </xsl:variable>
- <tr>
- <td><a href="{$href}"><xsl:value-of select="refname"/></a>:</td>
- <td><xsl:value-of select="refpurpose"/></td>
- </tr>
- </xsl:for-each>
-</xsl:template>
-</xsl:stylesheet>
diff --git a/chromium/third_party/xdg-utils/scripts/xsl/sharedmime-list.xsl b/chromium/third_party/xdg-utils/scripts/xsl/sharedmime-list.xsl
deleted file mode 100644
index 3e6a9d0b706..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xsl/sharedmime-list.xsl
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info">
-<xsl:output method="text"
- encoding="UTF-8"
- indent="no"/>
-<xsl:template match="/">
- <xsl:for-each select='mime:mime-info/mime:mime-type'>
- <xsl:value-of select="@type"/><xsl:text>&#10;</xsl:text>
- </xsl:for-each>
-</xsl:template>
-</xsl:stylesheet>
diff --git a/chromium/third_party/xdg-utils/scripts/xsl/sharedmime2mimelnk.xsl b/chromium/third_party/xdg-utils/scripts/xsl/sharedmime2mimelnk.xsl
deleted file mode 100644
index b5b42e58779..00000000000
--- a/chromium/third_party/xdg-utils/scripts/xsl/sharedmime2mimelnk.xsl
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info">
-<xsl:output method="text"
- encoding="UTF-8"
- indent="no"/>
-<xsl:template match="/">
- <xsl:for-each select='mime:mime-info/mime:mime-type[@type=$type]'>
- <xsl:text>[Desktop Entry]&#10;</xsl:text>
- <xsl:text># Installed by xdg-mime from </xsl:text><xsl:value-of select="$source"/><xsl:text>&#10;</xsl:text>
- <xsl:text>Type=MimeType&#10;</xsl:text>
- <xsl:text>MimeType=</xsl:text><xsl:value-of select="@type"/><xsl:text>&#10;</xsl:text>
- <xsl:text>Icon=</xsl:text><xsl:value-of select="translate(@type,'/','-')"/><xsl:text>&#10;</xsl:text>
- <xsl:if test="mime:sub-class-of">
- <xsl:text>X-KDE-IsAlso=</xsl:text><xsl:value-of select="mime:sub-class-of/@type"/><xsl:text>&#10;</xsl:text>
- </xsl:if>
- <xsl:if test="mime:glob">
- <xsl:text>Patterns=</xsl:text>
- <xsl:for-each select='mime:glob[@pattern]'>
- <xsl:value-of select="@pattern"/><xsl:text>;</xsl:text>
- </xsl:for-each>
- <xsl:text>&#10;</xsl:text>
- </xsl:if>
- <xsl:text>Comment=</xsl:text><xsl:value-of select="mime:comment[not(@xml:lang)]"/><xsl:text>&#10;</xsl:text>
- <xsl:for-each select='mime:comment[@xml:lang]'>
- <xsl:sort select='@xml:lang'/>
- <xsl:text>Comment[</xsl:text><xsl:value-of select="@xml:lang"/><xsl:text>]=</xsl:text><xsl:value-of select="."/><xsl:text>&#10;</xsl:text>
- </xsl:for-each>
- </xsl:for-each>
-</xsl:template>
-</xsl:stylesheet>