mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added Xorg -version testing to debugger and x version function
This commit is contained in:
parent
331fd342a1
commit
b8686ef409
14
inxi
14
inxi
|
@ -1347,6 +1347,7 @@ debug_data_collector()
|
||||||
xdpyinfo &> $xiin_data_dir/xdpyinfo.txt
|
xdpyinfo &> $xiin_data_dir/xdpyinfo.txt
|
||||||
xrandr &> $xiin_data_dir/xrandr.txt
|
xrandr &> $xiin_data_dir/xrandr.txt
|
||||||
X -version &> $xiin_data_dir/x-version.txt
|
X -version &> $xiin_data_dir/x-version.txt
|
||||||
|
Xorg -version &> $xiin_data_dir/xorg-version.txt
|
||||||
fi
|
fi
|
||||||
if [[ $1 == 'disk' || $1 == 'all' ]];then
|
if [[ $1 == 'disk' || $1 == 'all' ]];then
|
||||||
echo 'Collecting dev, label, disk, uuid data, df...'
|
echo 'Collecting dev, label, disk, uuid data, df...'
|
||||||
|
@ -3434,10 +3435,9 @@ get_graphics_x_data()
|
||||||
get_graphics_x_version()
|
get_graphics_x_version()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local x_exists=$( type -p X )
|
|
||||||
local x_version=''
|
local x_version=''
|
||||||
|
# note that some users can have /usr/bin/Xorg but not /usr/bin/X
|
||||||
if [[ -n $x_exists ]];then
|
if [[ -n $( type -p X ) ]];then
|
||||||
# note: MUST be this syntax: X -version 2>&1
|
# note: MUST be this syntax: X -version 2>&1
|
||||||
# otherwise X -version overrides everything and this comes out null.
|
# 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
|
# 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/ {
|
/x.org x server|X Window System Version/ {
|
||||||
print $NF
|
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
|
fi
|
||||||
echo $x_version
|
echo $x_version
|
||||||
log_function_data " x_version: $x_version"
|
log_function_data " x_version: $x_version"
|
||||||
|
|
Loading…
Reference in a new issue