Neofetch : Simple system information tool

Core libraries and systems
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

Neofetch : Simple system information tool

#1 Post by Mike Walsh »

Morning, all.

I found this on OMG!Ubuntu earlier yesterday evening.

https://www.omgubuntu.co.uk/2016/11/neo ... m-info-app

It's simply a script, which fetches basic system information about your computer, and I immediately thought it would be an easy way for newbies to be able to give us information about their systems, if and when we request it when trying to help with problems.

It is, as we're all aware, one of the first things we usually want to know....

Available as a .deb file, or a tarball, I've simply turned the tarball into a .pet package. Well, actually I've turned it into two .pet packages. One, you install, then run the single command

Code: Select all

neofetch
...in the terminal.

Code: Select all

neofetch --travis
...will add some extra info.

Here, I have it running in Sakura, in Slacko 560:-


Image


The supplied packages will run in urxvt, since it's the standard terminal in the majority of Pups.

-----------------------------------------

The other one, for absolute beginners to Linux, who don't even know what a terminal is, much less where to find it, or how to use it, adds a Menu Entry. So all they need to do is download the .pet, install it, then go into Menu->Utility, and click on 'Neofetch System Info'.....and the command will then run in the terminal, and display the output.

Hopefully, this might help to make things easier for everybody all round. My thanks to nosystemdthanks, mjmikulcik, dancytron, and one or two others earlier on, for helping to make the 'beginners' package possible with advice about the terminal commands and flags.

------------------------------------------

You can find the .pet packages at my Google Drive a/c. The CLI version for those who know what they're doing is here:-

https://drive.google.com/file/d/1XxhFL3 ... sp=sharing

.....and the 'beginner's' version (with GUI) can be found here:-

https://drive.google.com/file/d/1chE_Kg ... sp=sharing


Enjoy.


Mike. :wink:
Last edited by Mike Walsh on Fri 15 Jun 2018, 15:48, edited 8 times in total.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#2 Post by Sylvander »

neofetch-4.0.2_1-noarch-v2.pet installed and menu entry is working well on my Slacko-5.7.0-pae. :D

Saved the session changes.
Last edited by Sylvander on Wed 13 Jun 2018, 18:00, edited 1 time in total.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#3 Post by bigpup »

I strongly agree with the idea-> give new users something easy to use, to get info about there computer!!!!!!!!

Not too bad a program and thanks for this!!!

However, now you got to tell them how to copy and paste from a terminal. :shock: :roll: :lol: :lol: :lol: :lol: :lol: :lol:

I still get best info by telling them how to find stuff in Pup-Sysinfo.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

Maybe we could make this even better.

There is a configuration file that can control what info is displayed and how it is displayed.
In Puppy, I found it in /root/.config/neofetch/config.conf

Here is the Wiki page with info on how to use this Neofetch config file.
https://github.com/dylanaraps/neofetch/ ... izing-Info
Seems to be a lot of options that could be setup.

A quick play with the config file and I get this now for dispaly of info.
Attachments
capture27694.jpg
(24.76 KiB) Downloaded 802 times
Last edited by bigpup on Wed 13 Jun 2018, 18:16, edited 1 time in total.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#5 Post by Mike Walsh »

Hi, bigpup.
bigpup wrote: strongly agree with the idea-> give new users something easy to use, to get info about there computer!!!!!!!!

Not too bad a program and thanks for this!!!

However, now you got to tell them how to copy and paste from a terminal.
Hell, you can't win 'em all, bigpup. :lol: :lol:
bigpup wrote:Maybe we could make this even better.

There is a configuration file that can control what info is displayed and how it is displayed.
In Puppy, I found it in /root/.config/neofetch/config

Here is the Wiki page with info on how to use this Neofetch config file.
https://github.com/dylanaraps/neofetch/ ... izing-Info
Seems to be a lot of options that could be setup.
Well, that's what we really need. I haven't gone into it in any real detail, yet, but I suspect that .config file won't be there until it's installed, or more commonly after the first run. That's the way it usually works, as I'm sure you're aware yourself.

I'll have a look at the Wiki; see what they say. What would you say are the items which are most commonly requested (because I don't think it's necessarily displaying these by default)?

It could be set up to display those items, then have a ready-configured config file present in the package. I think that would work.

It works for me, the way I have remote apps on my external data partition sym-linked into each Puppy. That includes .config files, so that each Pup is reading the same set of data.

No reason at all why that data can't be present at install time.


Mike. :wink:

darry19662018
Posts: 721
Joined: Sat 31 Mar 2018, 08:01
Location: Rakaia
Contact:

#6 Post by darry19662018 »

Nice one Mike I will make this available for AnitaOS.
Thanks.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#7 Post by bigpup »

