From fb697770024d3457a019748a3ebf640308dd3ddc Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 24 Jun 2012 20:04:46 +0000 Subject: [PATCH] Added more dm, ldm, tint2. Added kicker to extra de info. Biggest change, totally reworked the man page, now it's much more complete and has a lot more information. Includes how to run in IRC clients, how to create konversation shortcut for /inxi type start. Ok, that's it, probably will refine the desktop extra information and maybe add a dm or two more. Also added in startx detection for when no dm was detected, thanks JavaAtom for that one. --- inxi | 23 ++++---- inxi.8 | 164 +++++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 126 insertions(+), 61 deletions(-) diff --git a/inxi b/inxi index de26109..707ca3a 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.8.7 +#### version: 1.8.8 #### Date: June 24 2012 #### Patch Number: 00 ######################################################################## @@ -2213,8 +2213,8 @@ show_options() print_screen_output " Shows full disk data (-D)." print_screen_output " 5 - Adds audio card (-A); sensors (-s), partition label (-l) and UUID (-u), short form of optical drives," print_screen_output " standard raid data (-R)." - print_screen_output " 6 - Adds full partition data (-p), unmounted partition data (-o), optical drive data (-d), full raid." - print_screen_output " 7 - Adds network IP data (-i); triggers -xx." + print_screen_output " 6 - Adds data types: full partition (-p), unmounted partition (-o), optical drive (-d), full raid; triggers -xx." + print_screen_output " 7 - Adds network IP data (-i); triggers -xxx." print_screen_output "-x Show extra data (only works with verbose or line output, not short form): " print_screen_output " -C - bogomips on Cpu;" print_screen_output " -d - Adds items to features line of optical drive; adds rev version to optical drive." @@ -3368,7 +3368,7 @@ get_desktop_extra_data() desktops="" separator="" } - /(cinnamon|gnome-shell|gnome-panel|lxpanel|mate-panel|plasma-desktop|xfce4-panel)$/ { + /(cinnamon|gnome-shell|gnome-panel|kicker|lxpanel|mate-panel|plasma-desktop|xfce4-panel)$/ { # only one entry per type, can be multiple if ( desktops !~ $NF ) { desktops = desktops separator $NF @@ -3425,9 +3425,12 @@ get_de_app_version() get_display_manager() { eval $LOGFS - local dm_id_list='entrance/entranced.pid gdm.pid gdm3.pid kdm.pid lightdm.pid lxdm.pid mdm.pid nodm.pid slim.lock wdm.pid xdm.pid' + # ldm - LTSP display manager + local dm_id_list='entranced.pid entrance/entranced.pid gdm.pid gdm3.pid kdm.pid ldm.pid lightdm.pid lxdm.pid mdm.pid nodm.pid slim.lock tint2.pid wdm.pid xdm.pid' local dm_id='' dm='' separator='' - local x_is_running=$( ps aux | grep '/usr.*/X' | grep -Eivc '(grep|/Xprt)' ) + # note we don't need to filter grep if we do it this way + local ps_aux="$( ps aux )" + local x_is_running=$( grep '/usr.*/X' <<< "$ps_aux" | grep -iv '/Xprt' ) for dm_id in $dm_id_list do @@ -3439,9 +3442,11 @@ get_display_manager() done # might add this in, but the rate of new dm's makes it more likely it's an unknown dm, so # we'll keep output to N/A -# if [[ -n $x_is_running && -z $dm ]];then -# dm='startx' -# fi + if [[ -n $x_is_running && -z $dm ]];then + if [[ -n $( grep 'startx$' <<< "$ps_aux" ) ]];then + dm='(startx)' + fi + fi echo $dm log_function_data "display manager: $dm" diff --git a/inxi.8 b/inxi.8 index 00a776d..876c2a0 100644 --- a/inxi.8 +++ b/inxi.8 @@ -1,10 +1,9 @@ .TH INXI 8 2011-05-13 Linux "inxi" .SH NAME -inxi - Info script for console and IRC. - +inxi - Command line system information script for console and IRC .SH SYNOPSIS -.B inxi +.B inxi \fR - Single line, short form. Very basic output. .B inxi \fR[\fB-AbCdDfFGhHiIlMnNopPrsSu\fR] \fR[\fB-c NUMBER\fR] \fR[\fB-v NUMBER\fR] @@ -12,26 +11,65 @@ inxi - Info script for console and IRC. .B inxi \fR[\fB--help\fR] \fR[\fB--recommends\fR] \fR[\fB--version\fR] \fR[\fB-@ NUMBER\fR] - .SH DESCRIPTION .B inxi -.R is an system info script for console and IRC. However some people use inxi in their -forum posts as well - for the same reason. It is is a fork of locsmif's largely unmaintained yet -very clever, infobash script. inxi is co-developed, a group project, primarily with trash80 on -the programming side. +.R is a command line system information script built for for console and IRC. It is also used for forum technical +support, as a debugging tool, to quickly ascertain user system configuration and hardware. inxi shows system +hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM usage, and a wide variety of other +useful information. -But the nice people at irc.oftc.net channel #linux-smokers-club all really have to -be considered to be co-developers because of their non-stop enthusiasm and -willingness to provide real time testing and debugging of inxi development. +.B inxi +.R output varies between CLI and IRC, with some default filters and color options applied to IRC use. Script colors can +be turned off if desired with -c 0, or changed using the -c color options listed in the OPTIONS section below. -Without a wide range of diverse Linux kernel based Free Desktop systems to test -on, we could never have gotten inxi to be as reliable and solid as it's turning out to be. +.SH RUNNING IN IRC CLIENT +To trigger inxi output in your IRC client, pick the appropriate method from the list below: -And of course, locsmif, who figured out a lot of the core methods, logic, and tricks -used in inxi, has to be considered as a primary author as well, even if inxi has been -officially forked from his infobash script. +.TP +.B Xchat, irssi \fR(and many other IRC clients) +.B /exec -o inxi \fR[\fBoptions\fR] -.SH NOTES FOR ALL USERS FOR THE OPTIONS SECTION +If you leave off the -o, only you will see the output on your local IRC client. +.TP +.B Konversation +.B /cmd inxi \fR[\fBoptions\fR] + +To run inxi in konversation as a native script if your distribution or inxi package did not do this for you, +create this symbolic link: + +.B ln -s /usr/local/bin/inxi /usr/share/kde4/apps/konversation/scripts/inxi + +If inxi is somewhere else, change the path /usr/local/bin to wherever it is located. + +Then you can start inxi directly, like this: + +.B /inxi \fR[\fBoptions\fR] +.TP +.B weechat +.B /shell -o inxi \fR[\fBoptions\fR] + +For Weechat to run external scripts like inxi, you have to install shell.py (if you don't already have it). +To install shell.py, run this command inside of weechat: + +.B /weeget install shell.py + +Then to run inxi, you would enter a comand like this: + +.B /shell -o inxi -bx + +If you leave off the -o, only you will see the output on your local weechat. + +.SH PRIVACY AND SECURITY + +In order to maintain basic privacy and security, inxi filters out automatically on IRC things like +your network card mac address, WAN and LAN IP, your /home username directory in partitions, +and a few other things. + +Because inxi is often used on forums for support, you can also trigger this filtering with the -z +option (-Fz, for example). To override the IRC filter, you can use the -Z option. This can be useful +to debug network connection issues online in a private chat, for example. + +.SH USING OPTIONS Options can be combined if they do not conflict. Either group the letters together or separate them. @@ -41,8 +79,7 @@ Letters with numbers can have no gap or a gap at your discretion unless using \f eg .I inxi -AG \fRor\fI inxi -A -G \fRor\fI inxi -c10 - -.SH OPTIONS +.SH STANDARD OPTIONS .TP .B -A @@ -222,7 +259,7 @@ Supported levels: 0-7 Examples :\fI inxi -v 4 \fR or \fI inxi -v4 (names only). Same as: inxi -b .TP .B -v 3 -- Adds advanced CPU (-C), network (-n) data, and switches on -x advanced data option. +- Adds advanced CPU (-C); network (-n) data; triggers -x advanced data option. .TP .B -v 4 - Adds partition size/filled data (-P) for (if present):/, /home, /var/, /boot @@ -233,13 +270,31 @@ Shows full disk data (-D) optical drives. .TP .B -v 6 -- Adds full partition data (-p), unmounted partition data (-o), optical drive data (-d). +- Adds full partition data (-p), unmounted partition data (-o), optical drive data (-d); +triggers -xx extra data option. .TP .B -v 7 -- Adds network IP data (-i); triggers -xx. +- Adds network IP data (-i); triggers -xxx. .TP -.B -x -Show extra data (only works with verbose or line output, not short form): +.B -z +Adds security filters for IP addresses, Mac, and user home directory name. Default on for irc clients. +.TP +.B -Z +Absolute override for output filters. Useful for debugging networking issues in irc for example. + +.SH EXTRA DATA OPTIONS + +These options are for long form only, and can be triggered by one or more -x, like -xx. +Alternately, the -v options trigger them in the following way: +-v 3 adds -x; -v 6 adds -xx; -v 7 adds -xxx + +These extra data triggers can be useful for getting more in-depth data on various options. +Can be added to any long form option list, like: -bxx or -Sxxx + +There are 3 extra data levels: -x; -xx; and -xxx + +The following shows which lines / items get extra information with each extra data level. + .TP .B -x -C - bogomips on Cpu @@ -279,9 +334,6 @@ Show extra data (only works with verbose or line output, not short form): .B -x -t - Adds memory use output to cpu (-xt c), and cpu use to memory (-xt m). .TP -.B -xx -Show extra, extra data (only works with verbose or line output, not short form): -.TP .B -xx -D - Adds disk serial number .TP @@ -306,13 +358,6 @@ Supports most known display managers, like xdm, gdm, kdm, slim, lightdm, or mdm. .B -xxx -S - Adds, if run in X, shell/panel type info to Desktop information, if present. If none, shows nothing. Supports some current desktop extras like gnome-panel, lxde-panel, and others. Added mainly for Mint support. -.TP -.B -z -Adds security filters for IP addresses, Mac, and user home directory name. Default on for irc clients. -.TP -.B -Z -Absolute override for output filters. Useful for debugging networking issues in irc for example. -.TP .SH DEBUGGING OPTIONS .TP @@ -355,46 +400,48 @@ For alternate ftp upload locations: Example: .B -@ 14 - Everything, full data collection - .SH SUPPORTED IRC CLIENTS -.TP -BitchX Gaim/Pidgin ircII Irssi Konversation Kopete KSirc KVIrc Weechat Xchat +BitchX, Gaim/Pidgin, ircII, Irssi, Konversation, Kopete, KSirc, KVIrc, Weechat, and Xchat. Plus any others that +are capable of displaying either built in or external script output. .SH INITIALIZATION FILE .TP inxi will read the following configuration/initialization files in the following order: .TP -/etc/inxi.conf +.B /etc/inxi.conf .TP -$HOME/.inxi/inxi.conf +.B $HOME/.inxi/inxi.conf .TP See wiki pages for more information on how to set these up: .TP .I http://code.google.com/p/inxi/wiki/script_configuration_files .SH BUGS -Please report bugs using the following resources: - -inxi wiki, file an issue report: -.I http://code.google.com/p/inxi/issues/list - -post on inxi developer forums: -.I http://techpatterns.com/forums/forum-32.html - -You can also visit -.I irc.oftc.net channel: #smxi -to post issues. +Please report bugs using the following resources. You may be asked to run the inxi debugger tool which will upload a data dump of all system files for use in debugging inxi. These data dumps are very important since they provide us with all the real system data inxi uses to parse out its report. +.TP +inxi wiki, file an issue report: +.I http://code.google.com/p/inxi/issues/list +.TP +post on inxi developer forums: +.I http://techpatterns.com/forums/forum-32.html +.TP +You can also visit +.I irc.oftc.net channel: #smxi +to post issues. + .SH HOMEPAGE: \fI http://code.google.com/p/inxi -.SH .SH AUTHOR AND CONTRIBUTORS TO CODE +.B inxi +.R is is a fork of locsmif's largely unmaintained yet very clever, infobash script. + Original infobash author and copyright holder: Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif @@ -404,4 +451,17 @@ Further fixes (listed as known): Horst Tritremmel Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch -Man page creator with help from Harald, aus9 +And a special thanks to the nice people at irc.oftc.net channels #linux-smokers-club and #smxi, +who all really have to be considered to be co-developers because of their non-stop enthusiasm +and willingness to provide real time testing and debugging of inxi development. + +Without a wide range of diverse Linux kernel based Free Desktop systems to test on, we could +never have gotten inxi to be as reliable and solid as it's turning out to be. + +And of course, big thanks locsmif, who figured out a lot of the core methods, logic, +and tricks used in inxi. + +Further thanks to the various inxi package maintainers, distro support people, forum +moderators, and others, who contribute ideas, suggestions, and patches. + +This Man page was created by aus9, with help from Harald (aka h2).