screenFetch icon indicating copy to clipboard operation
screenFetch copied to clipboard

Linux Mint 21.2 Cinnamon DE

Open gregzme17 opened this issue 2 years ago • 4 comments

I'm submitting a ... (check one with "x")

[x] bug report
[ ] new distro request

Bug report

**This DE shows Gnome, but it should display Cinnamon.**
=> search Github for a similar issue or PR before submitting
=> download the latest revision from Github and check if the bug is still present
   -> https://github.com/KittyKatt/screenFetch/raw/master/screenfetch-dev
=> Show us the output of: screenfetch -v

:: Finding distro...found as 'Mint 21.2' :: Finding hostname and user...found as 'pagandegree@PaganMint' :: Finding kernel version...found as 'x86_64 Linux 6.2.0-37-generic' :: Finding current uptime...found as '5h 9m' :: Finding current package count...found as '2817' :: Finding current shell...found as 'bash 5.1.16' :: Finding current resolution(s)...found as '5760x1080' :: Finding desktop environment...found as 'GNOME' :: Finding window manager...found as 'Muffin' :: Finding window manager theme...found as 'Mint-Y-Dark (Mint-Y)' :: Finding GTK2 theme...found as 'Mint-Y-Aqua' :: Finding GTK3 theme...found as 'Mint-Y-Aqua' :: Finding icon theme...found as 'Mint-Y-Sand' :: Finding user font...found as 'Ubuntu 10' :: Finding current CPU...found as 'AMD Ryzen 7 7800X3D 8-Core @ 16x 4.2GHz' :: Finding current disk usage...found as '5.2T / 13T (42%%)' :: Finding current GPU...found as 'Radeon RX 7900 XTX (gfx1100, LLVM 16.0.6, DRM 3.54, 6.2.0-37-generic)' :: Finding current RAM usage...found as '6320MiB / 31794MiB'

New distro request

Distro name:
Homepage:
Distro logo:
Package manager:

Show us the output of
 => lsb_release -sirc
Linuxmint
21.2
victoria
 => cat /etc/os-release
NAME="Linux Mint"
VERSION="21.2 (Victoria)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.2"
VERSION_ID="21.2"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=victoria
UBUNTU_CODENAME=jammy
 => ls -1 /etc/*-release
/etc/lsb-release
/etc/os-release
/etc/upstream-release:
lsb-release

gregzme17 avatar Dec 11 '23 21:12 gregzme17

Confirmed.

Neofetch reports this correctly btw

(I am using arch linux)

screenfetch:

           `/++++++++++++++:           DE: GNOME

neofetch:

          `/+++ooooooooooooo/`           DE: Cinnamon 6.0.4 

Peter0x44 avatar Jan 17 '24 03:01 Peter0x44

another example:

image

3xploiton3 avatar Feb 03 '24 00:02 3xploiton3

I think I figured out what is up here.

I did some investigation into how screenfetch gets this string and determines cinnamon.

The first is checking the output of xprop -root for "_MUFFIN"

                                        else if ($1 ~ /^_MUFFIN/) {
                                                de = "Cinnamon"
                                                exit
                                        }

On my system, this is not present.

Then, it moves on to checking the value of XDG_CURRENT_DESKTOP:

                        if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
                                case "${XDG_CURRENT_DESKTOP,,}" in

Which, in my case is X-Cinnamon, and it gets detected correctly from there

                                        'x-cinnamon')
                                                DE="Cinnamon"
                                                ;;

But the next if statement for the final fallback checks the following:

                        if [ -n "$DE" ]; then
                                # classic fallbacks

Which is a check for "$DE is not empty", which it won't be, because the previous check worked.

Actually, I'm pretty sure the contents of this if statement ALWAYS run, because "$DE" actually gets initialized to "Not Present" Some more of the if statements further down seem to have the same problem.

If I change the condition of this if statement to what was on the previous one:

                if [[ ${DE} == "Not Present" ]]; then

Then screenfetch reports "DE: Cinnamon 6.0.4" as expected I'm not sure why it's like this, but it seems like an oversight, and a pretty simple fix Effectively, the result of the second attempted test to figure the DE is always discarded, due to some bad condition in the if statement.

Peter0x44 avatar Feb 03 '24 15:02 Peter0x44

I would appreciate testing of this change.

Peter0x44 avatar Feb 03 '24 15:02 Peter0x44