hykilpikonna / hyfetch

🏳️‍🌈 🏳️‍⚧️ Neofetch with LGBTQ+ pride flags!
MIT License
1.27k stars 96 forks source link

OS detection as wrong as in neofetch #29

Closed RealFX-Code closed 1 year ago

RealFX-Code commented 1 year ago

Description

The hyfetch OS detection is a bit off, regular ubuntu running KDE gets picked up as Kubuntu, while I'm not running kubuntu.

Hyfetch version

┌[realfx@XXXXXXXXXXXXXX]-(~)
└> hyfetch -V
Version is 1.4.2

Screenshot

https://prnt.sc/wgnCy7CLsxmM

Config file (output for hyfetch --debug

none
GlobalConfig(color_mode='rgb', override_distro=None, debug=True, is_light=False)
{...}
RealFX-Code commented 1 year ago

and the ascii art is different on Kubuntu rather on Ubuntu, so It's unreadable to see what distro i'm using from the logo, as you can't see the logo at all.

hykilpikonna commented 1 year ago

After some digging, it appears that the method to detect ubuntu flavors is kind of simple in neofetch: If a specific DE is used, then it detects the system as the specific flavor.

image

However, do you know if there is anything different between Kubuntu and regular Ubuntu with KDE that we can use to detect?

RealFX-Code commented 1 year ago

After some digging, it appears that the method to detect ubuntu flavors is kind of simple in neofetch: If a specific DE is used, then it detects the system as the specific flavor.

image

However, do you know if there is anything different between Kubuntu and regular Ubuntu with KDE that we can use to detect?

I’m pretty sure that the command: lsb_release -d

will show what flavour of ubuntu you’re running.

and AFAIK there’s no deference between ubuntu and kubuntu.

hykilpikonna commented 1 year ago

I’m pretty sure that the command: lsb_release -d will show what flavour of ubuntu you’re running.

Can you show me the output of lsd_release -d?

and AFAIK there’s no deference between ubuntu and kubuntu.

Okay, that makes sense.

RealFX-Code commented 1 year ago

Can you show me the output of lsd_release -d?

Sure! For me running ubuntu 22.04.01 its:

┌[realfx☮Laptop2]-(~)
└> lsb_release -d
Description:    Ubuntu 22.04.1 LTS
hykilpikonna commented 1 year ago

Sorry for the long delay. Both the lsb_release and os-release information on kubuntu are the same as regular ubuntu.

Here are the release information on a Kubuntu live usb:

image

image

However, it is possible to detect kubuntu with uname -n though, maybe I can change it to use uname instead of the DE environment to detect ubuntu flavors, but I will have to test more ubuntu flavors to make sure that all of them label uname info in the same way.

image

EnterTheVoid-x86 commented 1 year ago

Using uname -n would not work at all as anyone can change their hostname.

hykilpikonna commented 1 year ago

Using uname -n would not work at all as anyone can change their hostname.

oops just realized that uname -n is the hostname 🤦🏼‍♀️ Yea then it's really impossible to identify Kubuntu from regular ubuntu with KDE.

EnterTheVoid-x86 commented 10 months ago

I have an idea on how we could make this work.

Check if a package like kubuntu-desktop or ubuntu-unity-desktop is installed. If so, display the OS as such.