diff --git a/inxi b/inxi index 243b582..98fb404 100755 --- a/inxi +++ b/inxi @@ -1347,6 +1347,7 @@ debug_data_collector() xdpyinfo &> $xiin_data_dir/xdpyinfo.txt xrandr &> $xiin_data_dir/xrandr.txt X -version &> $xiin_data_dir/x-version.txt + Xorg -version &> $xiin_data_dir/xorg-version.txt fi if [[ $1 == 'disk' || $1 == 'all' ]];then echo 'Collecting dev, label, disk, uuid data, df...' @@ -3434,10 +3435,9 @@ get_graphics_x_data() get_graphics_x_version() { eval $LOGFS - local x_exists=$( type -p X ) local x_version='' - - if [[ -n $x_exists ]];then + # 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 # otherwise X -version overrides everything and this comes out null. # two knowns id strings: X.Org X Server 1.7.5 AND Window System Version 1.7.5 @@ -3449,6 +3449,14 @@ get_graphics_x_version() /x.org x server|X Window System Version/ { print $NF }' ) + elif [[ -n $( type -p Xorg ) ]];then + x_version=$( Xorg -version 2>&1 | gawk ' + BEGIN { + IGNORECASE=1 + } + /x.org x server|X Window System Version/ { + print $NF + }' ) fi echo $x_version log_function_data " x_version: $x_version"