aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2014-03-05 15:03:31 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2014-03-05 15:03:31 -0500
commitf05dc0a23ba7250a3fdb2b0e7cbff00c58fb7e8c (patch)
tree6de698090f3d071fa117c5f2426fc1255c8a9b01
parentc9d52df5207cf65c21a9c6003eb8c370fe3625e1 (diff)
downloadinxi-f05dc0a23ba7250a3fdb2b0e7cbff00c58fb7e8c.tar.bz2
inxi-f05dc0a23ba7250a3fdb2b0e7cbff00c58fb7e8c.tar.xz
inxi-f05dc0a23ba7250a3fdb2b0e7cbff00c58fb7e8c.tar.zst
Imported Upstream version 1.9.19upstream/1.9.19
-rwxr-xr-xinxi311
-rwxr-xr-xinxi.17
-rwxr-xr-xinxi.1.gzbin7959 -> 8046 bytes
-rwxr-xr-xinxi.changelog15
4 files changed, 183 insertions, 150 deletions
diff --git a/inxi b/inxi
index 5bbc6fe..b9542e0 100755
--- a/inxi
+++ b/inxi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
-#### Version: 1.9.18
-#### Date: 2014-01-13
+#### Version: 1.9.19
+#### Date: 2014-03-03
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@@ -229,8 +229,8 @@ A_CPU_DATA=''
A_CPU_TYPE_PCNT_CCNT=''
A_DEBUG_BUFFER=''
A_GCC_VERSIONS=''
-A_GFX_CARD_DATA=''
A_GLX_DATA=''
+A_GRAPHICS_CARD_DATA=''
A_GRAPHIC_DRIVERS=''
A_HDD_DATA=''
A_INTERFACES_DATA=''
@@ -244,7 +244,7 @@ A_RAID_DATA=''
A_SENSORS_DATA=''
A_UNMOUNTED_PARTITION_DATA=''
A_WEATHER_DATA=''
-A_X_DATA=''
+A_DISPLAY_SERVER_DATA=''
### Boolean true/false globals ## usage: 'B_<var>'
## Distro maintainer flags ##
@@ -287,6 +287,7 @@ B_PORTABLE='false'
B_RAID_SET='false'
B_ROOT='false'
B_RUN_COLOR_SELECTOR='false'
+B_RUNNING_IN_DISPLAY='false' # in x type display server
# Running in a shell? Defaults to false, and is determined later.
B_RUNNING_IN_SHELL='false'
if tty >/dev/null;then
@@ -302,6 +303,7 @@ B_SHOW_BASIC_CPU='false'
B_SHOW_BASIC_DISK='false'
B_SHOW_BASIC_OPTICAL='false'
B_SHOW_CPU='false'
+B_SHOW_DISPLAY_DATA='false'
B_SHOW_DISK_TOTAL='false'
B_SHOW_DISK='false'
# Show full hard disk output
@@ -324,7 +326,6 @@ B_SHOW_RAID='false'
# because many systems have no mdstat file, -b/-F should not show error if no raid file found
B_SHOW_RAID_R='false'
B_SHOW_REPOS='false'
-B_RUNNING_IN_X='false'
B_SHOW_SENSORS='false'
# triggers only short inxi output
B_SHOW_SHORT_OUTPUT='false'
@@ -332,7 +333,6 @@ B_SHOW_SYSTEM='false'
B_SHOW_UNMOUNTED_PARTITIONS='false'
B_SHOW_UUIDS='false'
B_SHOW_WEATHER='false'
-B_SHOW_X_DATA='false'
B_SYSCTL='false'
# triggers various debugging and new option testing
B_TESTING_1='false'
@@ -687,7 +687,7 @@ main()
color_scheme=$VIRT_TERM_COLOR_SCHEME
fi
else
- if [[ -n $IRC_X_TERM_COLOR_SCHEME && $B_CONSOLE_IRC == 'true' && -n $B_RUNNING_IN_X ]];then
+ if [[ -n $IRC_X_TERM_COLOR_SCHEME && $B_CONSOLE_IRC == 'true' && -n $B_RUNNING_IN_DISPLAY ]];then
color_scheme=$IRC_X_TERM_COLOR_SCHEME
elif [[ -n $IRC_CONS_COLOR_SCHEME && -z $DISPLAY ]];then
color_scheme=$IRC_CONS_COLOR_SCHEME
@@ -808,8 +808,8 @@ initialize_data()
fi
if [[ -n $DISPLAY ]];then
- B_SHOW_X_DATA='true'
- B_RUNNING_IN_X='true'
+ B_SHOW_DISPLAY_DATA='true'
+ B_RUNNING_IN_DISPLAY='true'
fi
if [[ -e $FILE_MDSTAT ]];then
@@ -964,16 +964,16 @@ check_required_apps()
depends="$depends sysctl lspci"
fi
# no need to add xprop because it will just give N/A if not there, but if we expand use of xprop,
- # should add that here as a test, then use the B_SHOW_X_DATA flag to trigger the tests in de function
+ # should add that here as a test, then use the B_SHOW_DISPLAY_DATA flag to trigger the tests in de function
local x_apps="xrandr xdpyinfo glxinfo"
- if [[ $B_RUNNING_IN_X == 'true' ]];then
+ if [[ $B_RUNNING_IN_DISPLAY == 'true' ]];then
for app_name in $x_apps
do
app_path=$( type -p $app_name )
if [[ -z $app_path ]];then
script_debugger "Resuming in non X mode: $app_name not found. For package install advice run: $SCRIPT_NAME --recommends"
- B_SHOW_X_DATA='false'
+ B_SHOW_DISPLAY_DATA='false'
break
fi
done
@@ -1523,6 +1523,10 @@ debug_data_collector()
lspci -v &> $debug_data_dir/lspci-v.txt
lsusb &> $debug_data_dir/lsusb.txt
ps aux &> $debug_data_dir/ps-aux.txt
+ runlevel &> $debug_data_dir/runlevel.txt
+ systemctl list-units &> $debug_data_dir/systemctl-list-units.txt
+ systemctl list-units --type=target &> $debug_data_dir/systemctl-list-units-target.txt
+ initctl list &> $debug_data_dir/initctl-list.txt
sensors &> $debug_data_dir/sensors.txt
nvidia-smi -q &> $debug_data_dir/nvidia-smi-q.txt
nvidia-smi -q -x &> $debug_data_dir/nvidia-smi-xq.txt
@@ -1592,7 +1596,7 @@ debug_data_collector()
fi
fi
if [[ $1 == 'xorg' || $1 == 'all' ]];then
- if [[ $B_RUNNING_IN_X != 'true' ]];then
+ if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then
echo 'Warning: only some of the data collection can occur if you are not in X'
touch $debug_data_dir/warning-user-not-in-x
fi
@@ -2469,7 +2473,7 @@ show_options()
print_screen_output "-f All cpu flags, triggers -C. Not shown with -F to avoid spamming. ARM cpus show 'features'."
print_screen_output "-F Full output for $SCRIPT_NAME. Includes all Upper Case line letters, plus -s and -n."
print_screen_output " Does not show extra verbose options like -x -d -f -u -l -o -p -t -r"
- print_screen_output "-G Graphic card information (card, x type, resolution, glx renderer, version)."
+ print_screen_output "-G Graphic card information (card, display server type/version, resolution, glx renderer, version)."
print_screen_output "-i Wan IP address, and shows local interfaces (requires ifconfig network tool). Same as -Nni"
print_screen_output " Not shown with -F for user security reasons, you shouldn't paste your local/wan IP."
print_screen_output "-I Information: processes, uptime, memory, irc client (or shell type), $SCRIPT_NAME version."
@@ -3016,7 +3020,7 @@ set_perl_python_konvi()
{
if [[ -z $IRC_CLIENT_VERSION ]];then
# this is a hack to try to show konversation if inxi is running but started via /cmd
- if [[ -n $( grep -i 'konversation' <<< "$Ps_aux_Data" | grep -v 'grep' ) && $B_RUNNING_IN_X == 'true' ]];then
+ if [[ -n $( grep -i 'konversation' <<< "$Ps_aux_Data" | grep -v 'grep' ) && $B_RUNNING_IN_DISPLAY == 'true' ]];then
IRC_CLIENT='Konversation'
IRC_CLIENT_VERSION=" $( konversation --version 2>/dev/null | gawk '/^Konversation/ {print $2}' )"
B_CONSOLE_IRC='false'
@@ -3818,7 +3822,7 @@ get_desktop_environment()
fi
fi
desktop_environment="KDE"
- elif [[ $XDG_CURRENT_DESKTOP == 'UNITY' ]];then
+ elif [[ $XDG_CURRENT_DESKTOP == 'Unity' ]];then
version=$( get_de_app_version 'unity' '^unity' '2' )
# not certain cinn will always have version, so keep output right if not
if [[ -n $version ]];then
@@ -3891,8 +3895,12 @@ get_desktop_environment()
# alternate: xfce4-about --version > xfce4-about 4.10.0 (Xfce 4.10)
if [[ -n $( grep -Eis '\"xfce4\"' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
+ # arch linux reports null, so use alternate if null
if [[ -z $version ]];then
- version='4'
+ version=$( get_de_app_version 'xfce4-panel' '^xfce4-panel' '2' )
+ if [[ -z $version ]];then
+ version='4'
+ fi
fi
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_app_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
@@ -3904,8 +3912,12 @@ get_desktop_environment()
# when 5 is released, the string may need updating
elif [[ -n $( grep -is '\"xfce5\"' <<< "$xprop_root" ) ]];then
version=$( get_de_app_version 'xfdesktop' 'xfdesktop[[:space:]]version' '5' )
+ # arch linux reports null, so use alternate if null
if [[ -z $version ]];then
- version='5'
+ version=$( get_de_app_version 'xfce5-panel' '^xfce5-panel' '2' )
+ if [[ -z $version ]];then
+ version='5'
+ fi
fi
if [[ $B_EXTRA_DATA == 'true' ]];then
toolkit=$( get_de_app_version 'xfdesktop' 'Built[[:space:]]with[[:space:]]GTK' '4' )
@@ -4724,7 +4736,7 @@ get_graphics_card_data()
local i='' temp_array=''
IFS=$'\n'
- A_GFX_CARD_DATA=( $( gawk -F': ' '
+ A_GRAPHICS_CARD_DATA=( $( gawk -F': ' '
BEGIN {
IGNORECASE=1
busId=""
@@ -4738,15 +4750,15 @@ get_graphics_card_data()
print $NF "," busId
}' <<< "$Lspci_v_Data" ) )
IFS="$ORIGINAL_IFS"
-# for (( i=0; i < ${#A_GFX_CARD_DATA[@]}; i++ ))
+# for (( i=0; i < ${#A_GRAPHICS_CARD_DATA[@]}; i++ ))
# do
-# A_GFX_CARD_DATA[i]=$( sanitize_characters BAN_LIST_NORMAL "${A_GFX_CARD_DATA[i]}" )
+# A_GRAPHICS_CARD_DATA[i]=$( sanitize_characters BAN_LIST_NORMAL "${A_GRAPHICS_CARD_DATA[i]}" )
# done
# GFXMEM is UNUSED at the moment, because it shows AGP aperture size, which is not necessarily equal to GFX memory..
# GFXMEM="size=[$(echo "$Lspci_v_Data" | gawk '/VGA/{while (!/^$/) {getline;if (/size=[0-9][0-9]*M/) {size2=gensub(/.*\[size=([0-9]+)M\].*/,"\\1","g",$0);if (size<size2){size=size2}}}}END{print size2}')M]"
- temp_array=${A_GFX_CARD_DATA[@]}
- log_function_data "A_GFX_CARD_DATA: $temp_array"
+ temp_array=${A_GRAPHICS_CARD_DATA[@]}
+ log_function_data "A_GRAPHICS_CARD_DATA: $temp_array"
eval $LOGFE
}
@@ -4818,7 +4830,7 @@ get_graphics_glx_data()
{
eval $LOGFS
local temp_array=''
- if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
+ if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
IFS=$'\n'
A_GLX_DATA=( $( glxinfo | gawk -F ': ' '
# note: function declarations go before BEGIN? It appears so, confirm.
@@ -4888,7 +4900,7 @@ get_graphics_res_data()
eval $LOGFS
local screen_resolution='' xdpy_data='' screens_count=0 tty_session=''
- if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
+ if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
# Added the two ?'s , because the resolution is now reported without spaces around the 'x', as in
# 1400x1050 instead of 1400 x 1050. Change as of X.org version 1.3.0
xdpy_data="$( xdpyinfo )"
@@ -4957,20 +4969,20 @@ get_graphics_res_data()
eval $LOGFE
}
-## create array of x vendor/version data
-get_graphics_x_data()
+## create array of display server vendor/version data
+get_graphics_display_server_data()
{
eval $LOGFS
- local x_vendor='' x_version='' temp_array='' xdpy_info='' a_x_working=''
+ local vendor='' version='' temp_array='' xdpy_info='' a_display_vendor_working=''
- if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
+ if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
# X vendor and version detection.
# new method added since radeon and X.org and the disappearance of <X server name> version : ...etc
# Later on, the normal textual version string returned, e.g. like: X.Org version: 6.8.2
- # A failover mechanism is in place. (if $x_version is empty, the release number is parsed instead)
+ # A failover mechanism is in place. (if $version is empty, the release number is parsed instead)
# xdpy_info="$( xdpyinfo )"
IFS=","
- a_x_working=( $( xdpyinfo | gawk -F': +' '
+ a_display_vendor_working=( $( xdpyinfo | gawk -F': +' '
BEGIN {
IGNORECASE=1
vendorString=""
@@ -4995,44 +5007,44 @@ get_graphics_x_data()
END {
print vendorString "," version "," vendorRelease
}' ) )
- x_vendor=${a_x_working[0]}
- x_version=${a_x_working[1]}
+ vendor=${a_display_vendor_working[0]}
+ version=${a_display_vendor_working[1]}
# this gives better output than the failure last case, which would only show:
# for example: X.org: 1.9 instead of: X.org: 1.9.0
- if [[ -z $x_version ]];then
- x_version=$( get_graphics_x_version )
+ if [[ -z $version ]];then
+ version=$( get_graphics_display_server_version )
fi
- if [[ -z $x_version ]];then
- x_version=${a_x_working[2]}
+ if [[ -z $version ]];then
+ version=${a_display_vendor_working[2]}
fi
# some distros, like fedora, report themselves as the xorg vendor, so quick check
# here to make sure the vendor string includes Xorg in string
- if [[ -z $( grep -E '(X|xorg|x\.org)' <<< $x_vendor ) ]];then
- x_vendor="$x_vendor X.org"
+ if [[ -z $( grep -E '(X|xorg|x\.org)' <<< $vendor ) ]];then
+ vendor="$vendor X.org"
fi
IFS="$ORIGINAL_IFS"
- A_X_DATA[0]="$x_vendor"
- A_X_DATA[1]="$x_version"
+ A_DISPLAY_SERVER_DATA[0]="$vendor"
+ A_DISPLAY_SERVER_DATA[1]="$version"
else
- x_version=$( get_graphics_x_version )
- if [[ -n $x_version ]];then
- x_vendor='X.org'
- A_X_DATA[0]="$x_vendor"
- A_X_DATA[1]="$x_version"
+ version=$( get_graphics_display_server_version )
+ if [[ -n $version ]];then
+ vendor='X.org'
+ A_DISPLAY_SERVER_DATA[0]="$vendor"
+ A_DISPLAY_SERVER_DATA[1]="$version"
fi
fi
- temp_array=${A_X_DATA[@]}
- log_function_data "A_X_DATA: $temp_array"
+ temp_array=${A_DISPLAY_SERVER_DATA[@]}
+ log_function_data "A_DISPLAY_SERVER_DATA: $temp_array"
eval $LOGFE
}
# if other tests fail, try this one, this works for root, out of X also
-get_graphics_x_version()
+get_graphics_display_server_version()
{
eval $LOGFS
- local x_version='' x_data=''
+ local version='' x_data=''
# note that some users can have /usr/bin/Xorg but not /usr/bin/X
if [[ -n $( type -p X ) ]];then
# note: MUST be this syntax: X -version 2>&1
@@ -5044,7 +5056,7 @@ get_graphics_x_version()
x_data="$( Xorg -version 2>&1)"
fi
if [[ -n $x_data ]];then
- x_version=$(
+ version=$(
gawk '
BEGIN {
IGNORECASE=1
@@ -5058,8 +5070,8 @@ get_graphics_x_version()
exit
}' <<< "$x_data" )
fi
- echo $x_version
- log_function_data " x_version: $x_version"
+ echo $version
+ log_function_data " version: $version"
eval $LOGFE
}
@@ -5435,20 +5447,20 @@ get_lspci_data()
}
# args: $1 - busid
-get_lspci_vendor_product()
+get_lspci_chip_id()
{
eval $LOGFS
- local vendor_product=''
+ local chip_id=''
- vendor_product=$( gawk '
+ chip_id=$( gawk '
/^'$1'/ {
if ( $3 != "" ) {
print $3
}
}' <<< "$Lspci_n_Data" )
- echo $vendor_product
+ echo $chip_id
eval $LOGFE
}
@@ -5803,7 +5815,7 @@ get_network_advanced_data()
{
eval $LOGFS
local a_network_adv_working='' if_path='' working_path='' working_uevent_path='' dir_path=''
- local if_id='' speed='' duplex='' mac_id='' oper_state='' vendor_product=''
+ local if_id='' speed='' duplex='' mac_id='' oper_state='' chip_id=''
local usb_data='' usb_vendor='' usb_product='' product_path='' driver_test=''
for (( i=0; i < ${#A_NETWORK_DATA[@]}; i++ ))
@@ -5818,7 +5830,7 @@ get_network_advanced_data()
mac_id=''
oper_state=''
usb_data=''
- vendor_product=''
+ chip_id=''
if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then
# note although this may exist technically don't use it, it's a virtual path
# and causes weird cat errors when there's a missing file as well as a virtual path
@@ -5917,9 +5929,9 @@ get_network_advanced_data()
fi
if [[ -n ${a_network_adv_working[10]} ]];then
- vendor_product=${a_network_adv_working[10]}
+ chip_id=${a_network_adv_working[10]}
fi
- A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id","$vendor_product
+ A_NETWORK_DATA[i]=${a_network_adv_working[0]}","${a_network_adv_working[1]}","${a_network_adv_working[2]}","${a_network_adv_working[3]}","${a_network_adv_working[4]}","$if_id","$oper_state","$speed","$duplex","$mac_id","$chip_id
IFS="$ORIGINAL_IFS"
done
@@ -6962,7 +6974,7 @@ get_pciconf_card_data()
;;
display)
array_string="$device_string,${a_temp[4]},${a_temp[5]}"
- A_GFX_CARD_DATA[j]=$array_string
+ A_GRAPHICS_CARD_DATA[j]=$array_string
;;
network)
if [[ -n $ip_tool_command && -n ${a_temp[3]} ]];then
@@ -8643,7 +8655,7 @@ print_it_out()
print_cpu_data
fi
if [[ $B_SHOW_GRAPHICS == 'true' ]];then
- print_gfx_data
+ print_graphics_data
fi
if [[ $B_SHOW_AUDIO == 'true' ]];then
print_audio_data
@@ -8783,7 +8795,7 @@ print_audio_data()
{
eval $LOGFS
local i='' card_id='' audio_data='' a_audio_data='' port_data='' pci_bus_id='' card_string=''
- local a_audio_working='' audio_driver='' alsa_data='' port_plural='' module_version=''
+ local a_audio_working='' audio_driver='' alsa_data='' port_plural='' module_version='' chip_id=''
local bus_usb_text='' bus_usb_id='' line_starter='Audio:' alsa='' alsa_version='' print_data=''
local driver=''
# set A_AUDIO_DATA and get alsa data
@@ -8831,7 +8843,8 @@ print_audio_data()
bus_usb_text=''
bus_usb_id=''
print_data=''
- vendor_product=''
+ card_id=''
+ chip_id=''
if [[ ${#A_AUDIO_DATA[@]} -gt 1 ]];then
card_id="-$(( $i + 1 ))"
@@ -8864,26 +8877,26 @@ print_audio_data()
bus_usb_text='bus-ID'
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
if [[ $BSD_TYPE != 'bsd' ]];then
- vendor_product=$( get_lspci_vendor_product "${a_audio_working[4]}" )
+ chip_id=$( get_lspci_chip_id "${a_audio_working[4]}" )
else
- vendor_product=${a_audio_working[6]}
+ chip_id=${a_audio_working[6]}
fi
fi
else
bus_usb_text='usb-ID'
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
- vendor_product=${a_audio_working[5]}
+ chip_id=${a_audio_working[5]}
fi
fi
bus_usb_id=${a_audio_working[4]}
pci_bus_id="${C1}$bus_usb_text$SEP3${C2} $bus_usb_id "
- if [[ -n $vendor_product ]];then
- vendor_product="${C1}chip-ID$SEP3${C2} $vendor_product "
+ if [[ -n $chip_id ]];then
+ chip_id="${C1}chip-ID$SEP3${C2} $chip_id "
fi
fi
if [[ -n ${a_audio_working[0]} ]];then
card_string="${C1}Card$card_id:${C2} ${a_audio_working[0]} "
- audio_data="$audio_driver$port_data$pci_bus_id$vendor_product"
+ audio_data="$audio_driver$port_data$pci_bus_id$chip_id"
fi
# only print alsa on last line if short enough, otherwise print on its own line
if [[ $i -eq 0 ]];then
@@ -9103,22 +9116,22 @@ print_cpu_flags_full()
eval $LOGFE
}
-print_gfx_data()
+print_graphics_data()
{
eval $LOGFS
- local gfx_data='' i='' card_id='' root_alert='' root_x_string='' a_gfx_working=''
- local b_is_mesa='false' display_full_string='' gfx_bus_id='' gfx_card_data=''
- local res_tty='Resolution' xorg_data='' x_vendor_string='' vendor_product=''
- local spacer='' x_driver='' x_driver_string='' x_driver_plural='' direct_render_string=''
+ local graphics_data='' card_id='' i='' root_alert='' root_x_string='' a_graphics_working=''
+ local b_is_mesa='false' display_full_string='' card_bus_id='' card_data=''
+ local res_tty='Resolution' xorg_data='' display_vendor_string='' chip_id=''
+ local spacer='' driver='' driver_string='' driver_plural='' direct_render_string=''
local separator_loaded='' separator_unloaded='' separator_failed=''
- local loaded='' unloaded='' failed=''
+ local loaded='' unloaded='' failed='' display_server_string=''
local line_starter='Graphics:'
local screen_resolution="$( get_graphics_res_data )"
- # set A_X_DATA
- get_graphics_x_data
- local x_vendor=${A_X_DATA[0]}
- local x_version=${A_X_DATA[1]}
+ # set A_DISPLAY_SERVER_DATA
+ get_graphics_display_server_data
+ local display_vendor=${A_DISPLAY_SERVER_DATA[0]}
+ local display_version=${A_DISPLAY_SERVER_DATA[1]}
# set A_GLX_DATA
get_graphics_glx_data
local glx_renderer="${A_GLX_DATA[0]}"
@@ -9127,7 +9140,7 @@ print_gfx_data()
# note: using grep -ioE '(No|Yes)' <<< ${A_GLX_DATA[2]} did not work in Arch, no idea why
local glx_direct_render=$( gawk '{print $1}' <<< "${A_GLX_DATA[2]}" )
- # set A_GFX_CARD_DATA
+ # set A_GRAPHICS_CARD_DATA
if [[ $BSD_TYPE == 'bsd' ]];then
if [[ $B_PCICONF_SET == 'false' ]];then
get_pciconf_data
@@ -9140,57 +9153,58 @@ print_gfx_data()
get_graphics_driver
if [[ ${#A_GRAPHIC_DRIVERS[@]} -eq 0 ]];then
- x_driver=' N/A'
+ driver=' N/A'
else
for (( i=0; i < ${#A_GRAPHIC_DRIVERS[@]}; i++ ))
do
IFS=","
- a_gfx_working=( ${A_GRAPHIC_DRIVERS[i]} )
+ a_graphics_working=( ${A_GRAPHIC_DRIVERS[i]} )
IFS="$ORIGINAL_IFS"
- case ${a_gfx_working[1]} in
+ case ${a_graphics_working[1]} in
loaded)
- loaded="$loaded$separator_loaded${a_gfx_working[0]}"
+ loaded="$loaded$separator_loaded${a_graphics_working[0]}"
separator_loaded=','
;;
unloaded)
- unloaded="$unloaded$separator_unloaded${a_gfx_working[0]}"
+ unloaded="$unloaded$separator_unloaded${a_graphics_working[0]}"
separator_unloaded=','
;;
failed)
- failed="$failed$separator_failed${a_gfx_working[0]}"
+ failed="$failed$separator_failed${a_graphics_working[0]}"
separator_failed=','
;;
esac
done
fi
if [[ -n $loaded ]];then
- x_driver="${x_driver} $loaded"
+ driver="${driver} $loaded"
fi
if [[ -n $unloaded ]];then
- x_driver="${x_driver} (unloaded: $unloaded)"
+ driver="${driver} (unloaded: $unloaded)"
fi
if [[ -n $failed ]];then
- x_driver="${x_driver} ${RED}FAILED:${C2} $failed"
+ driver="${driver} ${RED}FAILED:${C2} $failed"
fi
# sometimes for some reason there is no driver found but the array is started
- if [[ -z $x_driver ]];then
- x_driver=' N/A'
+ if [[ -z $driver ]];then
+ driver=' N/A'
fi
if [[ ${#A_GRAPHIC_DRIVERS[@]} -gt 1 ]];then
- x_driver_plural='s'
+ driver_plural='s'
fi
- x_driver_string="${C1}driver$x_driver_plural$SEP3${C2}$x_driver "
+ driver_string="${C1}driver$driver_plural$SEP3${C2}$driver "
# some basic error handling:
if [[ -z $screen_resolution ]];then
screen_resolution='N/A'
fi
- if [[ -z $x_vendor || -z $x_version ]];then
- x_vendor_string="${C1}X-Vendor:${C2} N/A "
+ if [[ -z $display_vendor || -z $display_version ]];then
+ display_vendor_string="N/A"
else
- x_vendor_string="${C1}$x_vendor$SEP3${C2} $x_version "
+ display_vendor_string="$display_vendor $display_version"
fi
+ display_server_string="${C1}Display Server${SEP3}${C2} $display_vendor_string "
if [[ $B_ROOT == 'true' ]];then
root_x_string='for root '
@@ -9198,7 +9212,7 @@ print_gfx_data()
res_tty='tty size'
fi
fi
- if [[ $B_RUNNING_IN_X != 'true' ]];then
+ if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then
root_x_string="${root_x_string}out of X"
res_tty='tty size'
fi
@@ -9207,68 +9221,68 @@ print_gfx_data()
root_x_string="${C1}Advanced Data:${C2} N/A $root_x_string"
fi
- display_full_string="$x_vendor_string$x_driver_string${C1}${res_tty}$SEP3${C2} ${screen_resolution} $root_x_string"
+ display_full_string="$display_server_string$driver_string${C1}${res_tty}$SEP3${C2} ${screen_resolution} $root_x_string"
- if [[ ${#A_GFX_CARD_DATA[@]} -gt 0 ]];then
- for (( i=0; i < ${#A_GFX_CARD_DATA[@]}; i++ ))
+ if [[ ${#A_GRAPHICS_CARD_DATA[@]} -gt 0 ]];then
+ for (( i=0; i < ${#A_GRAPHICS_CARD_DATA[@]}; i++ ))
do
IFS=","
- a_gfx_working=( ${A_GFX_CARD_DATA[i]} )
+ a_graphics_working=( ${A_GRAPHICS_CARD_DATA[i]} )
IFS="$ORIGINAL_IFS"
- gfx_bus_id=''
- gfx_card_data=${a_gfx_working[0]}
+ card_bus_id=''
+ card_data=${a_graphics_working[0]}
if [[ $B_EXTRA_DATA == 'true' ]];then
- if [[ -n ${a_gfx_working[1]} ]];then
- gfx_bus_id=" ${C1}bus-ID$SEP3${C2} ${a_gfx_working[1]}"
+ if [[ -n ${a_graphics_working[1]} ]];then
+ card_bus_id=" ${C1}bus-ID$SEP3${C2} ${a_graphics_working[1]}"
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
if [[ $BSD_TYPE != 'bsd' ]];then
- vendor_product=$( get_lspci_vendor_product "${a_gfx_working[1]}" )
+ chip_id=$( get_lspci_chip_id "${a_graphics_working[1]}" )
else
- vendor_product=${a_gfx_working[2]}
+ chip_id=${a_graphics_working[2]}
fi
fi
else
- gfx_bus_id=" ${C1}bus-ID$SEP3${C2} N/A"
+ card_bus_id=" ${C1}bus-ID$SEP3${C2} N/A"
fi
fi
- if [[ -n $vendor_product ]];then
- vendor_product=" ${C1}chip-ID$SEP3${C2} $vendor_product"
+ if [[ -n $chip_id ]];then
+ chip_id=" ${C1}chip-ID$SEP3${C2} $chip_id"
fi
- if [[ ${#A_GFX_CARD_DATA[@]} -gt 1 ]];then
+ if [[ ${#A_GRAPHICS_CARD_DATA[@]} -gt 1 ]];then
card_id="Card-$(($i+1)):"
else
card_id='Card:'
fi
- gfx_data="${C1}$card_id${C2} $gfx_card_data$gfx_bus_id$vendor_product "
- if [[ ${#A_GFX_CARD_DATA[@]} -gt 1 ]];then
- gfx_data=$( create_print_line "$line_starter" "${gfx_data}" )
- print_screen_output "$gfx_data"
+ graphics_data="${C1}$card_id${C2} $card_data$card_bus_id$chip_id "
+ if [[ ${#A_GRAPHICS_CARD_DATA[@]} -gt 1 ]];then
+ graphics_data=$( create_print_line "$line_starter" "${graphics_data}" )
+ print_screen_output "$graphics_data"
line_starter=' '
- gfx_data=''
+ graphics_data=''
fi
done
# handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes..
else
- gfx_data="${C1}Card:${C2} Failed to Detect Video Card! "
+ graphics_data="${C1}Card:${C2} Failed to Detect Video Card! "
fi
- if [[ -n $gfx_data && $( calculate_line_length "${gfx_data}$display_full_string" ) -lt $LINE_MAX ]];then
- gfx_data=$( create_print_line "$line_starter" "${gfx_data}$display_full_string" )
+ if [[ -n $graphics_data && $( calculate_line_length "${graphics_data}$display_full_string" ) -lt $LINE_MAX ]];then
+ graphics_data=$( create_print_line "$line_starter" "${graphics_data}$display_full_string" )
else
- if [[ -n $gfx_data ]];then
- gfx_data=$( create_print_line "$line_starter" "$gfx_data" )
- print_screen_output "$gfx_data"
+ if [[ -n $graphics_data ]];then
+ graphics_data=$( create_print_line "$line_starter" "$graphics_data" )
+ print_screen_output "$graphics_data"
line_starter=' '
fi
- gfx_data=$( create_print_line "$line_starter" "$display_full_string" )
+ graphics_data=$( create_print_line "$line_starter" "$display_full_string" )
fi
- print_screen_output "$gfx_data"
-# if [[ -z $glx_renderer || -z $glx_version ]];then
-# b_is_mesa='true'
-# fi
+ print_screen_output "$graphics_data"
+ # if [[ -z $glx_renderer || -z $glx_version ]];then
+ # b_is_mesa='true'
+ # fi
- ## note: if glx render or version have no content, then mesa is true
- # if [[ $B_SHOW_X_DATA == 'true' ]] && [[ $b_is_mesa != 'true' ]];then
- if [[ $B_SHOW_X_DATA == 'true' && $B_ROOT != 'true' ]];then
+ ## note: if glx render or display_version have no content, then mesa is true
+ # if [[ $B_SHOW_DISPLAY_DATA == 'true' ]] && [[ $b_is_mesa != 'true' ]];then
+ if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then
if [[ -z $glx_renderer ]];then
glx_renderer='N/A'
fi
@@ -9281,10 +9295,10 @@ print_gfx_data()
if [[ $B_HANDLE_CORRUPT_DATA == 'true' || $B_EXTRA_DATA == 'true' ]];then
direct_render_string=" ${C1}Direct Rendering$SEP3${C2} ${glx_direct_render}${CN}"
fi
- gfx_data="${C1}GLX Renderer$SEP3${C2} ${glx_renderer} ${C1}GLX Version$SEP3${C2} ${glx_version}${CN}$direct_render_string"
- gfx_data=$( create_print_line " " "$gfx_data" )
+ graphics_data="${C1}GLX Renderer$SEP3${C2} ${glx_renderer} ${C1}GLX Version$SEP3${C2} ${glx_version}${CN}$direct_render_string"
+ graphics_data=$( create_print_line " " "$graphics_data" )
- print_screen_output "$gfx_data"
+ print_screen_output "$graphics_data"
fi
eval $LOGFE
}
@@ -9448,7 +9462,7 @@ print_info_data()
if [[ -n $shell_data ]];then
# note, if you start this in tty, it will give 'login' as the parent, which we don't want.
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
- if [[ $B_RUNNING_IN_X != 'true' ]];then
+ if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then
shell_parent=$( get_tty_number )
shell_parent="tty $shell_parent"
else
@@ -9469,7 +9483,7 @@ print_info_data()
info_data="${C1}Processes$SEP3${C2} ${processes} ${C1}Uptime$SEP3${C2} ${up_time} ${C1}Memory$SEP3${C2} ${memory}${CN} "
# this only triggers if no X data is present or if extra data switch is on
- if [[ $B_SHOW_X_DATA != 'true' || $B_EXTRA_DATA == 'true' ]];then
+ if [[ $B_SHOW_DISPLAY_DATA != 'true' || $B_EXTRA_DATA == 'true' ]];then
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
runlvl_default=$( get_runlevel_default )
if [[ -z $runlvl_default ]];then
@@ -9730,7 +9744,7 @@ print_networking_data()
eval $LOGFS
local i='' card_id='' network_data='' a_network_working='' port_data='' driver_data=''
local card_string='' port_plural='' module_version='' pci_bus_id='' bus_usb_text=''
- local bus_usb_id='' line_starter='Network:' card_string='' card_data='' vendor_product=''
+ local bus_usb_id='' line_starter='Network:' card_string='' card_data='' chip_id=''
local driver=''
# set A_NETWORK_DATA
if [[ $BSD_TYPE == 'bsd' ]];then
@@ -9760,10 +9774,11 @@ print_networking_data()
pci_bus_id=''
port_data=''
port_plural=''
- vendor_product=''
+ card_id=''
+ chip_id=''
if [[ ${#A_NETWORK_DATA[@]} -gt 1 ]];then
- card_id="-$(( $i + 1 ))"
+ chip_id="-$(( $i + 1 ))"
fi
if [[ -n ${a_network_working[1]} && $B_EXTRA_DATA == 'true' && $BSD_TYPE != 'bsd' ]];then
module_version=$( print_module_version "${a_network_working[1]}" )
@@ -9789,25 +9804,25 @@ print_networking_data()
bus_usb_id=${a_network_working[4]}
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
if [[ $BSD_TYPE != 'bsd' ]];then
- vendor_product=$( get_lspci_vendor_product "${a_network_working[4]}" )
+ chip_id=$( get_lspci_chip_id "${a_network_working[4]}" )
else
- vendor_product=${a_network_working[10]}
+ chip_id=${a_network_working[10]}
fi
fi
else
bus_usb_text='usb-ID'
bus_usb_id=$( cut -d '-' -f '2-4' <<< ${a_network_working[4]} )
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
- vendor_product=${a_network_working[10]}
+ chip_id=${a_network_working[10]}
fi
fi
pci_bus_id="${C1}$bus_usb_text$SEP3${C2} $bus_usb_id"
- if [[ -n $vendor_product ]];then
- vendor_product=" ${C1}chip-ID$SEP3${C2} $vendor_product"
+ if [[ -n $chip_id ]];then
+ chip_id=" ${C1}chip-ID$SEP3${C2} $chip_id"
fi
fi
card_string="${C1}Card$card_id:${C2} ${a_network_working[0]} "
- card_data="$driver_data$port_data$pci_bus_id$vendor_product"
+ card_data="$driver_data$port_data$pci_bus_id$chip_id"
if [[ $( calculate_line_length "$card_string$card_data" ) -gt $LINE_MAX ]];then
network_data=$( create_print_line "$line_starter" "$card_string" )
line_starter=' '
@@ -10833,7 +10848,7 @@ print_system_data()
local tty_session=''
# I think these will work, maybe, if logged in as root and in X
- if [[ $B_RUNNING_IN_X == 'true' ]];then
+ if [[ $B_RUNNING_IN_DISPLAY == 'true' ]];then
desktop_environment=$( get_desktop_environment )
if [[ -z $desktop_environment ]];then
desktop_environment='N/A'
@@ -10861,7 +10876,7 @@ print_system_data()
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
dm_data=$( get_display_manager )
# here we only want the dm info to show N/A if in X
- if [[ -z $dm_data && $B_RUNNING_IN_X == 'true' ]];then
+ if [[ -z $dm_data && $B_RUNNING_IN_DISPLAY == 'true' ]];then
dm_data='N/A'
fi
# only print out of X if dm_data has info, then it's actually useful, but
diff --git a/inxi.1 b/inxi.1
index 500c694..e6bcfad 100755
--- a/inxi.1
+++ b/inxi.1
@@ -1,4 +1,4 @@
-.TH INXI 1 "2014\-01\-13" inxi "inxi manual"
+.TH INXI 1 "2014\-03\-03" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
@@ -104,7 +104,10 @@ Does not show extra verbose options like \fB\-x \-d \-f \-u \-l \-o \-p \-t \-r\
that argument.
.TP
.B \-G
-Show Graphic card information (card, x type, resolution, glx renderer, version).
+Show Graphic card information. Card(s), Display Server (vendor and version number), for example:
+\fBDisplay Server: Xorg 1.15.1 \fR
+,screen resolution(s), glx renderer, version). At some point Wayland and other display servers
+may be added once enough data has been collected.
.TP
.B \-h
This help menu.
diff --git a/inxi.1.gz b/inxi.1.gz
index 40cdd30..8875ebe 100755
--- a/inxi.1.gz
+++ b/inxi.1.gz
Binary files differ
diff --git a/inxi.changelog b/inxi.changelog
index 02e32c8..937376f 100755
--- a/inxi.changelog
+++ b/inxi.changelog
@@ -1,4 +1,19 @@
=====================================================================================
+Version: 1.9.19
+Patch Version: 00
+Script Date: 2014-03-03
+-----------------------------------
+Changes:
+-----------------------------------
+New version; updated man page. Changed slightly the output for x server, in preparation
+for adding alternate display servers, like Wayland or Mir. Rather than release all the
+stuff at once I'm going to do it bit by bit. Currently I have not found a wayland iso
+test cd that boots in virtual box so I will have to wait to really add support there.
+
+-----------------------------------
+-- Harald Hope - Mon, 03 Mar 2014 15:27:05 -0800
+
+=====================================================================================
Version: 1.9.18
Patch Version: 00
Script Date: 2014-01-13