Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

inxi .sh a gui info system

Here you can exchange scripts that you created or have permission to share with other users.
Message
Author
User avatar
rokytnji.1
Forum Regular
Forum Regular
Posts: 741
Joined: Sun Apr 13, 2014 9:06 pm

inxi .sh a gui info system

#1 Post by rokytnji.1 » Mon Feb 01, 2016 5:29 pm

All credit goes to https://www.linuxliteos.com/forums/scri ... info-tool/

My setup in MX-14

Code: Select all

harry@scuzbucket:~
$ ls
CHANGELOG.md  Documents               inxi.sh  node_modules  Wallpaper
clr           Downloads               Isos     Pictures
cr          locales  src
Desktop       Images                  Music    Videos
harry@scuzbucket:~
$ ls -l
total 96
-rw-r--r--  1 harry harry 10555 Aug  3 10:36 CHANGELOG.md
-rwxrwxr-x  1 harry harry  4404 Jul 14  2015 clr
-rwxrwxr-x  1 harry harry  4457 Jul 14  2015 cr
drwxr-xr-x  2 harry harry  4096 Mar 23  2015 Desktop
drwxr-xr-x  2 harry harry  4096 Mar 23  2015 Documents
drwxr-xr-x  2 harry harry  4096 Nov  4 15:03 Downloads
drwxr-xr-x  2 harry harry  4096 Jan 21 01:47 Images
-rwxr-xr-x  1 harry harry 13804 Feb  1 14:56 inxi.sh
drwxr-xr-x  5 harry harry  4096 Aug 15 12:41 Isos
drwxr-xr-x  2 harry harry  4096 Aug  3 10:42 locales
drwxr-xr-x  5 harry harry  4096 Jul 14  2015 Music
drwxr-xr-x 39 harry harry  4096 Aug  3 14:55 node_modules
drwxr-xr-x  4 harry harry  4096 Oct  5 22:30 Pictures
drwxr-xr-x  3 harry harry  4096 Aug  3 14:55 src
drwxr-xr-x  3 harry harry  4096 Nov  8 12:12 Videos
drwxr-xr-x  2 harry harry  4096 Jul 14  2015 Wallpaper
what is actually inside of inxi.sh text document script. Edited below because of http://forum.mepiscommunity.org/viewtop ... 68#p379868

Code: Select all

harry@scuzbucket:~
$ cat inxi.sh
#! /bin/bash
#--------------------------------------------------------------------------------------------------------
# Info tool by Misko_2083
#--------------------------------------------------------------------------------------------------------

#inxi installed?
if [ -z "$(which inxi)"  ]; then

	if zenity --title="Question" --question text="Inxi is not installed, do you want to install it?\nIf you choose No program will exit."
	then
		gksudo "sudo apt-get install inxi -y" | zenity --progress --title="Installing inxi" --text="please wait" --pulsate --auto-close
				if [ "${PIPESTATUS[0]}" -ne "0" ]; then
					zenity --error --title="Error" --text="inxi could not be installed."
					exit
				fi
	else
		exit
	fi
fi

disk_df=(FALSE "Fs disk space info" "df -Th | grep /dev/sd" "View filesystem disk space usage")

FDISK=(FALSE "List Partition Tables" "sudo fdisk -l" "List out the partition information (password required)")

BLOCKDEV=(FALSE "Display Block Devices" "lsblk" "List out information of all block devices")

PARTED=(FALSE "List Partition Layout" "sudo parted -l" "List partition layout on all block devices")

lspci_info=(FALSE "PCI info" "lspci -vnn" "View PCI devices info")

lspci_graph=(FALSE "Graphics" "lspci -vnn | grep VGA -A 12" "View graphics devices info")

lsusb_info=(FALSE "USB info" "lsusb" "View usb devices info")

CPU=(FALSE "32/64 bit CPU" "egrep -c ' lm ' /proc/cpuinfo" "Find out is this 32 or 64 bit CPU")

CPUZ=(FALSE "Processor info" "lscpu" "Display detailed info on CPU")

OS=(FALSE "32/64 bit OS" "uname -a" "Find out is this 32 or 64 bit OS")

inxi_full=(FALSE "Full info" "inxi -Fxz" "View system info")

