New version, fixes, updates, missing specs.

Bugs:
1. See fix 4, incorrect positioning of Trinity desktop detection logic.

Fixes:
1. Vascom reports in issue #169 that some systems are making the /sys cpu
vulnerability data root read only. Added <root required> test and output.
2. A while back, they added several chassis types in the smbios
specifications. I used an older specification pdf file, this is now corrected.
Note that realworld use of the new types exists, like tablet, mini pc, and so
on. This missing data caused Machine report to list N/A as machine type when
it was actually known. I'd been using an older specification PDF, and had
failed to look at the actual spec download page, where you could clearly see
the newer spec file. Corrected this in the inxi docs as well.
3. Made gentoo repo reader check for case insensitive values for enabled.
Also extended that to other repo readers that use similar syntax, they are
all now case insensitive (Yes/yes/YES, that is)
4. Fixed incorrect handling of Trinity desktop ID, that needed to happen in
the kde ID block, as first test, not after it. Caused failure in Q4OS trinity,
and maybe others. I'm not sure why inxi had the detection where it was, it
made no real sense, so that's now nicely integrated, so these types of
failures should not happen again. Thanks Q4OS for exposing that issue.

Enhancements:
1. Added TDM and CDM display managers. Never seen either (Q4OS uses TDM), TDM
corrected. CDM not confirmed, don't know if it's still around, but if it is
similar to TDM re cdm.pid in /run, it should be detected fine.
2. Added more disk vendors/ids, the list never stops!! Thanks LinuxLite
Hardware database, your users seem to use every disk known to humanity.
3. Added Debian derived Q4OS distro ID and system base handler.
This commit is contained in:
Harald Hope 2018-12-10 11:23:16 -08:00
parent 6bef996c55
commit b119455049
3 changed files with 139 additions and 75 deletions

170
inxi
View file

