| Index: third_party/xdg-utils/scripts/xdg-terminal
|
| ===================================================================
|
| --- third_party/xdg-utils/scripts/xdg-terminal (revision 79890)
|
| +++ third_party/xdg-utils/scripts/xdg-terminal (working copy)
|
| @@ -6,6 +6,8 @@
|
| #
|
| # 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:
|
| @@ -195,7 +197,7 @@
|
| }
|
|
|
| #------------------------------------------------------------
|
| -# Exit script on insufficient permission to read a specified file
|
| +# Exit script on insufficient permission to write a specified file
|
|
|
| exit_failure_file_permission_write()
|
| {
|
| @@ -272,7 +274,7 @@
|
| ;;
|
|
|
| --version)
|
| - echo "xdg-terminal 1.0.1"
|
| + echo "xdg-terminal 1.0.2"
|
| exit_success
|
| ;;
|
| esac
|
| @@ -298,7 +300,10 @@
|
| {
|
| 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 `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
|
| }
|
|
|
| @@ -309,10 +314,10 @@
|
|
|
| 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/'`
|
| + 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
|
| @@ -323,7 +328,7 @@
|
| {
|
| terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole`
|
|
|
| - terminal_exec=`which $terminal >/dev/null 2>/dev/null`
|
| + terminal_exec=`which $terminal 2>/dev/null`
|
|
|
| if [ -x "$terminal_exec" ]; then
|
| if [ x"$1" == x"" ]; then
|
| @@ -408,6 +413,19 @@
|
| 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=
|
| @@ -452,6 +470,10 @@
|
| terminal_xfce "$command"
|
| ;;
|
|
|
| + lxde)
|
| + terminal_lxde "$command"
|
| + ;;
|
| +
|
| generic)
|
| terminal_generic "$command"
|
| ;;
|
|
|