8 lines
428 B
Bash
Executable File
8 lines
428 B
Bash
Executable File
#!/bin/bash
|
|
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;
|
|
fi
|
|
echo $DE
|