#!/bin/bash if [ x"$KDE_FULL_SESSION" = x"true" ]; then echo kde; elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then echo 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 echo gnome; elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then echo mate; elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.mate.SessionManager > /dev/null 2>&1`; then echo mate; elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then echo xfce; elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then echo lxde; elif [ x"$XDG_CURRENT_DESKTOP" = x"LXDE" ]; then echo lxde; else echo "" fi