got gnome version/gtk version

This commit is contained in:
inxi-svn 2011-05-19 05:30:55 +00:00
parent 095313fa26
commit 962f1b9665

17
inxi
View file

@ -2552,7 +2552,16 @@ detect_desktop_environment()
# note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out # note, GNOME_DESKTOP_SESSION_ID is deprecated so we'll see how that works out
# https://bugzilla.gnome.org/show_bug.cgi?id=542880 # https://bugzilla.gnome.org/show_bug.cgi?id=542880
if [[ ! -z $GNOME_DESKTOP_SESSION_ID ]]; then if [[ ! -z $GNOME_DESKTOP_SESSION_ID ]]; then
desktop_environment='GNOME' version=$( gnome-about --version 2>/dev/null | gawk '{print $3}' )
if [[ -n $version ]];then
version=" $version"
fi
# this is a hack, and has to be changed with every toolkit version change
toolkit=$( pkg-config --modversion gtk+-2.0 2>/dev/null )
if [[ -n $toolkit ]];then
version="$version (Gtk: $toolkit)"
fi
desktop_environment="Gnome${version}"
# assume 5 will id the same, why not, no need to update in future # assume 5 will id the same, why not, no need to update in future
elif [[ $KDE_SESSION_VERSION == '5' ]]; then elif [[ $KDE_SESSION_VERSION == '5' ]]; then
desktop_environment='KDE 5' desktop_environment='KDE 5'
@ -2563,7 +2572,7 @@ detect_desktop_environment()
fi fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' ) toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then if [[ -n $toolkit ]];then
version="$version (Qt: $toolkit)" version="$version (Qt $toolkit)"
fi fi
desktop_environment="KDE $version" desktop_environment="KDE $version"
elif [[ $KDE_SESSION_VERSION == '4' ]]; then elif [[ $KDE_SESSION_VERSION == '4' ]]; then
@ -2574,7 +2583,7 @@ detect_desktop_environment()
fi fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' ) toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then if [[ -n $toolkit ]];then
version="$version (Qt: $toolkit)" version="$version (Qt $toolkit)"
fi fi
desktop_environment="KDE $version" desktop_environment="KDE $version"
# KDE_FULL_SESSION property is only available since KDE 3.5.5. # KDE_FULL_SESSION property is only available since KDE 3.5.5.
@ -2587,7 +2596,7 @@ detect_desktop_environment()
fi fi
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' ) toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then if [[ -n $toolkit ]];then
version="$version (Qt: $toolkit)" version="$version (Qt $toolkit)"
fi fi
desktop_environment="KDE $version" desktop_environment="KDE $version"
# note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected # note: fluxbox has a positive PID for blackbox, so I think most desktops can be detected