Page 1 of 2

inxi suggestion

Posted: Fri Feb 22, 2019 1:00 am
by jaymot
MX Linux 18 comes with a shell script that runs inxi -Fxrz and copies the results to the clipboard for you, making it easier to provide system information when requesting support as people don't have to memorize the Inxi command line switches. MX has it included as a menu item. Can I suggest that Mint do something similar?

(I had to add spaces to the code tags that are inside the script so it wouldn't mess up my post's formatting here in the forum. You'll need to remove those if you want to run the script.)

Code: Select all

#!/bin/bash

##/local/bin/quick-system-info-mx
##wrapper script for inxi to do quick "inxi -F" and copy report to clipboard
##part of mx-goodies package

#requires xsel package

##locale stuff

TEXTDOMAINDIR=/usr/share/locale/ 
export TEXTDOMAIN="mx-goodies"

#setup

main(){

    #check for existing of inxi

    command -v inxi  >/dev/null  2>/dev/null || quit_error $"Required inxi app not found"

    run_report

    quit

}

run_report(){

    bash -c '( echo "[ code ]"; inxi -Fxrz  -c0 ; echo "[ /code ]" 2>/dev/null ) | xsel -ib 2>/dev/null &'
    echo
    bash -c 'inxi -Fxrz 2>/dev/null'
    echo
    echo $"Report copied to system clipboard"

}

quit(){
    echo
    read -n 1 -s -r -p $"Press any key to close"
    exit 0
}

quit_error(){
    local msg
    msg=$1
    echo "$msg"
    exit 1
}

main "$@"

Re: Inxi suggestion

Posted: Fri Feb 22, 2019 1:08 am
by philotux
+1

PS. Perhaps better in Suggestions & New Ideas section

Re: Inxi suggestion

Posted: Fri Feb 22, 2019 1:10 am
by jaymot
You're right. I didn't see that when I was looking for where to post. Mods, can you move this for me? Thanks.

Re: Inxi suggestion

Posted: Fri Feb 22, 2019 2:09 am
by Moem
Sure, it's done!

Re: inxi suggestion

Posted: Fri Feb 22, 2019 8:12 am
by karlchen
jaymot wrote:
Fri Feb 22, 2019 1:00 am
MX Linux 18 comes with a shell script that runs inxi -Fxrz and copies the results to the clipboard for you, making it easier to provide system information when requesting support as people don't have to memorize the Inxi command line switches.
Nothing wrong with your suggestion. :)
Yet, users, who are asked to post an inxi report, never have to memorize anything in this forum, because we will always give them the exact inxi commandline, which we want them to run, like e.g.:
  • inxi -Fxz
  • inxi -Fxzr
  • inxi -Sx3
  • inxi -Sr
So all that users have to be able to do is using copy and paste correctly.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 5:30 am
by jaymot
That's fine for those times when you need a user to run Inxi with particular command-line switches so it will gather particular data that you need to help them with their particular problem (particular particular particular! :D ) but for getting just the basic information about their system when people post seeking help, Mint's forum's workflow goes like this:

