eepykate / fet.sh

🐢 a fetch written in posix shell without any external commands (sponsored by https://git.io/kiwmi)
https://github.com/buffet/kiwmi
ISC License
366 stars 22 forks source link

host says 'System Product Name' instead of my motherboard model #24

Closed sylvesterroos closed 3 years ago

sylvesterroos commented 3 years ago

I'm not sure what kind of info you would like from me to fix this, but I'll paste a screenshot of the output

image

eepykate commented 3 years ago

Lets just say I'm not surprised you're on manjaro...

Can you share the contents of /etc/hostname and /proc/sys/kernel/hostname (this is what fet.sh reads)

sylvesterroos commented 3 years ago

I already tried those, and they both show the correct name, 'icarus'.

Also I'm not sure the slight towards me was necessary. I have only used Linux for a couple of months and I'm still learning the ins and outs :(

eepykate commented 3 years ago

Nah, it wasn't meant to be against you, but against manjaro. Manjaro has lots of weird issues.
Damn, now I feel bad :pensive:

eepykate commented 3 years ago

Also I had just woken up, I didn't really look at the screenshot much,
The hostname is correct, as shown in the first line (sylvester@icarus)
the 'host' is like the device model, or in my case, my desktop's motherboard model.

sylvesterroos commented 3 years ago

Nah, it wasn't meant to be against you, but against manjaro. Manjaro has lots of weird issues. ~Damn, now I feel bad pensive~

It's fine :smile: Is there something I can do on my end to fix this?

Edit: I'm not brand new to linux, but Im still trying to learn all the little intricate parts. Stuff like hostname etc is not new to me

eepykate commented 3 years ago

I'm not sure to be honest. This is read from /sys/devices/virtual/dmi/id/product_name, and I'm not sure if it can be changed on the user's end, at least not easily.

sylvesterroos commented 3 years ago

Forgive my brainfart. For some reason I assumed that in your script 'host' meant hostname. Running cat on /sys/devices/virtual/dmi/id/product_name returns 'System Product Name'. I'm going to look around and see if I can fix this somehow

eepykate commented 3 years ago

On laptops it's usually the laptop model btw.
And that's an understandable mistake, don't worry.

sylvesterroos commented 3 years ago

I suppose it doesn't really matter. I'll just alias it out. I tried manually changing it with vim but it seems the file is protected

eepykate commented 3 years ago

The file is not an actual file, per se, it's written by the kernel, kind of like /proc.

eepykate commented 3 years ago

One more thing, can you check whether these commands work? Just to see if a command is able to get the info properly, because if so I might try look elsewhere for how to get the model.

sudo dmidecode -s baseboard-product-name
sudo dmidecode -s system-product-name

image

sylvesterroos commented 3 years ago

One of them did in fact work!

image

eepykate commented 3 years ago

Well, that is promising. So does /sys/devices/virtual/dmi/id/board_name have the correct name?

On Tue, Oct 13, 2020 at 6:48 AM Pistrie notifications@github.com wrote:

One of them did in fact work!

[image: image] https://user-images.githubusercontent.com/39904003/95789048-12581400-0cdd-11eb-94df-6d628b280a83.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/6gk/fet.sh/issues/24#issuecomment-707338477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJTNVSU63WGUWKRG4AUJWTTSKNTTXANCNFSM4SM6MZHA .

sylvesterroos commented 3 years ago

It does

eepykate commented 3 years ago

In that case, I just pushed a few new commits, can you check if it works now?

sylvesterroos commented 3 years ago

Works like a charm!

image