Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Mint 21.2 Cinnamon DE #782

Open
gregzme17 opened this issue Dec 11, 2023 · 4 comments
Open

Linux Mint 21.2 Cinnamon DE #782

gregzme17 opened this issue Dec 11, 2023 · 4 comments

Comments

@gregzme17
Copy link

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
@Peter0x44
Copy link

Peter0x44 commented Jan 17, 2024

Confirmed.

Neofetch reports this correctly btw

(I am using arch linux)

screenfetch:

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

neofetch:

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

@3xploiton3
Copy link

another example:

image

@Peter0x44
Copy link

Peter0x44 commented Feb 3, 2024

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 added a commit to Peter0x44/screenFetch that referenced this issue Feb 3, 2024
incorrect DE detection

There are two instances of the condition:
if [ -n "$DE" ]; then

I think if statements with this condition were ALWAYS running, because
at the beginning of detectde () $DE gets initialized to "Not Present".

if [[ -z "$DE" || "$DE" = "Not Present" ]]; then

There was one instance of this, which I believe is supposed to have a
"==" vs "=". The first part of the condition is also NEVER false, since
$DE gets initialized to "Not Present", as mentioned before, so I just
removed it.

Fixes KittyKatt#782 (and possibly others)
Peter0x44 added a commit to Peter0x44/screenFetch that referenced this issue Feb 3, 2024
There are two instances of the condition:
if [ -n "$DE" ]; then

I think if statements with this condition were ALWAYS running, because
at the beginning of detectde () $DE gets initialized to "Not Present".

if [[ -z "$DE" || "$DE" = "Not Present" ]]; then

There was one instance of this, which I believe is supposed to have a
"==" vs "=". The first part of the condition is also NEVER false, since
$DE gets initialized to "Not Present", as mentioned before, so I just
removed it.

Fixes KittyKatt#782 (and possibly others)
@Peter0x44
Copy link

I would appreciate testing of this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants