From f306506c573a820e3bb97830250c296ea68c4add Mon Sep 17 00:00:00 2001 From: Dylan Date: Mon, 4 Apr 2016 22:30:49 +1000 Subject: [PATCH] Fix xprop error in DE detection --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index c7e14746..14c19650 100755 --- a/neofetch +++ b/neofetch @@ -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/* = }" ;;