inxi_df=(FALSE "Partition info" "inxi -plu" "View partition info")

REPOS=(FALSE "View Repositories" "inxi -r" "View repositories on this sistem")

GRAPHICS=(FALSE "View Graphics" "inxi -Gxx" "View graphics on this sistem")

AUDIO=(FALSE "View Audio" "inxi -A" "View audio on this sistem")

NETWORK=(FALSE "View Network" "inxi -nz" "View network on this sistem")

NETWORKC=(FALSE "Network Configuration" "ifconfig -a" "View network  configuration on this sistem")

OPENGL=(FALSE "View OpenGL configuration" "glxinfo | grep OpenGL" "View OpenGL configuration on this sistem")

LSB=(FALSE "View lsb release" "lsb_release -dic" "View lsb release info")

ic="/usr/share/icons/zenity-llcc.png"
selection=$(zenity --window-icon="$ic" --list --checklist --width=900 --height=700 --column="Select" --column="Name" --column="Command" \
--column="Description" --text="Select the info tool you wish to use, then click the Display button.\nYou can select multiple tools." --title="Info" --ok-label="Display" --cancel-label="Quit" --separator="\n" \
"${disk_df[@]}" \
"${FDISK[@]}" \
"${BLOCKDEV[@]}" \
"${PARTED[@]}" \
"${lspci_info[@]}" \
"${lspci_graph[@]}" \
"${lsusb_info[@]}" \
"${CPU[@]}" \
"${CPUZ[@]}" \
"${OS[@]}" \
"${inxi_full[@]}" \
"${inxi_df[@]}" \
"${REPOS[@]}" \
"${GRAPHICS[@]}" \
"${AUDIO[@]}" \
"${NETWORK[@]}" \
"${NETWORKC[@]}" \
"${OPENGL[@]}" \
"${LSB[@]}" )

# If Quit is clicked then exit
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
exit 0
fi

# check if anything is selected
echo $selection | grep '[a-zA-Z0-9]'
if [ "${PIPESTATUS[1]}" -ne "0" ]; then
zenity --info --title='Info' --text='Nothing was selected.'
exit 0
fi

echo $selection | grep "^Fs disk space info" > /dev/null
if [ $? = 0 ];then
	SOME_TEXT="df - View file system disk space usage\nYou can select the mount to open in the file manager"
	SOME_TITLE="df"

	df -h -T| tail -n+2 | while read fs type size used rest target; do
		if [[ $rest ]] ; then
			echo "$fs" "$type" "$size"B "$used"B "$rest"B "${target[@]}" |  grep /dev/sd | # remove "grep /dev/sd |" to show all
			awk '{print $1,"\n",$2,"\n",$3,"\n",$4,"\n",$5,"\n",$6}BEGIN{ s = 7; e = 35; }{for (i=s; i<=e; i++) printf("%s%s", $(i), i<e ? OFS : "\n"); }' #Workaround for disk labels that contain whitespaces(number of characters that can be divided by whitespace =e-s)
		fi
	done | sed -e 's/[ \t]*$//' $1|zenity --list --width=685 --height=350 --title="${SOME_TITLE}" --text="${SOME_TEXT}" --column="Device" --column="Type" --column="Size" --column="Used" --column="Free" --column="%Used" --column="Mount" --print-column="7"| cut -d '|' -f2| tee /tmp/tempdf

	#With radiolist is also an option
	#done | sed -e 's/[ \t]*$//' $1| sed 's!^/dev/sd*!FALSE\n/dev/sd!g' | zenity --list --radiolist --width=685 --height=350 --title="${SOME_TITLE}" --text="${SOME_TEXT}" --column="Select" --column="FS" --column="Type" --column="Size" --column="Used" --column="Free" --column="%Used" --column="Mount" --print-column="8"| cut -d '|' -f2| tee /tmp/tempdf


	if [ -z "$(cat /tmp/tempdf)" ]; then
	rm -f /tmp/tempdf
	exit 0
	fi

	xdg-open "$(cat /tmp/tempdf)"
	rm -f /tmp/tempdf
fi