@ -31,8 +31,8 @@ use POSIX qw(uname strftime ttyname);
## INXI INFO ## ## INXI INFO ##
my $self_name='inxi'; my $self_name='inxi';
my $self_version='3.0.28'; my $self_version='3.0.29';
my $self_date='2018-11-28'; my $self_date='2018-12-10';
my $self_patch='00'; my $self_patch='00';
## END INXI INFO ## ## END INXI INFO ##
@ -2134,17 +2134,17 @@ sub upload_file {
} }
# random tests for various issues # random tests for various issues
sub user_debug_test_1 { sub user_debug_test_1 {
# open(my $duped, '>&', STDOUT); open(my $duped, '>&', STDOUT);
# local *STDOUT = $duped; local *STDOUT = $duped;
# my $item = POSIX::strftime("%c", localtime); my $item = POSIX::strftime("%c", localtime);
# print "Testing character encoding handling. Perl IO data:\n"; print "Testing character encoding handling. Perl IO data:\n";
# print(join(', ', PerlIO::get_layers(STDOUT)), "\n"); print(join(', ', PerlIO::get_layers(STDOUT)), "\n");
# print "Without binmode: ", $item,"\n"; print "Without binmode: ", $item,"\n";
# binmode STDOUT,":utf8"; binmode STDOUT,":utf8";
# print "With binmode: ", $item,"\n"; print "With binmode: ", $item,"\n";
# print "Perl IO data:\n"; print "Perl IO data:\n";
# print(join(', ', PerlIO::get_layers(STDOUT)), "\n"); print(join(', ', PerlIO::get_layers(STDOUT)), "\n");
# close($duped); close($duped);
} }
#### ------------------------------------------------------------------- #### -------------------------------------------------------------------
@ -3367,6 +3367,7 @@ sub program_values {
'xfdesktop-toolkit' => ['Built[[:space:]]with[[:space:]]GTK',4,'--version','Gtk',0,1,0], 'xfdesktop-toolkit' => ['Built[[:space:]]with[[:space:]]GTK',4,'--version','Gtk',0,1,0],
'xmonad' => ['^xmonad',2,'--version','XMonad',0,1,0], 'xmonad' => ['^xmonad',2,'--version','XMonad',0,1,0],
## display managers (dm) ## display managers (dm)
'cdm' => ['^cdm',0,'0','CDM',0,1,0],
'entrance' => ['^entrance',0,'0','Entrance',0,1,0], 'entrance' => ['^entrance',0,'0','Entrance',0,1,0],
'gdm' => ['^gdm',2,'--version','GDM',0,1,0], 'gdm' => ['^gdm',2,'--version','GDM',0,1,0],
'gdm3' => ['^gdm',2,'--version','GDM3',0,1,0], 'gdm3' => ['^gdm',2,'--version','GDM3',0,1,0],
@ -3379,6 +3380,7 @@ sub program_values {
'pcdm' => ['^pcdm',0,'0','PCDM',0,1,0], 'pcdm' => ['^pcdm',0,'0','PCDM',0,1,0],
'sddm' => ['^sddm',0,'0','SDDM',0,1,0], 'sddm' => ['^sddm',0,'0','SDDM',0,1,0],
'slim' => ['slim version',3,'-v','SLiM',0,1,0], 'slim' => ['slim version',3,'-v','SLiM',0,1,0],
'tdm' => ['^tdm',0,'0','TDM',0,1,0],
'wdm' => ['^wdm',0,'0','WINGs DM',0,1,0], 'wdm' => ['^wdm',0,'0','WINGs DM',0,1,0],
'xdm' => ['^xdm',0,'0','XDM',0,1,0], 'xdm' => ['^xdm',0,'0','XDM',0,1,0],
'xenodm' => ['^xenodm',0,'0','xenodm',0,1,0], 'xenodm' => ['^xenodm',0,'0','xenodm',0,1,0],
@ -7509,7 +7511,7 @@ sub cpu_bugs_sys {
my @items = main::globber('/sys/devices/system/cpu/vulnerabilities/*'); my @items = main::globber('/sys/devices/system/cpu/vulnerabilities/*');
if (@items){ if (@items){
foreach (@items){ foreach (@items){
$value = (main::reader($_))[0]; $value = ( -r $_) ? (main::reader($_))[0] : main::row_defaults('root-required');
$type = ($value =~ /^Mitigation:/) ? 'mitigation': 'status'; $type = ($value =~ /^Mitigation:/) ? 'mitigation': 'status';
$_ =~ s/.*\/([^\/]+)$/$1/; $_ =~ s/.*\/([^\/]+)$/$1/;
$value =~ s/Mitigation: //; $value =~ s/Mitigation: //;
@ -8650,7 +8652,7 @@ sub device_vendor {
return if !$model; return if !$model;
# 0 - match pattern; 1 - replace pattern; 2 - vendor print; 3 - serial pattern # 0 - match pattern; 1 - replace pattern; 2 - vendor print; 3 - serial pattern
# Data URLs: inxi-resources.txt Section: DiskData device_vendor() # Data URLs: inxi-resources.txt Section: DiskData device_vendor()
# $model = 'V Series SATA SS '; # $model = 'MEDIAMAX ';
my @vendors = ( my @vendors = (
## These go first because they are the most likely and common ## ## These go first because they are the most likely and common ##
['(Crucial|^(FC)?CT|-CT|^M4\b)','Crucial','Crucial',''], ['(Crucial|^(FC)?CT|-CT|^M4\b)','Crucial','Crucial',''],
@ -8658,11 +8660,13 @@ sub device_vendor {
['(KINGSTON|DataTraveler|^SMS|^SHS|^SUV|^Ultimate CF)','KINGSTON','Kingston',''], # maybe SHS: SHSS37A SKC SUV ['(KINGSTON|DataTraveler|^SMS|^SHS|^SUV|^Ultimate CF)','KINGSTON','Kingston',''], # maybe SHS: SHSS37A SKC SUV
# must come before samsung MU. NOTE: toshiba can have: TOSHIBA_MK6475GSX: mush: MKNSSDCR120GB_ # must come before samsung MU. NOTE: toshiba can have: TOSHIBA_MK6475GSX: mush: MKNSSDCR120GB_
['(^MKN|Mushkin)','Mushkin','Mushkin',''], # MKNS ['(^MKN|Mushkin)','Mushkin','Mushkin',''], # MKNS
# MU = Multiple_Flash_Reader too risky: |M[UZ][^L] # MU = Multiple_Flash_Reader too risky: |M[UZ][^L] HD103SI HD start risky
['(SAMSUNG|^MCG[0-9]+GC|^MCC|^G2 Portable|^DUO\b|^P3|^SP[0-9][0-9])','SAMSUNG','Samsung',''], # maybe ^SM, ^HM # HM320II HM320II
['(SAMSUNG|^MCG[0-9]+GC|^MCC|^[GS]2 Portable|^DUO\b|^P3|^(HM|SP)[0-9]{2})','SAMSUNG','Samsung',''], # maybe ^SM, ^HM
# Android UMS Composite?
['(SanDisk|^SDS[S]?[DQ]|^SL([0-9]+)G|^AFGCE|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme)','SanDisk','SanDisk',''], ['(SanDisk|^SDS[S]?[DQ]|^SL([0-9]+)G|^AFGCE|ULTRA\sFIT|Clip Sport|Cruzer|^Extreme)','SanDisk','SanDisk',''],
['^STEC\b','^STEC\b','STEC',''], # ssd drive, must come before seagate ST test ['^STEC\b','^STEC\b','STEC',''], # ssd drive, must come before seagate ST test
# real, SSEAGATE Backup+; XP1600HE30002 # real, SSEAGATE Backup+; XP1600HE30002 | 024 HN (spinpoint)
['(^ST[^T]|[S]?SEAGATE|^X[AFP]|^5AS|^BUP|Expansion Desk|FreeAgent|GoFlex|Backup(\+|\s?Plus)\s?Hub)','[S]?SEAGATE','Seagate',''], ['(^ST[^T]|[S]?SEAGATE|^X[AFP]|^5AS|^BUP|Expansion Desk|FreeAgent|GoFlex|Backup(\+|\s?Plus)\s?Hub)','[S]?SEAGATE','Seagate',''],
['^(WD|Western Digital|My (Book|Passport)|\d*LPCX|Elements|M000|EARX|EFRX|\d*EAVS|0JD|JPVX|[0-9]+(BEV|AAK|AAV|AZL))','(^WDC|Western\s?Digital)','Western Digital',''], ['^(WD|Western Digital|My (Book|Passport)|\d*LPCX|Elements|M000|EARX|EFRX|\d*EAVS|0JD|JPVX|[0-9]+(BEV|AAK|AAV|AZL))','(^WDC|Western\s?Digital)','Western Digital',''],
## Then better known ones ## ## Then better known ones ##
@ -8670,7 +8674,8 @@ sub device_vendor {
['^ADTRON','^(ADTRON)','Adtron',''], ['^ADTRON','^(ADTRON)','Adtron',''],
['^ASUS','^ASUS','ASUS',''], ['^ASUS','^ASUS','ASUS',''],
['^ATP','^ATP[\s\-]','ATP',''], ['^ATP','^ATP[\s\-]','ATP',''],
['^(Corsair|Voyager)','^Corsair','Corsair',''], # Force MP500
['^(Corsair|Force\s|Voyager)','^Corsair','Corsair',''],
['^(FUJITSU|MHV|MP)','^FUJITSU','Fujitsu',''], ['^(FUJITSU|MHV|MP)','^FUJITSU','Fujitsu',''],
# note: 2012: wdc bought hgst # note: 2012: wdc bought hgst
['^(HGST|Touro)','^HGST','HGST (Hitachi)',''], # HGST HUA ['^(HGST|Touro)','^HGST','HGST (Hitachi)',''], # HGST HUA
@ -8705,8 +8710,11 @@ sub device_vendor {
['^DIGITAL\s?FILM','DIGITAL\s?FILM','Digital Film',''], ['^DIGITAL\s?FILM','DIGITAL\s?FILM','Digital Film',''],
['^DREVO\b','^DREVO','Drevo',''], ['^DREVO\b','^DREVO','Drevo',''],
['^(Eaget|V8$)','^Eaget','Eaget',''], ['^(Eaget|V8$)','^Eaget','Eaget',''],
['^EDGE','^EDGE','EDGE',''],
['^EXCELSTOR','^EXCELSTOR( TECHNO(LOGY)?)?','ExcelStor',''], ['^EXCELSTOR','^EXCELSTOR( TECHNO(LOGY)?)?','ExcelStor',''],
['^EZLINK','^EZLINK','EZLINK',''],
['^Fantom','^Fantom( Drive[s]?)?','Fantom Drives',''], ['^Fantom','^Fantom( Drive[s]?)?','Fantom Drives',''],
['^Faspeed','^Faspeed','Faspeed',''],
['^FASTDISK','^FASTDISK','FASTDISK',''], ['^FASTDISK','^FASTDISK','FASTDISK',''],
['^FORESEE','^FORESEE','Foresee',''], ['^FORESEE','^FORESEE','Foresee',''],
['^GALAX\b','^GALAX','GALAX',''], ['^GALAX\b','^GALAX','GALAX',''],
@ -8742,10 +8750,12 @@ sub device_vendor {
['^(LITE[\-]?ON|PH6)','^LITE[\-]?ON','LITE-ON',''], # PH6-CE240-L ['^(LITE[\-]?ON|PH6)','^LITE[\-]?ON','LITE-ON',''], # PH6-CE240-L
['^M-Systems','^M-Systems','M-Systems',''], ['^M-Systems','^M-Systems','M-Systems',''],
['^(MAXTOR)','^MAXTOR','Maxtor',''], # note M3 is usually maxtor, but can be samsung ['^(MAXTOR)','^MAXTOR','Maxtor',''], # note M3 is usually maxtor, but can be samsung
['(^MT|^M5|^Micron|00-MT)','^Micron','Micron',''],# C400-MTFDDAK128MAM # note: C300/400 can be either micron or crucial, but C400 is M4 from crucial
['(^MT|^M5|^Micron|00-MT|C[34]00)','^Micron','Micron',''],# C400-MTFDDAK128MAM
['^MARVELL','^MARVELL','Marvell',''], ['^MARVELL','^MARVELL','Marvell',''],
['^MDT\b','^MDT','MDT (rebuilt WD/Seagate)',''], # mdt rebuilds wd/seagate hdd ['^MDT\b','^MDT','MDT (rebuilt WD/Seagate)',''], # mdt rebuilds wd/seagate hdd
['^Medion','^Medion','Medion',''], ['^Medion','^Medion','Medion',''],
['^(MEDIAMAX|WL[0-9]{2})','^MEDIAMAX','MediaMax',''],
['^Motorola','^Motorola','Motorola',''], ['^Motorola','^Motorola','Motorola',''],
['^OOS[1-9]','','Utania',''], ['^OOS[1-9]','','Utania',''],
['^PALIT','PALIT','Palit',''], # ssd ['^PALIT','PALIT','Palit',''], # ssd
@ -8793,6 +8803,7 @@ sub device_vendor {
['^VISIONTEK','^VISIONTEK','VisionTek',''], ['^VISIONTEK','^VISIONTEK','VisionTek',''],
['^VMware','^VMware','VMware',''], ['^VMware','^VMware','VMware',''],
['^(Vseky|Vaseky)','^Vaseky','Vaseky',''], # ata-Vseky_V880_350G_ ['^(Vseky|Vaseky)','^Vaseky','Vaseky',''], # ata-Vseky_V880_350G_
['^(ASMT|2115)','^ASMT','ASMT (case)',''],
); );
foreach my $ref (@vendors){ foreach my $ref (@vendors){
my @row = @$ref; my @row = @$ref;
@ -10118,38 +10129,45 @@ sub get_device_sys {
my ($chasis_id) = @_; my ($chasis_id) = @_;
my ($device) = (''); my ($device) = ('');
my @chassis; my @chassis;
# https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.8.0.pdf # See inxi-resources MACHINE DATA for data sources
$chassis[2] = 'unknown'; $chassis[2] = 'unknown';
# note: 13 is all-in-one which we take as a mac type system
$chassis[3] = 'desktop'; $chassis[3] = 'desktop';
$chassis[4] = 'desktop'; $chassis[4] = 'desktop';
$chassis[6] = 'desktop';
$chassis[7] = 'desktop';
$chassis[13] = 'desktop';
$chassis[15] = 'desktop';
$chassis[24] = 'desktop';
# 5 - pizza box was a 1 U desktop enclosure, but some old laptops also id this way # 5 - pizza box was a 1 U desktop enclosure, but some old laptops also id this way
$chassis[5] = 'pizza-box'; $chassis[5] = 'pizza-box';
$chassis[6] = 'desktop';
$chassis[7] = 'desktop';
$chassis[8] = 'portable';
$chassis[9] = 'laptop'; $chassis[9] = 'laptop';
# note: lenovo T420 shows as 10, notebook, but it's not a notebook # note: lenovo T420 shows as 10, notebook, but it's not a notebook
$chassis[10] = 'laptop'; $chassis[10] = 'laptop';
$chassis[16] = 'laptop';
$chassis[14] = 'notebook';
$chassis[8] = 'portable';
$chassis[11] = 'portable'; $chassis[11] = 'portable';
$chassis[17] = 'server';
$chassis[23] = 'server';
$chassis[25] = 'server';
$chassis[27] = 'blade';
$chassis[25] = 'blade';
$chassis[29] = 'blade';
$chassis[12] = 'docking-station'; $chassis[12] = 'docking-station';
# note: 13 is all-in-one which we take as a mac type system
$chassis[13] = 'desktop';
$chassis[14] = 'notebook';
$chassis[15] = 'desktop';
$chassis[16] = 'laptop';
$chassis[17] = 'server';
$chassis[18] = 'expansion-chassis'; $chassis[18] = 'expansion-chassis';
$chassis[19] = 'sub-chassis'; $chassis[19] = 'sub-chassis';
$chassis[20] = 'bus-expansion'; $chassis[20] = 'bus-expansion';
$chassis[21] = 'peripheral'; $chassis[21] = 'peripheral';
$chassis[22] = 'RAID'; $chassis[22] = 'RAID';
$chassis[23] = 'server';
$chassis[24] = 'desktop';
$chassis[25] = 'multimount-chassis'; # blade?
$chassis[26] = 'compact-PCI'; $chassis[26] = 'compact-PCI';
$chassis[27] = 'blade';
$chassis[28] = 'blade';
$chassis[29] = 'blade-enclosure';
$chassis[30] = 'tablet';
$chassis[31] = 'convertible';
$chassis[32] = 'detachable';
$chassis[33] = 'IoT-gateway';
$chassis[34] = 'embedded-pc';
$chassis[35] = 'mini-pc';
$chassis[36] = 'stick-pc';
$device = $chassis[$chasis_id] if $chassis[$chasis_id]; $device = $chassis[$chasis_id] if $chassis[$chasis_id];
eval $end if $b_log; eval $end if $b_log;
return $device; return $device;
@ -13252,26 +13270,26 @@ sub get_repos_linux {
$b_apt_enabled = 1; $b_apt_enabled = 1;
} }
#print "row:$row\n"; #print "row:$row\n";
elsif ($row =~ /^Types:\s*(.*)/){ elsif ($row =~ /^Types:\s*(.*)/i){
#print "ath:$type_holder\n"; #print "ath:$type_holder\n";
$apt_types = $1; $apt_types = $1;
} }
elsif ($row =~ /^Enabled:\s*(.*)/){ elsif ($row =~ /^Enabled:\s*(.*)/i){
my $status = $1; my $status = $1;
$b_apt_enabled = ($status =~ /\b(disable|false|off|no|without)\b/i) ? 0: 1; $b_apt_enabled = ($status =~ /\b(disable|false|off|no|without)\b/i) ? 0: 1;
} }
elsif ($row =~ /^[^#]+:\//){ elsif ($row =~ /^[^#]+:\//){
my $url = $row; my $url = $row;
$url =~ s/^URIs:\s*//; $url =~ s/^URIs:\s*//i;
push @apt_working, $url if $url; push @apt_working, $url if $url;
} }
elsif ($row =~ /^Suites:\s*(.*)/){ elsif ($row =~ /^Suites:\s*(.*)/i){
$apt_suites = $1; $apt_suites = $1;
} }
elsif ($row =~ /^Components:\s*(.*)/){ elsif ($row =~ /^Components:\s*(.*)/i){
$apt_comp = $1; $apt_comp = $1;
} }
elsif ($row =~ /^Architectures:\s*(.*)/){ elsif ($row =~ /^Architectures:\s*(.*)/i){
$apt_arch = $1; $apt_arch = $1;
} }
} }
@ -13354,17 +13372,17 @@ sub get_repos_linux {
foreach my $row (@data){ foreach my $row (@data){
@data2 = split /\s*=\s*/, $row; @data2 = split /\s*=\s*/, $row;
@data2 = map { $_ =~ s/^\s+|\s+$//g ; $_ } @data2; @data2 = map { $_ =~ s/^\s+|\s+$//g ; $_ } @data2;
last if $data2[0] =~ /^SLACKPKGPLUS/ && $data2[1] eq 'off'; last if $data2[0] =~ /^SLACKPKGPLUS/i && $data2[1] eq 'off';
# REPOPLUS=( slackpkgplus restricted alienbob ktown multilib slacky) # REPOPLUS=( slackpkgplus restricted alienbob ktown multilib slacky)
if ($data2[0] =~ /^REPOPLUS/){ if ($data2[0] =~ /^REPOPLUS/i){
@repoplus_list = split /\s+/, $data2[1]; @repoplus_list = split /\s+/, $data2[1];
@repoplus_list = map {s/\(|\)//g; $_} @repoplus_list; @repoplus_list = map {s/\(|\)//g; $_} @repoplus_list;
$active_repos = join ('|',@repoplus_list); $active_repos = join ('|',@repoplus_list);
} }
# MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/14.1/ # MIRRORPLUS['multilib']=http://taper.alienbase.nl/mirrors/people/alien/multilib/14.1/
if ($active_repos && $data2[0] =~ /^MIRRORPLUS/){ if ($active_repos && $data2[0] =~ /^MIRRORPLUS/i){
$data2[0] =~ s/MIRRORPLUS\[\'|\'\]//g; $data2[0] =~ s/MIRRORPLUS\[\'|\'\]//ig;
if ($data2[0] =~ /$active_repos/){ if ($data2[0] =~ /$active_repos/){
push @content,"$data2[0] ~ $data2[1]"; push @content,"$data2[0] ~ $data2[1]";
} }
@ -13422,11 +13440,11 @@ sub get_repos_linux {
$title = $temp; $title = $temp;
} }
# Note: it looks like enabled comes before url # Note: it looks like enabled comes before url
elsif ($line =~ /^(metalink|mirrorlist|baseurl)\s*=\s*(.*)/){ elsif ($line =~ /^(metalink|mirrorlist|baseurl)\s*=\s*(.*)/i){
$url = $2; $url = $2;
} }
# note: enabled = 1. enabled = 0 means disabled # note: enabled = 1. enabled = 0 means disabled
elsif ($line =~ /^enabled\s*=\s*([01])/){ elsif ($line =~ /^enabled\s*=\s*([01])/i){
$enabled = $1; $enabled = $1;
} }
# print out the line if all 3 values are found, otherwise if a new # print out the line if all 3 values are found, otherwise if a new
@ -13484,11 +13502,11 @@ sub get_repos_linux {
} }
$title = $temp; $title = $temp;
} }
elsif ($line =~ /^(sync-uri)\s*=\s*(.*)/){ elsif ($line =~ /^(sync-uri)\s*=\s*(.*)/i){
$url = $2; $url = $2;
} }
# note: enabled = 1. enabled = 0 means disabled # note: enabled = 1. enabled = 0 means disabled
elsif ($line =~ /^auto-sync\s*=\s*(0|1|No|Yes)/){ elsif ($line =~ /^auto-sync\s*=\s*(0|1|No|Yes)/i){
$enabled = $1; $enabled = $1;
$enabled =~ s/No/0/; $enabled =~ s/No/0/;
$enabled =~ s/Yes/1/; $enabled =~ s/Yes/1/;
@ -15771,7 +15789,8 @@ sub get {
$desktop_session = ( $ENV{'DESKTOP_SESSION'} ) ? lc($ENV{'DESKTOP_SESSION'}) : ''; $desktop_session = ( $ENV{'DESKTOP_SESSION'} ) ? lc($ENV{'DESKTOP_SESSION'}) : '';
$xdg_desktop = ( $ENV{'XDG_CURRENT_DESKTOP'} ) ? lc($ENV{'XDG_CURRENT_DESKTOP'}) : ''; $xdg_desktop = ( $ENV{'XDG_CURRENT_DESKTOP'} ) ? lc($ENV{'XDG_CURRENT_DESKTOP'}) : '';
$kde_session_version = ($ENV{'KDE_SESSION_VERSION'}) ? $ENV{'KDE_SESSION_VERSION'} : ''; $kde_session_version = ($ENV{'KDE_SESSION_VERSION'}) ? $ENV{'KDE_SESSION_VERSION'} : '';
get_kde_data(); main::set_ps_gui() if ! $b_ps_gui;
get_kde_trinity_data();
if (!@desktop){ if (!@desktop){
get_env_de_data(); get_env_de_data();
} }
@ -15796,16 +15815,27 @@ sub get {
# ($b_xprop,$kde_session_version,$xdg_desktop,@data,@xprop) = undef; # ($b_xprop,$kde_session_version,$xdg_desktop,@data,@xprop) = undef;
return @desktop; return @desktop;
} }
sub get_kde_data { sub get_kde_trinity_data {
eval $start if $b_log; eval $start if $b_log;
my ($program,@version_data,@version_data2); my ($program,@version_data,@version_data2);
my $kde_full_session = ($ENV{'KDE_FULL_SESSION'}) ? $ENV{'KDE_FULL_SESSION'} : ''; my $kde_full_session = ($ENV{'KDE_FULL_SESSION'}) ? $ENV{'KDE_FULL_SESSION'} : '';
return 1 if ($xdg_desktop ne 'kde' && !$kde_session_version && $kde_full_session ne 'true' );
if ($desktop_session eq 'trinity' || $xdg_desktop eq 'trinity' || (grep {/^tde/} @ps_gui) ){
$desktop[0] = 'Trinity';
if ($program = main::check_program('kdesktop')){
@version_data = main::grabber("$program --version 2>/dev/null");
$desktop[1] = main::awk(\@version_data,'^TDE:',2,'\s+') if @version_data;
}
if ($extra > 1 && @version_data){
$desktop[2] = 'Qt';
$desktop[3] = main::awk(\@version_data,'^Qt:',2,'\s+') if @version_data;
}
}
# works on 4, assume 5 will id the same, why not, no need to update in future # works on 4, assume 5 will id the same, why not, no need to update in future
# KDE_SESSION_VERSION is the integer version of the desktop # KDE_SESSION_VERSION is the integer version of the desktop
# NOTE: as of plasma 5, the tool: about-distro MAY be available, that will show # NOTE: as of plasma 5, the tool: about-distro MAY be available, that will show
# actual desktop data, so once that's in debian/ubuntu, if it gets in, add that test # actual desktop data, so once that's in debian/ubuntu, if it gets in, add that test
if ($xdg_desktop eq 'kde' || $kde_session_version ){ elsif ( $xdg_desktop eq 'kde' || $kde_session_version ){
if ($kde_session_version && $kde_session_version <= 4){ if ($kde_session_version && $kde_session_version <= 4){
@data = main::program_values("kded$kde_session_version"); @data = main::program_values("kded$kde_session_version");
if (@data){ if (@data){
@ -15875,18 +15905,6 @@ sub get_kde_data {
sub get_env_de_data { sub get_env_de_data {
eval $start if $b_log; eval $start if $b_log;
my ($program,@version_data); my ($program,@version_data);
main::set_ps_gui() if ! $b_ps_gui;
if ($desktop_session eq 'trinity' || $xdg_desktop eq 'trinity' || (grep {/^tde/} @ps_gui) ){
$desktop[0] = 'Trinity';
if ($program = main::check_program('kdesktop')){
@version_data = main::grabber("$program --version 2>/dev/null");
$desktop[1] = main::awk(\@version_data,'^TDE:',2,'\s+') if @version_data;
}
if ($extra > 1 && @version_data){
$desktop[2] = 'Qt';
$desktop[3] = main::awk(\@version_data,'^Qt:',2,'\s+') if @version_data;
}
}
if (!$desktop[0]){ if (!$desktop[0]){
# 1 equals 1/0; 2 env var search; 3 values; 4 version; 5 - gtk tk; 6 - qt tk # 1 equals 1/0; 2 env var search; 3 values; 4 version; 5 - gtk tk; 6 - qt tk
my @desktops =( my @desktops =(
@ -16329,10 +16347,10 @@ sub get_display_manager {
my (@data,@found,$path,$working,$b_run,$b_vrun,$b_vrunrc); my (@data,@found,$path,$working,$b_run,$b_vrun,$b_vrunrc);
# ldm - LTSP display manager. Note that sddm does not appear to have a .pid # ldm - LTSP display manager. Note that sddm does not appear to have a .pid
# extension in Arch note: to avoid positives with directories, test for -f # extension in Arch note: to avoid positives with directories, test for -f
# explicitly, not -e # explicitly, not -e. Guessing on cdm.pid
my @dms = qw(entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid my @dms = qw(cdm.pid entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid
lightdm.pid lxdm.pid mdm.pid nodm.pid pcdm.pid sddm.pid slim.lock lightdm.pid lxdm.pid mdm.pid nodm.pid pcdm.pid sddm.pid slim.lock
wdm.pid xdm.pid xenodm.pid); tdm.pid wdm.pid xdm.pid xenodm.pid);
# these are the only one I know of so far that have version info # these are the only one I know of so far that have version info
my @dms_version = qw(gdm gdm3 lightdm slim); my @dms_version = qw(gdm gdm3 lightdm slim);
$b_run = 1 if -d "/run"; $b_run = 1 if -d "/run";
@ -16426,10 +16444,10 @@ sub get_linux_distro {
my ($distro,$distro_id,$distro_file,$system_base) = ('','','',''); my ($distro,$distro_id,$distro_file,$system_base) = ('','','','');
my ($b_issue,$b_osr,$b_use_issue,@working); my ($b_issue,$b_osr,$b_use_issue,@working);
# order matters! # order matters!
my @derived = qw(antix-version aptosid-version bodhibuilder.conf kanotix-version knoppix-version my @derived = qw(antix-version aptosid-version bodhibuilder.conf kanotix-version
pclinuxos-release mandrake-release manjaro-release mx-version pardus-release knoppix-version pclinuxos-release mandrake-release manjaro-release mx-version
porteus-version sabayon-release siduction-version sidux-version slitaz-release pardus-release porteus-version q4os_version sabayon-release siduction-version sidux-version
solusos-release turbolinux-release zenwalk-version); slitaz-release solusos-release turbolinux-release zenwalk-version);
my $derived_s = join "|", @derived; my $derived_s = join "|", @derived;
my @primary = qw(altlinux-release arch-release gentoo-release redhat-release slackware-version my @primary = qw(altlinux-release arch-release gentoo-release redhat-release slackware-version
SuSE-release); SuSE-release);
@ -16548,6 +16566,10 @@ sub get_linux_distro {
} }
else { else {
$distro = (main::reader($distro_file))[0]; $distro = (main::reader($distro_file))[0];
# only contains version number. Why? who knows.
if ($distro_file eq '/etc/q4os_version' && $distro !~ /q4os/i){
$distro = "Q4OS $distro" ;
}
} }
$distro = main::clean_characters($distro) if $distro; $distro = main::clean_characters($distro) if $distro;
} }
@ -16613,7 +16635,7 @@ sub get_linux_distro {
my $base_default = 'antix-version|mx-version'; # osr has base ids my $base_default = 'antix-version|mx-version'; # osr has base ids
my $base_issue = 'bunsen'; # base only found in issue my $base_issue = 'bunsen'; # base only found in issue
my $base_manual = 'blankon|deepin|kali'; # synthesize, no direct data available my $base_manual = 'blankon|deepin|kali'; # synthesize, no direct data available
my $base_osr = 'aptosid|grml|siduction|bodhi'; # osr base, distro id in list of distro files my $base_osr = 'aptosid|grml|q4os|siduction|bodhi'; # osr base, distro id in list of distro files
my $base_osr_issue = 'grml|linux lite'; # osr base, distro id in issue my $base_osr_issue = 'grml|linux lite'; # osr base, distro id in issue
# osr has distro name but has ubuntu ID_LIKE/UBUNTU_CODENAME # osr has distro name but has ubuntu ID_LIKE/UBUNTU_CODENAME
my $base_osr_ubuntu = 'mint|neon|nitrux|pop!_os|zorin'; my $base_osr_ubuntu = 'mint|neon|nitrux|pop!_os|zorin';

2
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2018\-11\-28" inxi "inxi manual" .TH INXI 1 "2018\-12\-10" inxi "inxi manual"
.SH NAME .SH NAME
inxi \- Command line system information script for console and IRC inxi \- Command line system information script for console and IRC
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,3 +1,45 @@
=====================================================================================
Version: 3.0.29
Patch: 00
Date: 2018-12-10
-----------------------------------
Changes:
-----------------------------------
New version, fixes, updates, missing specs.
Bugs:
1. See fix 4, incorrect positioning of Trinity desktop detection logic.
Fixes:
1. Vascom reports in issue #169 that some systems are making the /sys cpu
vulnerability data root read only. Added <root required> test and output.
2. A while back, they added several chassis types in the smbios
specifications. I used an older specification pdf file, this is now corrected.
Note that realworld use of the new types exists, like tablet, mini pc, and so
on. This missing data caused Machine report to list N/A as machine type when
it was actually known. I'd been using an older specification PDF, and had
failed to look at the actual spec download page, where you could clearly see
the newer spec file. Corrected this in the inxi docs as well.
3. Made gentoo repo reader check for case insensitive values for enabled.
Also extended that to other repo readers that use similar syntax, they are
all now case insensitive (Yes/yes/YES, that is)
4. Fixed incorrect handling of Trinity desktop ID, that needed to happen in
the kde ID block, as first test, not after it. Caused failure in Q4OS trinity,
and maybe others. I'm not sure why inxi had the detection where it was, it
made no real sense, so that's now nicely integrated, so these types of
failures should not happen again. Thanks Q4OS for exposing that issue.
Enhancements:
1. Added TDM and CDM display managers. Never seen either (Q4OS uses TDM), TDM
corrected. CDM not confirmed, don't know if it's still around, but if it is
similar to TDM re cdm.pid in /run, it should be detected fine.
2. Added more disk vendors/ids, the list never stops!! Thanks LinuxLite
Hardware database, your users seem to use every disk known to humanity.
3. Added Debian derived Q4OS distro ID and system base handler.
-----------------------------------
-- Harald Hope - Mon, 10 Dec 2018 11:08:47 -0800
===================================================================================== =====================================================================================
Version: 3.0.28 Version: 3.0.28
Patch: 00 Patch: 00