Fix xprop error in DE detection

This commit is contained in:
Dylan 2016-04-04 22:30:49 +10:00
parent 49c9d78d55
commit f306506c57
1 changed files with 2 additions and 2 deletions

View File

@ -773,8 +773,8 @@ getde () {
;;
esac
if [ -z "$de" ]; then
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MARCO|^_MUFFIN|xfce4|xfce5/')"
if [ -n "$DISPLAY" ] && [ -z "$de" ]; then
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MARCO|^_MUFFIN|xfce4|xfce5/' 2>/dev/null)"
case "$de" in
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;