echo $selection | grep "^List Partition Tables$" > /dev/null
if [ $? = 0 ];then
	gksudo --message 'To run this tool your password is required. Enter your password, or press Cancel.' 'sudo fdisk -l' |tee /tmp/fdiskinfo| zenity --title="Partition Tables (sudo fdisk -l)" --text-info --width=800 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/fdiskinfo.txt)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Partition_Tables.txt" --title="Save List of the Partition Tables")")
		echo -n "$zNewData" > "$zSavePath"		
	fi
		rm /tmp/fdiskinfo
fi

echo $selection | grep "Display Block Devices" > /dev/null
if [ $? = 0 ];then
	lsblk  |tee /tmp/lsblkinfo | zenity --title="Block Devices (lsblk)" --text-info --width=800 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lsblkinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Block_Devices.txt" --title="Save Block Devices info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/lsblkinfo
fi

echo $selection | grep "^List Partition Layout$" > /dev/null
if [ $? = 0 ];then
	gksudo --message 'To run this tool your password is required. Enter your password, or press Cancel.' 'sudo parted -l'|tee /tmp/partedinfo | zenity --title="Partition Layout (sudo parted -l)" --text-info --width=800 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/partedinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Partition_layout.txt" --title="Save Partition Layout info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/partedinfo
fi

echo $selection | grep "^PCI info$" > /dev/null
if [ $? = 0 ];then
	lspci -vnn | tee /tmp/lspciinfo | zenity --title="PCI info (lspci -vnn)" --text-info --width=800 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lspciinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="PCI_Devices.txt" --title="Save PCI Devices info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/lspciinfo
fi

echo $selection | grep "^Graphics$" > /dev/null
if [ $? = 0 ];then
	lspci -vnn | grep VGA -A 12 | tee /tmp/lspcigraph| zenity --title="Graphics (lspci -vnn | grep VGA -A 12)" --text-info --width=800 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[3]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lspcigraph)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Graphics_info.txt" --title="Save Graphics info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/lspcigraph
fi

echo $selection | grep "USB info" > /dev/null
if [ $? = 0 ];then
	lsusb | tee /tmp/lsusbinfo | zenity --title="USB info (lsusb)" --text-info --width=800 --height=400 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lsusbinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="USB_info.txt" --title="Save USB info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/lsusbinfo
fi

echo $selection | grep "32/64 bit CPU" > /dev/null
if [ $? = 0 ];then
	if [ "$(egrep -c ' lm ' /proc/cpuinfo)" -lt "1" ]; then
		bus_zen="32"
	else
		bus_zen="64"
	fi
		zenity --title="32/64 bit CPU" --info --text="This is $bus_zen bit CPU"
fi


echo $selection | grep "Processor info" > /dev/null
if [ $? = 0 ];then
	lscpu | tee /tmp/processorinfo | zenity --title="Processor info (lscpu)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/processorinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="CPU_info.txt" --title="Save Processor info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/processorinfo
fi

echo $selection | grep "32/64 bit OS" > /dev/null
if [ $? = 0 ];then
	if [ "$(uname -a | egrep -c 'i386|i486|i586|i686')" -eq "1" ]; then
		os_zen="32"
	else
		os_zen="64"
	fi
		zenity --title="32/64 bit OS" --info --text="This is $os_zen bit OS"
fi

echo $selection | grep "Full info" > /dev/null
if [ $? = 0 ];then
	inxi -Fxz -c 0 | tee /tmp/inxifull | zenity --title="Full info (inxi -Fxz)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/inxifull)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Full_info.txt" --title="Save Full Computer info")")
		echo -n "$zNewData" > "$zSavePath"
	
	fi
		rm /tmp/inxifull
fi

echo $selection | grep "Partition info" > /dev/null
if [ $? = 0 ];then
	inxi -plu -c 0 | tee /tmp/partitionsinfo| zenity --title="Partition info (inxi -plu)" --text-info --width=650 --height=400 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/partitionsinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Partition_info.txt" --title="Save Partition info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/partitionsinfo
fi

echo $selection | grep "View Repositories" > /dev/null
if [ $? = 0 ];then
	inxi -r -c 0 | tee /tmp/repositorieslist | zenity --title="Repositories (inxi -r)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/repositorieslist)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Repositories.txt" --title="Save List Of The Repositories")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/repositorieslist
fi

