summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Dieter <rdieter@fedoraproject.org>2011-03-28 10:48:56 -0500
committerRex Dieter <rdieter@fedoraproject.org>2011-03-28 10:48:56 -0500
commita9d65ff51ce0dd40cf0cb39b0f3c36dca100c527 (patch)
treec2743a7309ec8bc3e4bf16909041da3bfb864b11
parent406b9294033cee0330be5b681f7809376ed66121 (diff)
use $DESKTOP_SESSION as fallback to help xfce misdetection
revert clearing of DE var (though for posterity should consider using a name-spaced XDG_DE instead)
-rw-r--r--ChangeLog3
-rw-r--r--scripts/xdg-utils-common.in16
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1337f9c..f615c1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.x ===
+2011-03-28 Rex Dieter <rdieter@fedoraproject.org>
+ * xdg-open cannot detect xfce 4.8 correctly (BR33321)
+
2011-02-01 Rex Dieter <rdieter@fedoraproject.org>
* add support for GNOME 3.x
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index be21161..80e0fd5 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -197,11 +197,21 @@ detectDE()
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
- if [ "x$DE" = "xgnome" ]; then
+ if [ x"$DE" = x"" ]; then
+ # if all else fails, fallback to checking $DESKTOP_SESSION
+ case "$DESKTOP_SESSION" in
+ LXDE)
+ DE=lxde;
+ ;;
+ xfce|xfce4)
+ DE=xfce;
+ ;;
+ 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 2> /dev/null || DE="gnome3"