aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-08-17 15:48:37 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-08-17 15:48:37 -0400
commit6a58eae8e8cbf1b4a48ba0b13af461e7f4b84493 (patch)
tree0ebb4fb1bf6f9b3f74163667fb6125372a4322b7
parentcc3a9701bfd934244cafd21ed917f20370b3d35b (diff)
parent35ddf848228bfd4748f84d58a1d741d0623d2b66 (diff)
downloadinxi-6a58eae8e8cbf1b4a48ba0b13af461e7f4b84493.tar.bz2
inxi-6a58eae8e8cbf1b4a48ba0b13af461e7f4b84493.tar.xz
inxi-6a58eae8e8cbf1b4a48ba0b13af461e7f4b84493.tar.zst
Merge tag 'upstream/2.2.27'
Upstream version 2.2.27 # gpg: Signature made Mon 17 Aug 2015 03:48:34 PM EDT using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
-rwxr-xr-xinxi120
-rwxr-xr-xinxi.18
-rwxr-xr-xinxi.1.gzbin9979 -> 10071 bytes
-rwxr-xr-xinxi.changelog164
4 files changed, 267 insertions, 25 deletions
diff --git a/inxi b/inxi
index 64c1922..c65bb8f 100755
--- a/inxi
+++ b/inxi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
-#### Version: 2.2.21
-#### Date: 2015-05-13
+#### Version: 2.2.27
+#### Date: 2015-08-02
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@@ -603,12 +603,12 @@ BLUE,WHITE,NORMAL
# the derived distro's version file should go first. (Such as with Sabayon / Gentoo)
DISTROS_DERIVED="antix-version aptosid-version kanotix-version knoppix-version mandrake-release pardus-release porteus-version sabayon-release siduction-version sidux-version slitaz-release solusos-release turbolinux-release zenwalk-version"
# debian_version excluded from DISTROS_PRIMARY so Debian can fall through to /etc/issue detection. Same goes for Ubuntu.
-DISTROS_EXCLUDE_LIST="debian_version ubuntu_version"
+DISTROS_EXCLUDE_LIST="debian_version devuan_version ubuntu_version"
DISTROS_PRIMARY="arch-release gentoo-release redhat-release slackware-version SuSE-release"
DISTROS_LSB_GOOD="mandrake-release mandriva-release mandrakelinux-release"
# this is being used both by core distros and derived distros now, eg, solusos 1 uses it for solusos id, while
# debian, solusos base, uses it as well, so we have to know which it is.
-DISTROS_OS_RELEASE_GOOD="arch-release SuSE-release"
+DISTROS_OS_RELEASE_GOOD="arch-release SuSE-release "
## Distros with known problems
# DSL (Bash 2.05b: grep -m doesn't work; arrays won't work) --> unusable output
# Puppy Linux 4.1.2 (Bash 3.0: arrays won't work) --> works partially
@@ -1947,9 +1947,42 @@ debug_data_collector()
echo $GNOME_DESKTOP_SESSION_ID &> $debug_data_dir/gnome-desktop-session-id.txt
# kde 3 id
- echo $KDE_FULL_SESSION &> $debug_data_dir/kde3-ful-session.txt
- echo $KDE_SESSION_VERSION &> $debug_data_dir/kde456-session-version.txt
- echo "$(kded$KDE_SESSION_VERSION --version )" &> $debug_data_dir/kde-version-data.txt
+ echo $KDE_FULL_SESSION &> $debug_data_dir/kde3-full-session.txt
+ echo $KDE_SESSION_VERSION &> $debug_data_dir/kde-gte-4-session-version.txt
+ if type -p kf5-config &>/dev/null; then
+ kf5-config --version &> $debug_data_dir/kde-kf5-config-version-data.txt
+ elif type -p kf6-config &>/dev/null; then
+ kf6-config --version &> $debug_data_dir/kde-kf6-config-version-data.txt
+ elif type -p kf$KDE_SESSION_VERSION-config &>/dev/null; then
+ kf$KDE_SESSION_VERSION-config --version &> $debug_data_dir/kde-kf$KDE_SESSION_VERSION-KSV-config-version-data.txt
+ else
+ touch $debug_data_dir/kde-kf-config-absent
+ fi
+ if type -p plasmashell &>/dev/null; then
+ plasmashell --version &> $debug_data_dir/kde-plasmashell-version-data.txt
+ else
+ touch $debug_data_dir/kde-plasmashell-absent
+ fi
+ if type -p kwin_x11 &>/dev/null; then
+ kwin_x11 --version &> $debug_data_dir/kde-kwin_x11-version-data.txt
+ else
+ touch $debug_data_dir/kde-kwin_x11-absent
+ fi
+ if type -p kded4 &>/dev/null; then
+ kded4 --version &> $debug_data_dir/kded4-version-data.txt
+ elif type -p kded5 &>/dev/null; then
+ kded5 --version &> $debug_data_dir/kded5-version-data.txt
+ elif type -p kded &>/dev/null; then
+ kded --version &> $debug_data_dir/kded-version-data.txt
+ else
+ touch $debug_data_dir/kded-$KDE_SESSION_VERSION-absent
+ fi
+ # kde 5/plasma desktop 5, this is maybe an extra package and won't be used
+ if type -p about-distro &>/dev/null; then
+ about-distro &> $debug_data_dir/kde-about-distro.txt
+ else
+ touch $debug_data_dir/kde-about-distro-absent
+ fi
echo $XDG_CURRENT_DESKTOP &> $debug_data_dir/xdg-current-desktop.txt
fi
if [[ $1 == 'disk' || $1 == 'all' ]];then
@@ -4497,24 +4530,45 @@ get_desktop_environment()
# set the default, this function only runs in X, if null, don't print data out
local desktop_environment='' xprop_root='' version2=''
- local version='' version_data='' toolkit=''
+ local version='' version_data='' version2_data='' toolkit=''
# 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
+ # 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
if [[ $XDG_CURRENT_DESKTOP == 'KDE' || -n $KDE_SESSION_VERSION ]]; then
# note the command is actually like, kded4 --version, so we construct it
- version_data=$( kded$KDE_SESSION_VERSION --version 2>/dev/null )
- version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
+ # this was supposed to extend to 5, but 5 changed it, so it uses the more reliable way
+ if [[ $KDE_SESSION_VERSION -le 4 ]];then
+ version_data=$( kded$KDE_SESSION_VERSION --version 2>/dev/null )
+ version=$( grep -si '^KDE Development Platform:' <<< "$version_data" | gawk '{print $4}' )
+ else
+ # NOTE: this command string is almost certain to change, and break, with next major plasma desktop, ie, 6
+ # version=$( qdbus org.kde.plasmashell /MainApplication org.qtproject.Qt.QCoreApplication.applicationVersion 2>/dev/null )
+ #Qt: 5.4.2
+ #KDE Frameworks: 5.11.0
+ #kf5-config: 1.0
+ # for QT, and Frameworks if we use it
+ if type -p kf$KDE_SESSION_VERSION-config &>/dev/null;then
+ version_data=$( kf$KDE_SESSION_VERSION-config --version 2>/dev/null )
+ # version=$( grep -si '^KDE Frameworks:' <<< "$version_data" | gawk '{print $NF}' )
+ fi
+ # plasmashell 5.3.90
+ if type -p plasmashell &>/dev/null;then
+ version2_data=$( plasmashell --version 2>/dev/null )
+ version=$( grep -si '^plasmashell' <<< "$version2_data" | gawk '{print $NF}' )
+ fi
+ fi
if [[ -z $version ]];then
version=$KDE_SESSION_VERSION
fi
- if [[ $B_EXTRA_DATA == 'true' ]];then
+ if [[ $B_EXTRA_DATA == 'true' && -n $version_data ]];then
toolkit=$( grep -si '^Qt:' <<< "$version_data" | gawk '{print $2}' )
if [[ -n $toolkit ]];then
version="$version (Qt $toolkit)"
fi
fi
- desktop_environment="KDE"
+ desktop_environment="KDE Plasma"
# KDE_FULL_SESSION property is only available since KDE 3.5.5.
# src: http://humanreadable.nfshost.com/files/startkde
elif [[ $KDE_FULL_SESSION == 'true' ]]; then
@@ -4860,7 +4914,7 @@ get_desktop_extra_data()
desktops=""
separator=""
}
- /(gnome-shell|gnome-panel|kicker|lxpanel|mate-panel|plasma-desktop|xfce4-panel)$/ {
+ /(gnome-shell|gnome-panel|kicker|lxpanel|mate-panel|plasma-desktop|plasma-netbook|xfce4-panel)$/ {
# only one entry per type, can be multiple
if ( desktops !~ $NF ) {
desktops = desktops separator $NF
@@ -4963,8 +5017,11 @@ get_display_manager()
for dm_id in $dm_id_list
do
# note: ${dm_id%.*}/$dm_id will create a dir name out of the dm id, then test if pid is in that
- if [[ -f /run/$dm_id || -f /run/${dm_id%.*}/$dm_id || -f /var/run/$dm_id || \
- -f /var/run/${dm_id%.*}/$dm_id ]];then
+ # note: sddm, in an effort to be unique and special, do not use a pid/lock file, but rather a random
+ # string inside a directory called /run/sddm/ so assuming the existence of the pid inside a directory named
+ # from the dm. Hopefully this change will not have negative results.
+ if [[ -f /run/$dm_id || -d /run/${dm_id%.*}/ || -f /var/run/$dm_id || \
+ -d /var/run/${dm_id%.*}/ ]];then
# just on the off chance that two dms are running, good info to have in that case, if possible
dm=$dm$separator${dm_id%.*}
separator=','
@@ -7294,8 +7351,8 @@ get_networking_usb_data()
get_networking_wan_ip_data()
{
eval $LOGFS
- local ip='' ip_data='' downloader_error=0
-
+ local ip='' ip_data='' downloader_error=0 ua=''
+
# get ip using wget redirect to stdout. This is a clean, text only IP output url,
# single line only, ending in the ip address. May have to modify this in the future
# to handle ipv4 and ipv6 addresses but should not be necessary.
@@ -7304,7 +7361,10 @@ get_networking_wan_ip_data()
# ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval '
case $DOWNLOADER in
curl)
- ip_data="$( curl -y $DL_TIMEOUT -s $WAN_IP_URL )" || downloader_error=$?
+ if [[ -n $( grep 'smxi.org' <<< $WAN_IP_URL ) ]];then
+ ua="-A s-tools/inxi-ip"
+ fi
+ ip_data="$( curl $ua -y $DL_TIMEOUT -s $WAN_IP_URL )" || downloader_error=$?
;;
fetch)
ip_data="$( fetch -T $DL_TIMEOUT -q -o - $WAN_IP_URL )" || downloader_error=$?
@@ -7313,7 +7373,10 @@ get_networking_wan_ip_data()
ip_data="$( ftp -o - $WAN_IP_URL 2>/dev/null )" || downloader_error=$?
;;
wget)
- ip_data="$( wget -T $DL_TIMEOUT -q -O - $WAN_IP_URL )" || downloader_error=$?
+ if [[ -n $( grep 'smxi.org' <<< $WAN_IP_URL ) ]];then
+ ua="-U s-tools/inxi-ip"
+ fi
+ ip_data="$( wget $ua -T $DL_TIMEOUT -q -O - $WAN_IP_URL )" || downloader_error=$?
;;
no-downloader)
downloader_error=1
@@ -13007,17 +13070,30 @@ print_ps_item()
eval $LOGFS
local a_ps_data='' ps_data='' line_starter='' line_start_data='' full_line=''
local app_name='' app_pid='' app_cpu='' app_mem='' throttled='' app_daemon=''
- local b_print_first=$2 line_counter=0 i=0 count_nu='' extra_data=''
+ local b_print_first=$2 line_counter=0 i=0 count_nu='' extra_data='' memory='' extra_text=''
if [[ -n $PS_THROTTLED ]];then
throttled=" ${C1} - throttled from${C2} $PS_THROTTLED"
fi
+ # important: ${C2} $PS_COUNT must have space after ${C2} for irc output or the number vanishes
case $1 in
cpu)
- line_start_data="${C1}CPU - % used - top ${C2} $PS_COUNT ${C1}active$throttled "
+ if [[ $B_EXTRA_DATA == 'true' ]];then
+ extra_text=" ${C1}- Memory$SEP3 MB / % used"
+ if [[ $B_SHOW_INFO == 'false' && $B_SHOW_PS_MEM_DATA == 'false' ]];then
+ memory=" - ${C1}Used/Total$SEP3${C2} $( get_memory_data )"
+ fi
+ fi
+ line_start_data="${C1}CPU$SEP3 % used$extra_text$memory${C1} - top${C2} $PS_COUNT ${C1}active$throttled"
;;
mem)
- line_start_data="${C1}Memory - MB / % used - top ${C2} $PS_COUNT ${C1}active$throttled"
+ if [[ $B_EXTRA_DATA == 'true' ]];then
+ extra_text=" ${C1}- CPU$SEP3 % used"
+ fi
+ if [[ $B_SHOW_INFO == 'false' ]];then
+ memory=" - ${C1}Used/Total$SEP3${C2} $( get_memory_data )"
+ fi
+ line_start_data="${C1}Memory$SEP3 MB / % used$memory$extra_text${C1} - top${C2} $PS_COUNT ${C1}active$throttled"
;;
esac
diff --git a/inxi.1 b/inxi.1
index 2d71f77..548b718 100755
--- a/inxi.1
+++ b/inxi.1
@@ -1,4 +1,4 @@
-.TH INXI 1 "2015\-02\-15" inxi "inxi manual"
+.TH INXI 1 "2015\-05\-30" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
.SH SYNOPSIS
@@ -211,7 +211,8 @@ Make sure to have no space between letters and numbers (\fB\-t cm10\fR \- right,
\- cpu only. With \fB\-x\fR, shows also memory for that process on same line.
.TP
.B \-t m\fR
-\- memory only. With \fB\-x\fR, shows also cpu for that process on same line.
+\- memory only. With \fB\-x\fR, shows also cpu for that process on same line. If the \i-I line is not triggered,
+will also show the system used/total ram information in the first \fBMemory\fR line of output.
.TP
.B \-t cm\fR
\- cpu+memory. With \fB\-x\fR, shows also cpu or memory for that process on same line.
@@ -365,7 +366,8 @@ version number, if available.
\- Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version.
.TP
.B \-x \-t
-\- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory (\fB\-xt m\fR).
+\- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory (\fB\-xt m\fR). For \fB\-xt c\fR will also show
+system Used/Total ram data if \fB\-t m\fR (memory) is not used AND \fB\-I\fR is not triggered.
.TP
.B \-x \-w / \-W
\- Adds wind speed and time zone (\fB\-w\fR only), and makes output go to two lines.
diff --git a/inxi.1.gz b/inxi.1.gz
index 897012b..58775f0 100755
--- a/inxi.1.gz
+++ b/inxi.1.gz
Binary files differ
diff --git a/inxi.changelog b/inxi.changelog
index 2242ad5..5144feb 100755
--- a/inxi.changelog
+++ b/inxi.changelog
@@ -1,4 +1,168 @@
=====================================================================================
+Version: 2.2.27
+Patch Version: 00
+Script Date: 2015-08-02
+-----------------------------------
+Changes:
+-----------------------------------
+New version, tarball. Trivial wget/curl change, nothing else. No need to upgrade packages.
+
+-----------------------------------
+-- Harald Hope - Sun, 02 Aug 2015 14:18:45 -0700
+
+=====================================================================================
+Version: 2.2.26
+Patch Version: 00
+Script Date: 2015-07-06
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. This fixes a bug with the last fix for KDE Plasma version. It was
+showing Frameworks version, which is apparently NOT the same as the plasma version.
+
+Also added debugger kde versioning to make this stuff less of an ordeal for data collection.
+
+-----------------------------------
+-- Harald Hope - Mon, 06 Jul 2015 15:51:51 -0700
+
+
+=====================================================================================
+Version: 2.2.25
+Patch Version: 00
+Script Date: 2015-06-15
+-----------------------------------
+Changes:
+-----------------------------------
+Same version, new tarball, I'm tossing this in with the other release, changing for kde >= 4,
+changing simple KDE to KDE Plasma, which keeps it clear and simple.
+
+-----------------------------------
+-- Harald Hope - Mon, 15 Jun 2015 18:00:42 -0700
+
+=====================================================================================
+Version: 2.2.25
+Patch Version: 00
+Script Date: 2015-06-15
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. Got a good fix for the kde version issue from the lads at
+#kde-devel, now using kf5-config --version which gives similar output to kded4 --version
+
+I use this for both 4 and 5, but since 4 has worked fine for years, I'll just use this for 5
+and later.
+
+-----------------------------------
+-- Harald Hope - Mon, 15 Jun 2015 17:49:56 -0700
+
+=====================================================================================
+Version: 2.2.24
+Patch Version: 00
+Script Date: 2015-06-15
+-----------------------------------
+Changes:
+-----------------------------------
+new version, new tarball. Adapted to deal with yet another silly pointless change from
+normal, in this case, sddm decided that using a .pid or .lock file in /run was too easy
+so they changed to some session id type string in the /run/sddm/ directory.
+
+Speaking for myself, I find such pointless changes from anything resembling normal behaviors
+to the reason that gnu freedesktop systems will never achieve significant desktop use globally.
+
+Also, in the same vein, added debuggers to try to figure out what plasma5/kde 5 is using
+internally to give command line version information. Again, something pointless internally
+was changed, thus breaking something that had faintly resembled an api, which is of course
+why desktop gnu linux will never actually take off, developers in the real world have no
+interest in chasing after such pointless and never ending churn in even the most trivial
+areas of the OS, let alone the core.
+
+inxi remains however as a log of this ongoing churn and lack of discipline, and so remains
+an interesting process of observation, and a way for users to try to avoid the constant
+changes in simple system queries that should really never change, so I can see a reason
+to keep it going since it's obvious that the actual foss ecosystem itself will not and apparently
+cannot grasp that it is the lack of stable apis, methods, etc, that has kept desktop gnu linux
+from achieving any actual real world success or popularity, and that is the actual problem
+that should be fixed, not some pointless internal change to something.
+
+On the source repo front, maintainers, I still can't find an acceptable alternative to the
+impending shutdown of googlecode. github is a for profit venture that people who seem totally
+void of any sense of history believe is actually going to be around longer than say, sourceforge,
+or googlecode, as a legitimate source hosting site.
+
+I'd welcome any suggestions. So far all the options are bad that I can find.
+
+Top preference is svn, but if git is the absolute only other choice for an otherwise good option,
+I'd consider git, but it's a horrible option for inxi because of how inxi development and debugging
+works, vs how git works. ie, svn branches are perfect, git branches are totally wrong.
+
+I may end up just hosting the svn on my own servers to avoid having to move yet again when the next
+for profit flakey site decides to close up or monetize the source hosting.
+
+The original idea of googlecode was for google to 'pay its dues to the foss community', but apparently
+they got bored with that idea, plus of course, the ongoing total failure of google to deal with
+automated spam, which has always been a huge bug in the core google corporate culture. But googlecode
+was by far the best option I've come across, it was done by a deep pocketed corporation not for profit
+for pretty good reasons, and was never intended to be a profit center, which is the closest I could
+see for a non free option.
+
+Setting up svn gui stuff however is a royal pain and requires ongoing maintainance for the life of
+the software, which is NOT fun, nor will I sign up for that obligation.
+
+I may end up moving to github anyway, even though git truly sucks for inxi and myself, but it's an
+idea I find fairly vile, apparently free software (sic) authors seem to have no grasp of the concept
+of fredom when it comes to source code hosting, judging by the absurd popularity of github as the
+default go to source repo. Their website is pathetic as well, which isn't very promising.
+
+So we'll see where it goes, I think I have until august to decide what to do for source hosting.
+
+Since I'm old enough to have seen sourceforge and now googlecode do the same thing, along with a lot
+of other options, to say github won't do this too is delusional, what you can almost certainly say is it
+will do it, the only question is when. But, just as Linus did with his non free linux kernel version
+control, people will stick with the non free stuff until you realize you can't use it anymore, because
+it is non free. Free software hosted on non free source repos is to me one of the most absurd and
+stupid things I've ever heard of to be honest.
+
+-----------------------------------
+-- Harald Hope - Mon, 15 Jun 2015 15:19:02 -0700
+
+=====================================================================================
+Version: 2.2.23
+Patch Version: 00
+Script Date: 2015-06-08
+-----------------------------------
+Changes:
+-----------------------------------
+New version, tarball. Tiny change. Added /etc/devuan_version file to distro id to handle
+the switched file name. Kudos to anyone out there fighting to create a working alternative
+to the unreliable and buggy and windows emulating systemd, I wish devuan luck. Maybe between
+devuan and gentoo and slackware we can save the free software core systems before it's too late.
+
+-----------------------------------
+-- Harald Hope - Mon, 08 Jun 2015 15:43:52 -0700
+
+=====================================================================================
+Version: 2.2.22
+Patch Version: 00
+Script Date: 2015-05-30
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new man page, new tarball. Modified slightly -tc and -tm output to fix a
+pet peeve of mine. Now, if -I, -b, -F, or anything that can trigger the memory: used/total
+in Information line is not used, -tm will always show the system used/total ram data on the
+first line of the Memory item of -t output.
+
+Also, if -xtc (trigger ram data in cpu output) is used, and -I is not triggered, and -tm is
+not triggered, will also show system used/total ram data on the cpu first line.
+
+I'd found it odd that this data did not appear when -tcm or -tm or -xtc were used, so this is
+now fixed. I used the -t option a fair amount to find memory/cpu use issues, and usually I
+don't use the option with other options, so the lack of total system ram data was odd.
+
+-----------------------------------
+-- Harald Hope - Sat, 30 May 2015 11:50:56 -0700
+
+=====================================================================================
Version: 2.2.21
Patch Version: 00
Script Date: 2015-05-13