echo $selection | grep "View Graphics" > /dev/null
if [ $? = 0 ];then
	inxi -Gxx -c 0 | tee /tmp/graphicsinfo | zenity --title="Graphics info (inxi -Gxx)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/graphicsinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Graphics_inxi.txt" --title="Save Graphic information (inxi)")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/graphicsinfo
fi

echo $selection | grep "View Audio" > /dev/null
if [ $? = 0 ];then
	inxi -A -c 0 | tee /tmp/audioinfo | zenity --title="Audio info (inxi -A)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/audioinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Audio_info.txt" --title="Save Audio information (inxi)")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/audioinfo
fi

echo $selection | grep "^View Network$" > /dev/null
if [ $? = 0 ];then
	inxi -nz -c 0 | tee /tmp/networkinfo | zenity --title="Network info (inxi -nz)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/networkinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Network_inxi.txt" --title="Save Network information (inxi)")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/networkinfo
fi

echo $selection | grep "Network Configuration$" > /dev/null
if [ $? = 0 ];then
	ifconfig -a | tee /tmp/networkconfinfo | zenity --title="Network info (ifconfig -a)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/networkconfinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Network_conf.txt" --title="Save Network Configuration Info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/networkconfinfo
fi

echo $selection | grep "View OpenGL configuration" > /dev/null
if [ $? = 0 ];then
	glxinfo | grep OpenGL | tee /tmp/openglinfo | zenity --title="View OpenGL configuration (glxinfo | grep OpenGL)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[3]}" -ne "1" ]; then
		zNewData=$(cat /tmp/openglinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="OpenGL_info.txt" --title="Save OpenGL Info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/openglinfo
fi

echo $selection | grep "View lsb release" > /dev/null
if [ $? = 0 ];then
	lsb_release -dic| tee /tmp/lsbinfo | zenity --title="View lsb release (lsb_release -dic)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lsbinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Network_conf.txt" --title="Save ls_ release Info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		
My extra install install of zenity to make this all work.

Code: Select all

$ apt-cache policy zenity
zenity:
  Installed: 3.4.0-2
  Candidate: 3.4.0-2
  Version table:
 *** 3.4.0-2 0
        500 http://ftp.us.debian.org/debian/ wheezy/main i386 Packages
        100 /var/lib/dpkg/status
My computer w3ith MX-14 on it

Code: Select all

harry@scuzbucket:~
$ inxi -Fxz
System:    Host: scuzbucket Kernel: 3.14-0.bpo.2-686-pae i686 (32 bit gcc: 4.6.3)
           Desktop: Xfce 4.12.2 (Gtk 2.24.10)
           Distro: MX-14.4-pae Symbiosis 22 March 2015
Machine:   System: LENOVO product: 6075BHU v: ThinkCentre M57
           Mobo: LENOVO model: LENOVO
           Bios: LENOVO v: 2RKT41AUS date: 03/20/2008
CPU:       Dual core Intel Pentium Dual E2160 (-MCP-) cache: 1024 KB
           flags: (lm nx pae sse sse2 sse3 ssse3) bmips: 7182
           clock speeds: max: 1800 MHz 1: 1200 MHz 2: 1200 MHz
Graphics:  Card: NVIDIA G86 [Quadro NVS 290] bus-ID: 01:00.0
           Display Server: X.Org 1.12.4 drivers: nouveau (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.0hz
           GLX Renderer: Gallium 0.4 on NV86
           GLX Version: 2.1 Mesa 8.0.5 Direct Rendering: Yes
Audio:     Card Intel 82801I (ICH9 Family) HD Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k3.14-0.bpo.2-686-pae
Network:   Card: Intel 82566DM-2 Gigabit Network Connection
           driver: e1000e v: 2.3.2-k port: 1820 bus-ID: 00:19.0
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 320.1GB (7.8% used)
           ID-1: /dev/sda model: WDC_WD3200AAKS size: 320.1GB
Partition: ID-1: / size: 51G used: 20G (41%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
Sensors:   System Temperatures: cpu: 47.0C mobo: N/A gpu: 73.0
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 132 Uptime: 7:02 Memory: 386.9/3760.8MB
           Init: SysVinit runlevel: 5 Gcc sys: 4.7.2
           Client: Shell (bash 4.2.371) inxi: 2.2.19 
harry@scuzbucket:~
$ 

zenity does not come installed by default in MX-14
so I installed it 1st. Made a new file in /home/harry and named it inxi.sh and put what I posted in above code tags in it. Made my inxi.sh text file executable.
Made a launcher in taskbar

Image

What my finished setup looks like after I am done.

Image
Last edited by rokytnji.1 on Tue Feb 02, 2016 10:34 am, edited 2 times in total.

User avatar
richb
Administrator
Posts: 16968
Joined: Wed Jul 12, 2006 2:17 pm

Re: inxi .sh a gui info system

#2 Post by richb » Mon Feb 01, 2016 5:32 pm

Cool!
Forum Rules
Guide - How to Ask for Help

Rich
SSD Production: MX 17.1
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB, 350 GB HD

User avatar
KernSpy
Forum Regular
Forum Regular
Posts: 555
Joined: Wed Nov 05, 2014 10:09 pm

Re: inxi .sh a gui info system

#3 Post by KernSpy » Tue Feb 02, 2016 1:39 am

richb wrote:Cool!
Yes, Very!
Acer Aspire M3800, Intel Pentium dual-core E6600, Intel 4 Series Graphics, Intel Audio, 4 GB Ram, XFCE 4, MX15 Fusion. Lenovo G560 Laptop - 4G Ram, Dual-Pentium, MX15 Fusion.

User avatar
KernSpy
Forum Regular
Forum Regular
Posts: 555
Joined: Wed Nov 05, 2014 10:09 pm

Re: inxi .sh a gui info system

#4 Post by KernSpy » Tue Feb 02, 2016 8:22 am

Hello Rok,

What theme is that you are using? Its nice!

Well, I got it working ... (mostly :laugh:)

I think things have changed a fair amount xfce
on mx14 / mx15. I've bben having a heck of a time
getting a working launcher.

I've attached the script and I'll post pics of the
panels running.

First I installed zenity.

Code: Select all

$ apt-cache policy zenity
zenity:
Installed: 3.14.0-1
Candidate: 3.14.0-1
Version table:
*** 3.14.0-1 0
500 http://ftp.us.debian.org/debian/ jessie/main amd64   Packages
100 /var/lib/dpkg/status

I created a folder in my home directory and named it
bin. I renamed inxi.sh to xi.sh and placed in that
folder.

Typed ./xi.sh into a terminal and it runs, but I
get errors / warnings in the terminal. See below:

$ ./xi.sh
** (zenity:12584): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
./xi.sh: line 81: FALSE: command not found


I tried absolute paths in the launcher and
it still gives an error and doesn't launch.

Launcher error:
Image

I did chmod +x /home/kernspy/bin/xi.sh
and also sudo chmod +x /home/kernspy/bin/xi.sh
I right clicked the desktop and selected
"create launcher" Something has changed since
mx14, because I know I used to create launchers
fairly easily. Something is different now in
mx15. I don't know? :bagoverhead:

Anyway ..

Image

Image


Kern...
Acer Aspire M3800, Intel Pentium dual-core E6600, Intel 4 Series Graphics, Intel Audio, 4 GB Ram, XFCE 4, MX15 Fusion. Lenovo G560 Laptop - 4G Ram, Dual-Pentium, MX15 Fusion.

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22205
Joined: Wed Jul 19, 2006 6:13 am

Re: inxi .sh a gui info system

#5 Post by Jerry3904 » Tue Feb 02, 2016 9:37 am

We have yad installed by default, so rather than install 4 MB of additional files I just replaced all 42 "zenity" instances with "yad."

But when I tried to run the script to test that, I got an error message for line 21, saying there was an unexpected "(". It doesn't sound like you two got that, so I am wondering what I did wrong. I see that syntax comes up a lot at the beginning:

<term>=(FALSE ...
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
kmathern
Forum Veteran
Forum Veteran
Posts: 9298
Joined: Wed Jul 12, 2006 2:26 pm

Re: inxi .sh a gui info system

#6 Post by kmathern » Tue Feb 02, 2016 9:54 am

rokytnji.1 wrote:

Code: Select all

echo $selection | grep "View lsb release" > /dev/null
if [ $? = 0 ];then
	lsb_release -dic| tee /tmp/lsbinfo | zenity --title="View lsb release (lsb_release -dic)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lsbinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Network_conf.txt" --title="Save ls_ release Info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/lsbinfoharry@scuzbucket:~
There's a minor error near the end of the script, it should look like what's shown below (got rid of the "harry@scuzbucket:~" and added a "fi") :

Code: Select all

echo $selection | grep "View lsb release" > /dev/null
if [ $? = 0 ];then
	lsb_release -dic| tee /tmp/lsbinfo | zenity --title="View lsb release (lsb_release -dic)" --text-info --width=850 --height=600 --ok-label="Save" --cancel-label="Close"
	if [ "${PIPESTATUS[2]}" -ne "1" ]; then
		zNewData=$(cat /tmp/lsbinfo)
		zSavePath=$(echo -n "$(zenity --file-selection --save --confirm-overwrite --filename="Network_conf.txt" --title="Save ls_ release Info")")
		echo -n "$zNewData" > "$zSavePath"
	fi
		rm /tmp/lsbinfo
fi
Jerry3904 wrote:We have yad installed by default, so rather than install 4 MB of additional files I just replaced all 42 "zenity" instances with "yad."

But when I tried to run the script to test that, I got an error message for line 21, saying there was an unexpected "(". It doesn't sound like you two got that, so I am wondering what I did wrong. I see that syntax comes up a lot at the beginning:

<term>=(FALSE ...
If you fix the error I noted above, this sed command will convert it to use yad.

Code: Select all

sed -i 's/zenity/yad/g; s/--ok-label="Save"/--button Save:0/g; s/--cancel-label="Close"/--button gtk-cancel:1/g' inxi-gui #(or path to inxi-gui if not in the same directory)
Here's a dropbox link with the first error fixed and converted to yad: https://dl.dropboxusercontent.com/u/18456966/inxi-gui

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22205
Joined: Wed Jul 19, 2006 6:13 am

Re: inxi .sh a gui info system

#7 Post by Jerry3904 » Tue Feb 02, 2016 10:18 am

1) That works
2) It would be better IMO if the script did not close after displaying one item, but returned to the index screen again
3) Index screen says "Click on the Display button," but the button carries the label "OK". So I changed line 61
--column="Description" --text="Select the info tool you wish to use, then click the OK button.\nYou can select multiple tools." --title="Info" --ok-label="Display" --cancel-label="Quit" --separator="\n" \
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
rokytnji.1
Forum Regular
Forum Regular
Posts: 741
Joined: Sun Apr 13, 2014 9:06 pm

Re: inxi .sh a gui info system

#8 Post by rokytnji.1 » Tue Feb 02, 2016 10:20 am

There's a minor error near the end of the script, it should look like what's shown below (got rid of the "harry@scuzbucket:~" and added a "fi") :
Sorry about that. I will edit my post accordingly. On my launcher. I have no desktop launchers. I made mine on the taskbar.
My launchers are like one launcher with a drop down arrow next to it. Then I add mutiple launchers to that one launcher section.

I thought my screenshot showed that. Since you asked, My theme is

http://xfce-look.org/content/show.php/?content=159696

User avatar
kmathern
Forum Veteran
Forum Veteran
Posts: 9298
Joined: Wed Jul 12, 2006 2:26 pm

Re: inxi .sh a gui info system

#9 Post by kmathern » Tue Feb 02, 2016 10:39 am

Jerry3904 wrote:2) It would be better IMO if the script did not close after displaying one item, but returned to the index screen again
Yeah, I would kind of like to have it do that too.

I wonder those items could be changed to functions, have the main script call a function and then return to the index screen when it's done.

Maybe also make the index a radiolist where you can only select one item at a time.

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22205
Joined: Wed Jul 19, 2006 6:13 am

Re: inxi .sh a gui info system

#10 Post by Jerry3904 » Tue Feb 02, 2016 10:45 am

That might work: the display in yad is nothing special.

Got wondering (while avoiding work I don't really want to do) whether I would actually use this. I decided that its greatest contribution for me is finally indexical: all the commands are laid out for easy selection.

I will probably create a desktop file for it so it shows in the menu and is easy to add as a launcher: Adrian's MX Menu Editor makes that very easy.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

Post Reply

Return to “Scripts”