diff --git a/inxi b/inxi index d1ff49b..91191af 100755 --- a/inxi +++ b/inxi @@ -2551,7 +2551,7 @@ detect_desktop_environment() # note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out # https://bugzilla.gnome.org/show_bug.cgi?id=542880 - if [[ ! -z $GNOME_DESKTOP_SESSION_ID ]]; then + if [[ -n $GNOME_DESKTOP_SESSION_ID ]]; then version=$( gnome-about --version 2>/dev/null | gawk '{print $3}' ) if [[ -n $version ]];then version=" $version" @@ -2651,8 +2651,10 @@ detect_desktop_environment() version=" $version" fi desktop_environment="IceWM${version}" - # a few manual hacks for things that don't id with xprop, these are just good guesses - elif [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then + fi + # a few manual hacks for things that don't id with xprop, these are just good guesses + else + if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then version=$( fvwm --version 2>/dev/null | grep -Esi 'fvwm [[:digit:]]' | gawk '{print $2}' ) if [[ -n $version ]];then version=" $version"