topic title: gui for inxi script
Posts: 1,062
Dave
Joined: 20 Jan 2010
#1
made a little gui for the inxi script using zenity and roxterm, may be an nice thing to have in the contol center for newer antix users. Place script in /usr/local/bin or similar folder.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://daveserver.homelinux.com/antiX/inxi-gui.sh"
linktext was:"inxi-gui.sh"
====================================
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#2
Will check out later after my eyeballs quite rolling. __{{emoticon}}__
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#3
Nice idea, but roxterm fails to open with error"the new terminal's command failed to run"

I have this when opening inxi from the menu or keys in a terminal. It just won't open for some reason.
Posts: 1,062
Dave
Joined: 20 Jan 2010
#4
It did the same to me when I put the command like roxterm -e"command -c" but I thought I fixed this by doing roxterm -e command -c. It seams to work just fine on my end? I know that it works with xterm, but you cannot copy out of xterm and lxterminal but that is not a default to antix. I will try to find another way to make it work, I think it is mostly because of a preference thing in roxterm. Are you using the default profile / preferences?
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#5
Yes, I think so.
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#6
Same issue running xterm instead of roxterm
Posts: 1,062
Dave
Joined: 20 Jan 2010
#7
That seems odd, xterm worked flawlessly, roxterm was questionable. Tried on three different machines here, One running m8.0 another running m8.5 and m11 live usb on 3 machines, all of them have worked. Not sure what may be happening, could you try downloading lxterminal and running ( lxterminal -e"inxi -F" )
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#8
lxterminal -e"inxi -F" shows the info, but immediately closes.
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#9
Davo over at MEPIS forums prodided the solution.

Either of these should work
roxterm -e bash -c 'inxi ; bash'
or
xterm -fg White -bg Black -e"inxi ; bash"


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://forum.mepiscommunity.org/viewtopic.php?f=8&t=29180&p=256767#p256767"
linktext was:"http://forum.mepiscommunity.org/viewtop ... 67#p256767"
====================================
Posts: 1,062
Dave
Joined: 20 Jan 2010
#10
ok thanks was just reading through the roxterm forum, changed the script, maybe it works more reliably now.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://daveserver.homelinux.com/antiX/inxi-gui.sh"
linktext was:"inxi-gui.sh"
====================================
Posts: 1,062
Dave
Joined: 20 Jan 2010
#11
@anti,

changed the script to work as"inxi-gui" instead of"inxi-gui.sh", changed all the titles to say"system information" instead of"PC information", took another look over it and cleaned it up, as well as added a comment saying you need the root password to nic and ip address. Hope that it will work and fit better now.


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://daveserver.homelinux.com/antiX/inxi-gui.tar.gz"
linktext was:"inxi-gui"
====================================
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#12
I downloaded inxi-gui Dave and made a menu launcher in Icewm.

Code: Select all

prog"Inxi" gksu /usr/local/bin/inxi-gui
launches OK. Terminal window takes up the whole screen on my EEEpc 701SD (small screen) . I can close it from menu bar so no big deal. I also notice the Ctrl+c t exit command also (haven't tried it yet)

Noticed when I pick repository option. It asks if I wish to edit repositories, If I pick no. It closes the terminal. If I pick yes, it opens Geany /etc/apt/sources.list. If I close geany. It closes terminal. Is this normal behavior?



@Anti. I have had trouble with my DVDRW on My Desktop burning coasters of AntiX 11 Pt1 . So that is why I haven't been able to test yet on wireless IBM Desktop M41 motorcycle shop rig yet. Might have it sorted in a couple of days though. Been real busy (besides the hang over) .
anticapitalista
Posts: 5,956
Site Admin
Joined: 11 Sep 2007
#13
Great work Dave.

A couple of comments.
As antiX-base doesn't come with geany, how about replacing it with the lighter and faster editor leafpad?
Make the width less ie around 300 (if we remove the Needs Root Password bit) or 320 with it.
When using live and having to give the root password the first time for repositories, users have to be quick as the window closes.

How about:

Code: Select all

# Function for repositories
function g {
        echo""
        echo"################### PC INFORMATION - repositories #####################"
        echo"###################### Press CTRL  + C to exit ########################" 
        echo""
        inxi -r 
        sleep 1 && zenity --question --title"Edit?" --text"Edit Repositories?"
        if [ $? = 0 ] ; then
        gksu"leafpad /etc/apt/sources.list" &
                sleep 5
        else 
        inxi-gui &
        fi
                kill urxvtc
        sleep 10000
        }
Posts: 1,062
Dave
Joined: 20 Jan 2010
#14
@ rokytnji

yes that is normal behavior, I made the script open full screen, on every computer, so that for small / low resolution screens like yours the output would have the least amount of word wrapping. I found it hard to read when the lines wrap around.

took out the line to make it automatically close when opening /etc/apt/sources.list, yet left the automatic close of roxterm if you choose cancel, so that is normal.

@ anti
testing the script in 8.5, I will start using 11. It sounds like that it continues to run the script even while the first line did not finish. I found that adding the & at the end of the line does this, but a line with no & should make it wait till the app is closed or finished executing. I guess that has changed in m11, seems as though it is running all the lines without waiting, killing the roxterm session and in the process killing leafpad.

Took out the automatic kill of roxterm, will need to close it manually when editing /etc/apt/source.list.

changed the width to 315, took out the needs root password but a width of 300 kills the title bar.