This commit is contained in:
inxi-svn 2011-05-25 21:39:38 +00:00
parent 559c595a18
commit 95ecf17ded

7
inxi
View file

@ -6318,7 +6318,7 @@ print_system_data()
local host_name=$( hostname )
local current_kernel=$( uname -rm ) # | gawk '{print $1,$3,$(NF-1)}' )
local distro="$( get_distro_data )"
local tty_session=$( basename $(tty) | sed 's/[^0-9]*//g' )
local tty_session=$( basename "$( tty 2>/dev/null )" | sed 's/[^0-9]*//g' )
# this handles the different, shorter, irc colors strings embedded in variable data
if [[ $B_RUNNING_IN_SHELL != 'true' ]];then
@ -6336,7 +6336,10 @@ print_system_data()
desktop_environment='N/A'
fi
else
desktop_environment="tty $tty_session"
if [[ -n $tty_session ]];then
tty_session=" $tty_session"
fi
desktop_environment="tty$tty_session"
desktop_type='Console'
fi
de_distro_string="${C1}$desktop_type${C2} $desktop_environment ${C1}Distro${C2} $distro"