Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Running Gnome-related services can cause Neofetch to incorrectly detect WM as Gnome/mutter #2298

Closed
1 task done
josteink opened this issue Feb 21, 2023 · 2 comments
Closed
1 task done

Comments

@josteink
Copy link

josteink commented Feb 21, 2023

Description

Running neofetch when using the sway window-manager will report Mutter (Gnome) if some Gnome-services are started.

It's not uncommon to also depend on a few gnome-related tools (Gnome keyring, Gnome Control Center, Gnome Polkit, dbus, whatever).

Activating any of those may result in a gnome-shell process being launched, making this resulting process-lookup return incorrect results, because both sway and gnome-shell is present. (This may affect other tiling window-managers like i3wm as well, but I haven't tested that).

neofetch/neofetch

Lines 1909 to 1938 in ccd5d9f

wm=$(ps "${ps_flags[@]}" | grep -m 1 -o -F \
-e arcan \
-e asc \
-e clayland \
-e dwc \
-e fireplace \
-e gnome-shell \
-e greenfield \
-e grefsen \
-e hikari \
-e kwin \
-e lipstick \
-e maynard \
-e mazecompositor \
-e motorcar \
-e orbital \
-e orbment \
-e perceptia \
-e river \
-e rustland \
-e sway \
-e ulubis \
-e velox \
-e wavy \
-e way-cooler \
-e wayfire \
-e wayhouse \
-e westeros \
-e westford \
-e weston)

This can be seen from a manual shell invocation:

$ echo $(ps -e | grep -m 1 -o -F \
                               -e arcan \
                               -e asc \
                               -e clayland \
                               -e dwc \
                               -e fireplace \
                               -e gnome-shell \
                               -e greenfield \
                               -e grefsen \
                               -e hikari \
                               -e kwin \
                               -e lipstick \
                               -e maynard \
                               -e mazecompositor \
                               -e motorcar \
                               -e orbital \
                               -e orbment \
                               -e perceptia \
                               -e river \
                               -e rustland \
                               -e sway \
                               -e ulubis \
                               -e velox \
                               -e wavy \
                               -e way-cooler \
                               -e wayfire \
                               -e wayhouse \
                               -e westeros \
                               -e westford \
                               -e weston)
gnome-shell

If removing the -m 1 clause, we can see multiple processes being found, and I guess the problem is about (a lacking) handling of precedence:

$ echo $(ps -e | grep -o -F \
                               -e arcan \
                               -e asc \
                               -e clayland \
                               -e dwc \
                               -e fireplace \
                               -e gnome-shell \
                               -e greenfield \
                               -e grefsen \
                               -e hikari \
                               -e kwin \
                               -e lipstick \
                               -e maynard \
                               -e mazecompositor \
                               -e motorcar \
                               -e orbital \
                               -e orbment \
                               -e perceptia \
                               -e river \
                               -e rustland \
                               -e sway \
                               -e ulubis \
                               -e velox \
                               -e wavy \
                               -e way-cooler \
                               -e wayfire \
                               -e wayhouse \
                               -e westeros \
                               -e westford \
                               -e weston)
gnome-shell sway sway
  • Does this issue still occur in the master branch? Yes

Neofetch version

7.1.0

Screenshot

image

Config file

None

Verbose log

neofetchlog.txt

@josteink josteink changed the title Running Gnome-related services can cause Neofetch to incorrectly detect WM as Gnom/mutter Running Gnome-related services can cause Neofetch to incorrectly detect WM as Gnome/mutter Feb 21, 2023
@hykilpikonna
Copy link

This is fixed in HyFetch 1.4.7 by PR #94.

This repo (dylanaraps/neofetch) seems no longer maintained.

HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.

Read the "Running Updated Original Neofetch" section for more info!

@josteink
Copy link
Author

Thanks for the suggestion, @hykilpikonna , but I prefer my software to be about software, not politics 😄

As for neofetch... If it's not gonna be fixed, its not gonna be fixed. Closing.

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

No branches or pull requests

2 participants