Me: "I can't make such-and-such work."
(Hours later as I'm in a different time zone than most of you)
You: "Please run Inxi -Fxzr in a console window and copy/paste the results."
(The next day: I have to sleep sometime)
Me: "Here you go."
(Hours later again)
You: "Try this, and next time please wrap yout Inxi info inside of code tags."

vs.

(Mint's forum has a notice at the top of every help board to please run System Information in the menu and include its results when asking for help)
Me: (Reads the notice, runs System Information from the menu then posts)
Me: "I can't make such-and-such work. Here's my system info." (pastes from the clipboard)
{Hours later)
You: "Try this."

See how much faster that is? It saves people a lot of time in fixing their problems (in my case next day vs. same day), and people don't have to remember the -Fxzr switches nor how to copy from within the terminal (shift+ctl+c instead of just ctl+c.) You'll get more people posting basic system info when they first ask for help if you make it easier for them to do so, and that saves your time as well as opposed to having to ask them for that information each and every time then wait for them to provide it. Also you may be dealing with someone who's grown up using a GUI OS and has never used a command-line in his life. That would add even more back-and-forth turnaround time before you can begin to help them if you first have to explain what a console is and how to run commands and copy the results within it, then paste it in their post inside BBcode's code tags. You may as well make Mint more newbie-friendly and help folks out by just giving them a singe menu item to click instead of giving them arcane commands to type, copy and paste, at least to get the basic initial Inxi -Fxzr information about their system from them. From what I've seen here in the forum, most of the time that's all the information that's required anyway and you can always ask them to do other Inxi commands in those few, special situations where it's needed.

(I can't remember how many times I've had to search this forum for "Inxi" to get those command-line switches prior to posting for help or advice here. How nice it would be to just click the Mint icon/System/System Information then just do a ctl+c in my post and have my info be pasted there, already pre-wrapped inside of code tags! It's just a little thing but it would make getting help with Mint easier and would add a bit of polish and user-friendliness to the distro, Little touches like this are what make distros more popular (or less popular), everything else being equal.)

Re: inxi suggestion

Posted: Sat Feb 23, 2019 5:48 am
by Moem
jaymot wrote:
Sat Feb 23, 2019 5:30 am
(Mint's forum has a notice at the top of every help board to please run System Information in the menu and include its results when asking for help)
Me: (Reads the notice, runs System Information from the menu then posts)
So riddle me this: if many, many people now do not read viewtopic.php?f=17&t=83444 which gives inxi -Fxz, even though it's linked from the top of every help board, why would they suddenly start reading this notice and acting upon it?

I think your idea is fine. But I may have less faith in people's ability and willingness to help us help them.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 5:53 am
by gm10
It's not a bad idea but aside from what Moem said, I think it's also not a bad idea to see if a user can figure out how to type a command into a terminal and copy & paste, because the help response he'll get here will in most cases require the same skill set at a minimum.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 6:31 am
by lsemmens
Thanks for stating the OBVIOUS Moem, Unfortunately, even if you slap people across the face with the OBVIOUS they still will not notice it. Your suggestion, jaymot, would have merit but for the OBVIOUS, which Moem has already stated.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 6:42 am
by jaymot
Oh well, it was just a suggestion. Take it or leave it, I don't mind either way. :)

Re: inxi suggestion

Posted: Sat Feb 23, 2019 6:53 am
by karlchen
Hi, jaymot.

Please, be assured that none of us, who replied, objects to having the pre-fabricated inxi commandline in the [Mint] menu. :) Only based on our experience, we are less optimistic than you that the positive effect will be very noticeable.
Anyway, we will only learn in case the Mint makers should decide to implement the suggested inxi report into the application menu.
Here is my "thumb up" for your suggestion. :)

Best regards,
Karl

Re: inxi suggestion

Posted: Sat Feb 23, 2019 6:59 am
by Moem
And here's mine:
thumbsup150.jpg
thumbsup150.jpg (14.4 KiB) Viewed 695 times

Re: inxi suggestion

Posted: Sat Feb 23, 2019 8:04 am
by gm10
karlchen wrote:
Sat Feb 23, 2019 6:53 am
Please, be assured that none of us, who replied, objects to having the pre-fabricated inxi commandline in the [Mint] menu. :)
I guess, although I object to the proposed implementation, I think GUI launchers should always produce a GUI, otherwise you risk confusing new users even more. Also we should add code tags automatically because you know the newbies usually don't put them.

How about something simple like this:
INFO=$(inxi -Fxz -c 0)
zenity --title="Linux Mint System Information" --info --text="$INFO" --width=700 --ok-label="Copy to clipboard for forum post" --no-markup
echo -e "[code]\n$INFO\n[/code]"|xsel -ib

(needs the xsel package for the clipboard part)

The script would have to be called minxi for sure. :lol:

edit: The above wouldn't fit well on netbook screens, so for the real thing I wouldn't use zenity.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 8:42 am
by Moem
gm10 wrote:
Sat Feb 23, 2019 8:04 am
I think GUI launchers should always produce a GUI, otherwise you risk confusing new users even more.
I agree. And then we'd still see people struggling because they don't know how to copypaste from a terminal. A GUI complete with a 'copy' button would be nice to have.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 3:34 pm
by Schallaven
I would like to have an option to forward it to a paste bin site. I already see people using "minxi" to paste into the IRC channels directly, and then people get angry at poor mintbot for time outs and we want to avoid this :mrgreen:

Re: inxi suggestion

Posted: Sat Feb 23, 2019 3:39 pm
by MrEen
Schallaven wrote:
Sat Feb 23, 2019 3:34 pm
I would like to have an option to forward it to a paste bin site. I already see people using "minxi" to paste into the IRC channels directly, and then people get angry at poor mintbot for time outs and we want to avoid this :mrgreen:
inxi -Fxz -c 0 | nc termbin.com 9999

Re: inxi suggestion

Posted: Sat Feb 23, 2019 3:43 pm
by Schallaven
MrEen wrote:
Sat Feb 23, 2019 3:39 pm
Schallaven wrote:
Sat Feb 23, 2019 3:34 pm
I would like to have an option to forward it to a paste bin site. I already see people using "minxi" to paste into the IRC channels directly, and then people get angry at poor mintbot for time outs and we want to avoid this :mrgreen:
inxi -Fxz -c 0 | nc termbin.com 9999
Thanks, we are using such commands already in the IRC channels. My post was more about an extra button in "minxi" to avoid the problem that people will just run "minxi" and then paste everything in the channels directly.

Re: inxi suggestion

Posted: Sat Feb 23, 2019 3:55 pm
by MrEen
Gotcha!

Re: inxi suggestion

Posted: Sat Feb 23, 2019 4:14 pm
by gm10
Schallaven wrote:
Sat Feb 23, 2019 3:34 pm
I would like to have an option to forward it to a paste bin site. I already see people using "minxi" to paste into the IRC channels directly, and then people get angry at poor mintbot for time outs and we want to avoid this :mrgreen:
So we doing this then? And the name sticks? Lovely. :lol:

I present minxi:
minxi.png
Get your further suggestions in now (including better labels for the buttons). ;)

edit: screenshot updated with probably final version

Re: inxi suggestion

Posted: Sat Feb 23, 2019 4:18 pm
by Schallaven
How about "Copy for Forum use" and "Copy for Hexchat/IRC use"? The first button could already add the code tags for the forum :mrgreen: