-+ Runs the /opt/shinythings/bin/install-GUI command with root permissions.
-+
---- scripts/man/xdg-su.1
-+++ scripts/man/xdg-su.1
-@@ -0,0 +1,75 @@
-+.\" ** You probably do not want to edit this file directly **
-+.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-+.\" Instead of manually editing it, you probably should edit the DocBook XML
-+.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-+.TH "XDG\-SU" "1" "07/31/2006" "This is release 0.5 of the xdg\-su Manual" ""
-+.\" disable hyphenation
-+.nh
-+.\" disable justification (adjust text to left margin only)
-+.ad l
-+.SH "NAME"
-+xdg\-su \- run a GUI program as root after prompting for the root password
-+.SH "SYNOPSIS"
-+.HP 7
-+\fBxdg\-su\fR [\fB\-u\ \fR\fB\fIuser\fR\fR] \fB\-c\ \fR\fB\fIcommand\fR\fR
-+.HP 7
-+\fBxdg\-su\fR {\fB\-\-help\fR \fB\-\-manual\fR \fB\-\-version\fR}
-+.SH "DESCRIPTION"
-+.PP
-+xdg\-su provides a graphical dialog that prompts the user for a password to run
-+\fIcommand\fR
-+as
-+\fIuser\fR
-+or as root if no user was specified.
-+.PP
-+xdg\-su is for use inside a desktop session only.
-+.PP
-+xdg\-su discards any stdout and stderr output from
-+\fIcommand\fR.
-+.SH "OPTIONS"
-+.TP
-+\fB\-u \fR\fB\fIuser\fR\fR
-+run
-+\fIcommand\fR
-+as
-+\fIuser\fR. The default is to run as root.
-+.TP
-+\fB\-\-help\fR
-+Show command synopsis.
-+.TP
-+\fB\-\-manual\fR
-+Show this manualpage.
-+.TP
-+\fB\-\-version\fR
-+Show the xdg\-utils version information.
-+.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:
-+.TP
-+\fB1\fR
-+Error in command line syntax.
-+.TP
-+\fB2\fR
-+One of the files passed on the command line did not exist.
-+.TP
-+\fB3\fR
-+A required tool could not be found.
-+.TP
-+\fB4\fR
-+The action failed.
-+.SH "SEE ALSO"
-+.PP
-+\fBsu\fR(1)
-+.SH "EXAMPLES"
-+.PP
-+.nf
-+xdg\-su \-u root \-c "/opt/shinythings/bin/install\-GUI \-\-install fast"
-+.fi
-+.sp
-+Runs the /opt/shinythings/bin/install\-GUI command with root permissions.
-+.SH "AUTHOR"
-+Kevin Krammer, Jeremy White.
-+.br
-+
-+.br
-+
---- scripts/xdg-su
-+++ scripts/xdg-su
-@@ -0,0 +1,434 @@
-+#!/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
-+# Copyright 2006, Kevin Krammer
-+#
-+# 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()
-+{
-+ KDESU=`which kdesu 2>/dev/null`
-+ 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 -u "$user" -c "$cmd"
-+ 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
-+ which xterm 2>/dev/null >&2
-+ if [ $? -eq 0 -a -n "$DISPLAY" ] ; 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/xdg-terminal b/xdg-terminal
deleted file mode 100644
index 2a4026e..0000000
--- a/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
-# Copyright 2009-2010, Rex Dieter
-# Copyright 2006, Kevin Krammer
-#
-# 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/xdg-utils-1.0.2-bnc591714.patch b/xdg-utils-1.0.2-bnc591714.patch
deleted file mode 100644
index 4b04443..0000000
--- a/xdg-utils-1.0.2-bnc591714.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -uNr old-xdg-utils-1.0.2//scripts/xdg-email xdg-utils-1.0.2/scripts/xdg-email
---- old-xdg-utils-1.0.2//scripts/xdg-email 2010-04-02 16:58:27.281598288 +0200
-+++ xdg-utils-1.0.2/scripts/xdg-email 2010-04-02 17:00:27.931347778 +0200
-@@ -617,11 +617,12 @@
- detectDE
-
- if [ x"$DE" = x"" ]; then
-- # if BROWSER variable is not set, check some well known browsers instead
-- if [ x"$BROWSER" = x"" ]; then
-- BROWSER=firefox:mozilla:netscape
-- fi
-- DE=generic
-+ DE=generic
-+fi
-+
-+# if BROWSER variable is not set, check some well known browsers instead
-+if [ x"$BROWSER" = x"" ]; then
-+ BROWSER=firefox:mozilla:netscape
- fi
-
- case "$DE" in
-diff -uNr old-xdg-utils-1.0.2//scripts/xdg-open xdg-utils-1.0.2/scripts/xdg-open
---- old-xdg-utils-1.0.2//scripts/xdg-open 2010-04-02 16:58:27.290596083 +0200
-+++ xdg-utils-1.0.2/scripts/xdg-open 2010-04-02 16:59:40.015352868 +0200
-@@ -408,13 +408,14 @@
- detectDE
-
- if [ x"$DE" = x"" ]; then
-- # if BROWSER variable is not set, check some well known browsers instead
-- if [ x"$BROWSER" = x"" ]; then
-- BROWSER=firefox:mozilla:netscape
-- fi
- DE=generic
- fi
-
-+# if BROWSER variable is not set, check some well known browsers instead
-+if [ x"$BROWSER" = x"" ]; then
-+ BROWSER=firefox:mozilla:netscape
-+fi
-+
- case "$DE" in
- kde)
- open_kde "$url"
diff --git a/xdg-utils-1.0.2-lxde-support.patch b/xdg-utils-1.0.2-lxde-support.patch
deleted file mode 100644
index b94f70c..0000000
--- a/xdg-utils-1.0.2-lxde-support.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-diff -uNr xdg-utils-1.0.2/scripts/xdg-desktop-icon newxdg-utils-1.0.2//scripts/xdg-desktop-icon
---- xdg-utils-1.0.2/scripts/xdg-desktop-icon 2007-06-24 21:57:55.000000000 +0200
-+++ newxdg-utils-1.0.2//scripts/xdg-desktop-icon 2010-01-15 09:43:28.426802335 +0100
-@@ -405,6 +405,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-diff -uNr xdg-utils-1.0.2/scripts/xdg-desktop-menu newxdg-utils-1.0.2//scripts/xdg-desktop-menu
---- xdg-utils-1.0.2/scripts/xdg-desktop-menu 2007-06-24 21:57:53.000000000 +0200
-+++ newxdg-utils-1.0.2//scripts/xdg-desktop-menu 2010-01-15 09:43:50.089551069 +0100
-@@ -601,6 +601,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-diff -uNr xdg-utils-1.0.2/scripts/xdg-email newxdg-utils-1.0.2//scripts/xdg-email
---- xdg-utils-1.0.2/scripts/xdg-email 2010-01-15 09:48:49.339576494 +0100
-+++ newxdg-utils-1.0.2//scripts/xdg-email 2010-01-15 09:45:06.868551938 +0100
-@@ -357,6 +357,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-@@ -636,6 +637,10 @@
- open_xfce "${mailto}"
- ;;
-
-+ lxde)
-+ open_generic "${mailto}"
-+ ;;
-+
- generic)
- open_generic "${mailto}"
- ;;
-diff -uNr xdg-utils-1.0.2/scripts/xdg-icon-resource newxdg-utils-1.0.2//scripts/xdg-icon-resource
---- xdg-utils-1.0.2/scripts/xdg-icon-resource 2007-06-24 21:57:59.000000000 +0200
-+++ newxdg-utils-1.0.2//scripts/xdg-icon-resource 2010-01-15 09:41:58.299551265 +0100
-@@ -397,6 +397,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-diff -uNr xdg-utils-1.0.2/scripts/xdg-mime newxdg-utils-1.0.2//scripts/xdg-mime
---- xdg-utils-1.0.2/scripts/xdg-mime 2010-01-15 09:48:49.340574736 +0100
-+++ newxdg-utils-1.0.2//scripts/xdg-mime 2010-01-15 09:45:30.882550232 +0100
-@@ -426,6 +426,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-diff -uNr xdg-utils-1.0.2/scripts/xdg-open newxdg-utils-1.0.2//scripts/xdg-open
---- xdg-utils-1.0.2/scripts/xdg-open 2010-01-15 09:48:42.104831802 +0100
-+++ newxdg-utils-1.0.2//scripts/xdg-open 2010-01-15 09:46:51.860550227 +0100
-@@ -304,6 +304,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-@@ -427,6 +428,10 @@
- open_xfce "$url"
- ;;
-
-+ lxde)
-+ open_generic "$url"
-+ ;;
-+
- generic)
- open_generic "$url"
- ;;
-diff -uNr xdg-utils-1.0.2/scripts/xdg-screensaver newxdg-utils-1.0.2//scripts/xdg-screensaver
---- xdg-utils-1.0.2/scripts/xdg-screensaver 2007-06-24 21:58:06.000000000 +0200
-+++ newxdg-utils-1.0.2//scripts/xdg-screensaver 2010-01-15 09:47:04.734550060 +0100
-@@ -334,6 +334,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-diff -uNr xdg-utils-1.0.2/scripts/xdg-su newxdg-utils-1.0.2//scripts/xdg-su
---- xdg-utils-1.0.2/scripts/xdg-su 2010-01-15 09:50:47.725800172 +0100
-+++ newxdg-utils-1.0.2//scripts/xdg-su 2010-01-15 09:26:22.031552239 +0100
-@@ -301,6 +301,7 @@
- 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;
-+ elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
- fi
- }
-
-@@ -376,6 +377,15 @@
- fi
- }
-
-+su_lxde()
-+{
-+ if which gnomesu &>/dev/null ; then
-+ su_gnome
-+ else
-+ su_generic
-+ fi
-+}
-+
- [ x"$1" != x"" ] || exit_failure_syntax
-
- user=
-@@ -441,6 +451,10 @@
- su_xfce
- ;;
-
-+ lxde)
-+ su_lxde
-+ ;;
-+
- *)
- [ x"$user" = x"" ] && user=root
- exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"
-
diff --git a/xdg-utils-1.0.2.tar.bz2 b/xdg-utils-1.0.2.tar.bz2
deleted file mode 100644
index a3f9dc2..0000000
--- a/xdg-utils-1.0.2.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d018571df357c9d41eea1cd60ee85b464d505c9606d4c1055016979c0b4cf5e0
-size 267214
diff --git a/xdg-utils-20120310.tar.xz b/xdg-utils-20120310.tar.xz
new file mode 100644
index 0000000..778d361
--- /dev/null
+++ b/xdg-utils-20120310.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:974f500adc492db1a45f647c4ca44ee9e5d315376b74521c1fd7a82b9f79ca6b
+size 271840
diff --git a/xdg-utils.changes b/xdg-utils.changes
index ada1925..54ca896 100644
--- a/xdg-utils.changes
+++ b/xdg-utils.changes
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Fri Jun 29 00:27:04 CEST 2012 - jslaby@suse.de
+
+- update to snapshot from 20120310
+ * many local patches are gone, since they were merged
+ * fixes many issues (see bnc#749612, bnc#703396, bnc#752977)
+ * see ChangeLog for updates
+- clean the specfile a bit
+
-------------------------------------------------------------------
Mon May 21 10:16:02 UTC 2012 - vargusz@fazekas.hu
diff --git a/xdg-utils.spec b/xdg-utils.spec
index 1bf1405..a29726c 100644
--- a/xdg-utils.spec
+++ b/xdg-utils.spec
@@ -1,7 +1,7 @@
#
# spec file for package xdg-utils
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,36 +15,29 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-
Name: xdg-utils
BuildRequires: make
+BuildRequires: xmlto
+BuildRequires: xz
+# for xmlto to be able to generate text from html
+BuildRequires: w3m
+Summary: Utilities to uniformly interface desktop environments
License: MIT
Group: System/GUI/Other
-Summary: Utilities to uniformly interface desktop environments
-Version: 1.0.2
-Release: 96
+Version: 20120310
+Release: 0
BuildArch: noarch
Url: http://portland.freedesktop.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# http://portland.freedesktop.org/download/xdg-utils-%{version}.tgz
-Source0: xdg-utils-%{version}.tar.bz2
-Source1: http://cgit.freedesktop.org/xdg/xdg-utils/plain/scripts/xdg-terminal
-Patch0: xdg-su.diff
+# http://portland.freedesktop.org/download/xdg-utils-%%{version}.tgz
+Source0: xdg-utils-%{version}.tar.xz
+Patch0: install-some-more-scripts.diff
Patch1: xfce-su.diff
-Patch2: CVE-2008-0386.diff
-Patch3: xdg-kde4-upstream.patch
-# PATCH-FEATURE-UPSTREAM xdg-utils-1.0.2-lxde-support.patch fdo#26058 andrea@opensuse.org
-# this patch add lxde support to xdg-su and other scripts
-Patch4: %name-1.0.2-lxde-support.patch
-# PATCH-FIX-UPSTREAM xdg-utils-1.0.2-bnc591714.patch fdo#27551 andrea@opensuse.org
-# this patch fix bnc#591714
-Patch5: %name-1.0.2-bnc591714.patch
-Patch6: xdg-screensaver-sleep.diff
-Patch7: xdg-screensaver-gnome-dbus.diff
Patch8: xdg-screensaver-gnome-perl.diff
-Requires: perl, perl-Net-DBus, perl-X11-Protocol
+Requires: perl
+Requires: perl-Net-DBus
+Requires: perl-X11-Protocol
%description
The xdg-utils package is a set of simple scripts that provide basic
@@ -65,52 +58,41 @@ these utilities work properly in their environment.
%prep
%setup -q -n %name-%{version}
-%patch0
-%patch1
-%patch2
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6
-%patch7
-%patch8
+%patch0 -p1
+%patch1 -p1
+%patch8 -p1
%build
%configure
+(cd scripts; make scripts)
make %{?_smp_flags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
-%__install -D -m0755 "%{SOURCE1}" "%{buildroot}%{_bindir}/xdg-terminal"
-
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc LICENSE README TODO ChangeLog
+%{_bindir}/xdg-desktop-icon
+%{_bindir}/xdg-desktop-menu
+%{_bindir}/xdg-email
+%{_bindir}/xdg-icon-resource
+%{_bindir}/xdg-mime
+%{_bindir}/xdg-open
+%{_bindir}/xdg-su
+%{_bindir}/xdg-screensaver
+%{_bindir}/xdg-settings
%{_bindir}/xdg-terminal
-#/usr/bin/xdg-copy
-/usr/bin/xdg-desktop-icon
-/usr/bin/xdg-desktop-menu
-/usr/bin/xdg-email
-/usr/bin/xdg-icon-resource
-#/usr/bin/xdg-menu
-/usr/bin/xdg-mime
-/usr/bin/xdg-open
-/usr/bin/xdg-su
-/usr/bin/xdg-screensaver
-#%{_mandir}/man1/xdg-copy.1*
-#%{_mandir}/man1/xdg-desktop.1*
%{_mandir}/man1/xdg-desktop-icon.1*
%{_mandir}/man1/xdg-desktop-menu.1*
%{_mandir}/man1/xdg-email.1*
%{_mandir}/man1/xdg-icon-resource.1*
-#%{_mandir}/man1/xdg-menu.1*
%{_mandir}/man1/xdg-mime.1*
%{_mandir}/man1/xdg-open.1*
-%{_mandir}/man1/xdg-su.1*
%{_mandir}/man1/xdg-screensaver.1*
+%{_mandir}/man1/xdg-settings.1*
%changelog
diff --git a/xfce-su.diff b/xfce-su.diff
index 4c72fb0..3ed2e43 100644
--- a/xfce-su.diff
+++ b/xfce-su.diff
@@ -1,6 +1,10 @@
---- scripts/xdg-su
-+++ scripts/xdg-su
-@@ -366,6 +366,16 @@
+---
+ scripts/xdg-su.in | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/scripts/xdg-su.in
++++ b/scripts/xdg-su.in
+@@ -93,6 +93,16 @@ su_generic()
fi
}
@@ -17,7 +21,7 @@
[ x"$1" != x"" ] || exit_failure_syntax
user=
-@@ -427,6 +437,10 @@
+@@ -154,6 +164,10 @@ case "$DE" in
su_generic
;;
@@ -26,5 +30,5 @@
+ ;;
+
*)
- [ x"$user" = x"" ] && user=root
+ [ x"$user" = x"" ] && user=root
exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'"