fixed bugs

This commit is contained in:
inxi-svn 2011-05-21 22:46:13 +00:00
parent ec8fddfb0a
commit b6984a89c1

44
inxi
View file

@ -2562,7 +2562,7 @@ detect_desktop_environment()
version="$version (Gtk: $toolkit)"
fi
fi
desktop_environment="Gnome${version}"
desktop_environment="Gnome"
# assume 5 will id the same, why not, no need to update in future
elif [[ $KDE_SESSION_VERSION == '5' ]]; then
version_data=$( kded5 --version 2>/dev/null )
@ -2576,7 +2576,7 @@ detect_desktop_environment()
version="$version (Qt $toolkit)"
fi
fi
desktop_environment="KDE $version"
desktop_environment="KDE"
elif [[ $KDE_SESSION_VERSION == '4' ]]; then
version_data=$( kded4 --version 2>/dev/null )
version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
@ -2589,7 +2589,7 @@ detect_desktop_environment()
version="$version (Qt $toolkit)"
fi
fi
desktop_environment="KDE $version"
desktop_environment="KDE"
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
# src: http://humanreadable.nfshost.com/files/startkde
elif [[ $KDE_FULL_SESSION == 'true' ]]; then
@ -2605,7 +2605,7 @@ detect_desktop_environment()
version="$version (Qt $toolkit)"
fi
fi
desktop_environment="KDE $version"
desktop_environment="KDE"
# now that the primary ones have been handled, next is to find the ones with unique
# xprop detections possible
else
@ -2616,20 +2616,20 @@ detect_desktop_environment()
if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )"
if [[ -z $version ]];then
version="4"
version='4'
fi
desktop_environment="Xfce${version}"
desktop_environment="Xfce"
# when 5 is released, the string may need updating
elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )"
if [[ -z $version ]];then
version="5"
version='5'
fi
desktop_environment="Xfce${version}"
desktop_environment="Xfce"
elif [[ -n $( grep -is 'BLACKBOX_PID' <<< "$xprop_root" ) ]];then
if [[ -n $( grep -is 'fluxbox' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'fluxbox' 'fluxbox[[:space:]]([[:digit:]]|GIT)' '2' )"
desktop_environment="Fluxbox${version}"
desktop_environment='Fluxbox'
else
desktop_environment='Blackbox'
fi
@ -2639,33 +2639,36 @@ detect_desktop_environment()
if [[ -n $version ]];then
version=" (Openbox$version)"
fi
desktop_environment="LXDE${version}"
desktop_environment='LXDE'
else
desktop_environment="Openbox${version}"
desktop_environment='Openbox'
fi
elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then
version="$( get_de_version 'icewm' 'icewm[[:space:]]([[:digit:]]|GIT)' '2' )"
desktop_environment="IceWM${version}"
desktop_environment='IceWM'
fi
fi
# a few manual hacks for things that don't id with xprop, these are just good guesses
if [[ -z $desktop_environment ]];then
if [[ -n $( grep -is 'fvwm-crystal' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )"
desktop_environment="FVWM-Crystal${version}"
desktop_environment='FVWM-Crystal'
elif [[ -n $( grep -is 'fvwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'fvwm' 'fvwm[[:space:]]([[:digit:]]|GIT)' '2' )"
desktop_environment="FVWM${version}"
desktop_environment='FVWM'
elif [[ -n $( grep -is 'pekwm' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'pekwm' 'pekwm.*([[:digit:]]|GIT)' '3' )"
desktop_environment="pekwm${version}"
desktop_environment='pekwm'
elif [[ -n $( grep -is 'awesome' <<< "$ps_aux" | grep -v 'grep' ) ]];then
version="$( get_de_version 'awesome' 'awesome' '2' )"
desktop_environment="Awesome${version}"
desktop_environment='Awesome'
fi
fi
fi
echo $desktop_environment
if [[ -n $version ]];then
version=" $version"
fi
echo "$desktop_environment${version}"
eval $LOGFE
}
@ -2682,11 +2685,8 @@ get_de_version()
gsub(",","",$0)
print $'$3'
}' )
if [[ -n $version ]];then
version=" $version"
fi
echo "$version"
echo $version
}
# for more on distro id, please reference this python thread: http://bugs.python.org/issue1322
## return distro name/id if found