What would you say are the items which are most commonly requested (because I don't think it's necessarily displaying these by default)?
This is how I changed the config to display what I think we need. (just modified the top section of the config)
I deleted an entry or deleted the (#) in front of an entry.

Code: Select all

 info "OS" distro
    info "Host" model
    info "Kernel" kernel
    info "Resolution" resolution
    info "WM" wm
    info "Terminal Font" term_font
    info "CPU" cpu
    info "GPU" gpu
    info "Memory" memory

    info "GPU Driver" gpu_driver  # Linux/macOS only
    # info "CPU Usage" cpu_usage
     info "Disk" disk
    #info "Battery" battery
    # info "Font" font
    # info "Song" song
    # info "Local IP" local_ip
    # info "Public IP" public_ip
    # info "Users" users
    # info "Install Date" install_date
    # info "Locale" locale  # This only works on glibc systems.
Notice the items with a (#) are already available by removing the (#)

See my above image.

Other info needed would be very Puppy specific and I do not think this could show that.
How Puppy is installed?
On what device?
How you did the install?
Using a save file or save folder?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#8 Post by Mike Walsh »

Hm. 'Kay...

So; this kinda thing, yes?


Image


Out of curiosity, how did you manage to get it to show the exact Puppy distro? In my experience so far, this thing shows the version of Ubuntu that 'buntu-based Pups are derived from, and for Slackos, it just shows a generic kernel reference.

Having decided what we want to show in the output, it's simple enough to just include a config.conf file at /root/.config/neofetch with the .pet itself. Like that, it's 'pre-set' with the commonly-required information...

According to the Wiki, it's supposed to draw its info from /etc/neofetch/config, in much the same way that for alterations to /root/.jwmrc, you're supposed to edit /etc/xdg/templates/_root_.jwmrc instead (since that's where JWM reads its data from upon a restart of 'X'.) But apparently that's with a 'proper' install...(??!)

If you're happy with that output, I'll rebuild the 'beginners' .pet with that specific config variation included.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#9 Post by Mike Walsh »

darry19662018 wrote:Nice one Mike I will make this available for AnitaOS.
Thanks.
You're very welcome, mate. I daresay it's been around for a while, but it's the first time I've come across it. As far as I'm concerned, the simpler and more fool-proof the better!

Enjoy.


Mike. :wink:

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#10 Post by bigpup »

That output looks good to me.
how did you manage to get it to show the exact Puppy distro?
No idea :?:
It just shows the Puppy version for me.
This is running in Xenialpup64 7.5

Can you tell where it is getting the OS info from?????

Maybe this file :idea:
/etc/os-release

Neofetch is a script file.
Seems to be setup to try and work with different OS.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#11 Post by bigpup »

Figure out if you could get it to show a Puppy logo :idea:
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#12 Post by bigpup »

Found this info about OS info.
[Linux] Neofetch reports inaccurate distro name

It's supposed to be [insert a downstream distro here], but it shows [insert an upstream distro here] instead!

When Neofetch detects a Linux distro it first looks for the lsb_release command before searching for the /etc/os-release file. Since some downstream distros mostly utilize their upstream distro's repositories they'll include the upstream distro's version of lsb_release. The prominent case is with Antergos and Arch with lsb_release installed, Antergos will be detected as "Arch" instead.

When the upstream's version of lsb_release is executed the output will be that of the upstream distro. (Arch output on Antergos and etc). This means that unless the downstream distro supplies their own version of lsb_release in their own repository, the output will be the upstream distro's.

We had deleted support for lsb_release but more complaints came up because it proved to be very useful in detecting a wide number of distros. Almost all distros we officially support provide their own lsb_release package which makes lsb_release output the correct information. See issues/493

So, shouldn't you add an exception rule in cases like these?

A good distro will always provide their own lsb-release file, otherwise they will be practically seen as the upstream distro with fancy modifications.

So, is there any workaround?

Yes, actually. You'd have to remove your lsb-release (or any equivalent) package. (That is, if the distro filled their /etc/*-release properly. Contact your distro's maintainers if they don't).
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#13 Post by Mike Walsh »

bigpup wrote:Figure out if you could get it to show a Puppy logo :idea:
Well.....if you look at the main neofetch script in /usr/bin, starting line 7629, there's the ASCII character picture for Puppy. (The last 3600 lines or so, starting line 5088, with Aix, are all the ASCII 'art' logos...)

Just need to figure out how you get the script to actually show it, and we're in business!

This thing must be fairly recent, 'cos one of the ASCII character 'logos' is for System76's Pop!_OS.....and that was only released late last year, just after 'Artful' was released by Ubuntu.


Mike. :wink:

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#14 Post by Flash »

Mike, could you change the name for the .pet? A newcomer to Puppy will have no idea what "Neofetch" might do when he finds it in the menu. Most of us have learned the hard way not to click on stuff when we have no idea what might happen if we do.

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#15 Post by rg66 »

Mike Walsh wrote:Just need to figure out how you get the script to actually show it, and we're in business!
Line 629 of config: change to > ascii_distro="Puppy"

Edit: Change line 640 to > ascii_colors="Puppy" and image is white.
Attachments
Screenshot.jpg
(65.14 KiB) Downloaded 775 times
Screenshot(1).jpg
(58.2 KiB) Downloaded 768 times
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#16 Post by wiak »

Nice program Mike. I see NeoFetch been around since 2016 (though I didn't know of it till you posted), and now available directly from Ubuntu software Bionic repos using apt-get now (or via ppa for latest release or earlier Ubuntu distros).

Great that it (EDIT:) is usable in Linux, Android, MacOS and Windoze and more besides (since it just depends on bash - though I wonder how it deals with detecting info for such diverse systems - EDIT2: I've now checked the relevant case statements and see how; very informative... and internally contains some great ASCII artwork too).

I love these commandline multi-featured utils since also easy to put a gui frontend on them for those that prefer that.

Fantastic that it's so customisable too, and also interesting that it can take a screenshot of system; there is a lot we can learn from this utility generally.

wiak

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#17 Post by Mike Walsh »

@ wiak:-

Glad you like it! I thought it must have been around for a while, though (like you) I'd never heard of it before. And because it's totally script-based, it's very configurable; you can even add-in custom entries of your own, should you desire.

@rg66:-

Thanks for that, RG. I just haven't really had time to dig through it yet; that's a big help. Cheers. I'll add that into the .config file for the beginner's 'GUI' version, so they see a Puppy logo from the outset.

@ Flash:-
Flash wrote:Mike, could you change the name for the .pet? A newcomer to Puppy will have no idea what "Neofetch" might do when he finds it in the menu. Most of us have learned the hard way not to click on stuff when we have no idea what might happen if we do.
Way ahead of you there. I was having the same thought myself last night, so accordingly I've re-named and re-added the pets to post #1.....and labelled them CLI and GUI to differentiate (along with an added explanation). And the Menu entry clearly states 'Neofetch System Info Tool'.....so you can't make mistakes with it.

I've also added a small YAD GUI 'launcher' to the beginner's version, to make it more 'friendly'...and modded the config file to give the puppy's-head logo, too.


Image


Enjoy.


Mike. :wink:

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#18 Post by Sylvander »

Latest GUI version installed and working as it aught. :D

Oops, spoke too soon.
Tried it a 2nd time, and it doesn't run. :(
I'll reboot and try it again.
Still doesn't run after reboot.

Runs fine in a console window command prompt.

INFO:
a. Prior to installing the new version, I had...
Uninstalled the old version, saved the changes, rebooted, checked in PPM that the uninstall had taken effect.
b. The new installation is listed in the PPM.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#19 Post by Mike Walsh »

Hi, Sylvander.

Oops. I'm a bit embarassed about this. I know exactly what the problem is, and it is my fault.

I take it you're still in Slacko 570?

The crux of the matter is this; certain of the YAD features I've used in putting the wee GUI launcher together are only available with very recent versions of YAD.....basically, from 0.38 onwards. The majority of Pups come with quite an old version; 0.12. (That's like 28 versions out of date!)

It doesn't really matter for the majority of YAD usage in Puppy, because the usual features have been continued into many of the newer versions (indeed, it's backwards-compatible). It's only the last few releases where the developers have really begun to add new features.....one of those being the ability for a YAD dialogue box to 'auto-disappear' upon losing focus.

For this reason, I included a 'generic' version of YAD 0.40 (the latest one) in the new .pet. Trouble is, I can't remember where I grabbed it from.....and YAD, although for the most part will run OK in Pups other than the one where it was compiled, really needs compiling on a per-Pup basis for best compatibility. It seems mainly to be the 5-series Pups that suffer most from this, for some reason. I've been experiencing occasional problems this afternoon, trying to install it throughout my kennels.....and it's the GUI launcher, every time. Running

Code: Select all

yad --version
...in the terminal, instead of giving me the information as it should, it's giving me a load of gibberish. Which in itself indicates something's not right!

It's a piece of cake to compile; a 2-minute job, and so easy even an idiot like me can do it. Smokey gave instructions on how to do it in the very first edition of the Puppy Newsletter, back in Jan '17.

Needless to say, it'll run fine from the terminal, 'cos the Neofetch script, big as it is, seems almost foolproof..... It would have worked for you the first time, due to your habit of always doing manual saves; the 'old' version of YAD would have still been in RAM, of course.

However, to solve your immediate problem, here's a .pet that will give you the latest version of YAD which was compiled in Slacko 570 (I compiled this around 2 months ago):-

https://www.datafilehost.com/d/21d69e2c

It simply replaces /usr/bin/yad with the correct one, that's all. The GUI launcher should then run fine, and launch Neofetch in the terminal.

Let us know if that does the job, please; I'm fairly confident this should 'fix it'. If yes, I'll probably need to re-work the pet. I may just have to re-do the launcher to work with the old version of YAD included with most Pups; a shame, because it won't look so good..!


Mike. :wink:

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#20 Post by bigpup »

Even Xenialpup64 7.5 has only Yad version 27.0

Code: Select all

root# yad --version
0.27.0
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply