--- old-xdg-email 2012-02-03 22:13:29.665023816 -0800 +++ xdg-email 2012-02-03 22:07:49.398770763 -0800 @@ -360,9 +360,24 @@ 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" = x"" ]; then + # fallback to checking $DESKTOP_SESSION + case "$DESKTOP_SESSION" in + gnome) + DE=gnome; + ;; + LXDE) + DE=lxde; + ;; + xfce|xfce4) + DE=xfce; + ;; + esac + fi + } #----------------------------------------------------------------------------