diff --git a/inxi b/inxi index 6e0ce0f..82e9e0a 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/usr/bin/env bash ######################################################################## #### Script Name: inxi -#### Version: 2.3.13 +#### Version: 2.3.14 #### Date: 2017-06-08 #### Patch Number: 00 ######################################################################## @@ -6393,9 +6393,10 @@ get_graphics_glx_data() { eval $LOGFS local a_temp='' - if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + # if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + if [[ $B_SHOW_DISPLAY_DATA == 'true' ]];then IFS=$'\n' - A_GLX_DATA=( $( glxinfo | gawk -F ': ' ' + A_GLX_DATA=( $( glxinfo 2>/dev/null | gawk -F ': ' ' # the real question here though is why this function is even here, seems # just to be a complicated way to pack/print a variable, but maybe the # original idea was to handle > 1 cases of detections I guess @@ -6455,6 +6456,9 @@ get_graphics_glx_data() /direct rendering/ { $2 && c[$2] } + /GLX Visuals/ { + exit + } END { dr = join( c, ", " ) oglr = join( a, ", " ) @@ -6479,10 +6483,11 @@ get_graphics_res_data() eval $LOGFS local screen_resolution='' xdpy_data='' screens_count=0 tty_session='' - if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + # if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + if [[ $B_SHOW_DISPLAY_DATA == '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 )" + xdpy_data="$( xdpyinfo 2>/dev/null )" xdpy_count=$( grep -c 'dimensions' <<< "$xdpy_data" ) # we get a bit more info from xrandr than xdpyinfo, but xrandr fails to handle # multiple screens from different video cards @@ -6565,15 +6570,15 @@ get_graphics_display_server_data() server='wayland' fi fi - - if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + # if [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + if [[ $B_SHOW_DISPLAY_DATA == 'true' ]];then # X vendor and version detection. # new method added since radeon and X.org and the disappearance of 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 $version is empty, the release number is parsed instead) # xdpy_info="$( xdpyinfo )" IFS="," - a_display_vendor_working=( $( xdpyinfo | gawk -F': +' ' + a_display_vendor_working=( $( xdpyinfo 2>/dev/null | gawk -F': +' ' BEGIN { IGNORECASE=1 vendorString="" @@ -12786,7 +12791,7 @@ print_graphics_data() local spacer='' driver='' driver_string='' driver_plural='' direct_render_string='' local separator_loaded='' separator_unloaded='' separator_failed='' local loaded='' unloaded='' failed='' display_server_string='' - local line_starter='Graphics:' part_1_data='' part_2_data='' + local line_starter='Graphics:' part_1_data='' part_2_data='' b_advanced='true' local screen_resolution="$( get_graphics_res_data )" # set A_DISPLAY_SERVER_DATA @@ -12884,16 +12889,20 @@ print_graphics_data() display_server_string="${C1}Display Server${SEP3}${C2} $display_server_string $compositor_string" driver_string="${C1}driver$driver_plural$SEP3${C2}$driver " - if [[ $B_ROOT == 'true' ]];then + if [[ $glx_renderer == '' && $B_ROOT == 'true' ]];then root_x_string='for root ' - if [[ $B_IRC == 'false' || $B_CONSOLE_IRC == 'true' ]];then - res_tty='tty size' - fi + b_advanced='false' +# if [[ $B_IRC == 'false' || $B_CONSOLE_IRC == 'true' ]];then +# res_tty='tty size' +# fi fi if [[ $B_RUNNING_IN_DISPLAY != 'true' ]];then root_x_string="${root_x_string}out of X" res_tty='tty size' fi + if [[ $B_RUNNING_IN_DISPLAY != 'true' || -n ${screen_resolution/*@*/} ]];then + res_tty='tty size' + fi if [[ -n $root_x_string ]];then root_x_string="${C1}Advanced Data$SEP3${C2} N/A $root_x_string" @@ -12992,7 +13001,8 @@ print_graphics_data() ## 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 [[ $B_SHOW_DISPLAY_DATA == 'true' && $B_ROOT != 'true' ]];then + if [[ $B_SHOW_DISPLAY_DATA == 'true' && $b_advanced == 'true' ]];then if [[ -z $glx_renderer ]];then glx_renderer='N/A' fi diff --git a/inxi.changelog b/inxi.changelog index 925f7a0..10abaeb 100644 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,21 @@ +===================================================================================== +Version: 2.3.14 +Patch Version: 00 +Script Date: 2017-06-08 +----------------------------------- +Changes: +----------------------------------- +New version, tarball. This corrects an issue I noticed a while ago, glxinfo and xpdyinfo +used to not work as root in X, but they do now. So I've removed the root tests for graphics +output, and now only rely on the returned data to determine the output when in X. Out of X +behavior remains the same. + +Note that at some point I'll have to see if wayland systems have usable reporting tools to get +screen resolution, opengl info, and so on, but that will have to come one step at a time. + +----------------------------------- +-- Harald Hope - Thu, 08 Jun 2017 17:46:30 -0700 + ===================================================================================== Version: 2.3.13 Patch Version: 00