Index: scripts/xdg-email |
=================================================================== |
--- scripts/xdg-email (revision 81021) |
+++ scripts/xdg-email (working copy) |
@@ -356,15 +356,21 @@ |
detectDE() |
{ |
+ # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 |
+ unset GREP_OPTIONS |
+ |
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 |
if [ x"$DE" = x"" ]; then |
# fallback to checking $DESKTOP_SESSION |
case "$DESKTOP_SESSION" in |
+ gnome) |
+ DE=gnome; |
LXDE) |
DE=lxde; |
;; |
@@ -397,7 +403,6 @@ |
kfmclient_fix_exit_code() |
{ |
- [ x"$KDE_SESSION_VERSION" = x"4" ] && return 0; |
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/'` |
@@ -484,12 +489,12 @@ |
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 |
- # KDE uses locale's encoding when decoding the URI, so set it to UTF-8 |
- LC_ALL=C.UTF-8 $KMAILSERVICE "$1" |
- kfmclient_fix_exit_code $? |
if [ $? -eq 0 ]; then |
exit_success |
@@ -749,9 +754,9 @@ |
# if BROWSER variable is not set, check some well known browsers instead |
if [ x"$BROWSER" = x"" ]; then |
- BROWSER=links2:links:lynx:w3m |
+ BROWSER=links2:elinks:links:lynx:w3m |
if [ -n "$DISPLAY" ]; then |
- BROWSER=firefox:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER |
+ BROWSER=x-www-browser:firefox:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER |
fi |
fi |