Issues with the icon and app name in Linux

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-05, 18:55

Operating system:Arch Linux
Browser version:34.1.0
32-bit or 64-bit browser?:64-bit

I use Wayland and the browser window has no icon on the top left corner. Reporting the issue to the compositor devs pointed to kind of a mismatch between the icon name ‘pale moon’ and the app_id that identifies the browser as ‘Navigator’. The suggested workaround was to add

Code: Select all

StartupWMClass=Navigator
to the [Desktop Entry] section in the palemoon.desktop file. The icon works now but of course the taskbar window is still named ‘Navigator’. Could I try a cleaner and more complete fix? Thanks in advance.
No systemd - Joborun Linux

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5551
Joined: 2015-12-09, 15:45

Re: Issues with the icon and app name in Linux

Unread post by moonbat » 2024-11-06, 03:26

No such problems for me on KDE Neon and Wayland.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Re: Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-06, 08:02

So it might be a compositor specific issue. I run labwc with no desktop environment.
No systemd - Joborun Linux

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37538
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Issues with the icon and app name in Linux

Unread post by Moonchild » 2024-11-06, 09:48

Wastelander wrote:
2024-11-06, 08:02
I run labwc with no desktop environment.
If there is no desktop environment, there is likely no way for the browser to query Window Manager class names or its own window reference to apply the icon. Not sure if there is a solution in that case.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
mr tribute
Lunatic
Lunatic
Posts: 354
Joined: 2016-03-19, 23:24

Re: Issues with the icon and app name in Linux

Unread post by mr tribute » 2024-11-06, 12:58

I don't use app pinning so I don't have this problem. However, I just checked and this is actually true:

Code: Select all

...a mismatch between the icon name ‘pale moon’ and the app_id that identifies the browser as ‘Navigator’.
Isn't "app_id" (WM_CLASS(STRING) = "Navigator") defined in the Pale Moon source code?

User avatar
Bababo26
Moongazer
Moongazer
Posts: 12
Joined: 2021-02-12, 11:49

Re: Issues with the icon and app name in Linux

Unread post by Bababo26 » 2024-11-06, 13:48

mr tribute wrote:
2024-11-06, 12:58
I don't use app pinning so I don't have this problem. However, I just checked and this is actually true:

Code: Select all

...a mismatch between the icon name ‘pale moon’ and the app_id that identifies the browser as ‘Navigator’.
Isn't "app_id" (WM_CLASS(STRING) = "Navigator") defined in the Pale Moon source code?
Maybe its a typo but the WM_CLASS can be "Pale moon", upper case P.

Code: Select all

$ xprop -name Browser | grep WM_CLASS
WM_CLASS(STRING) = "Navigator", "Pale moon"
Note I don't use wayland and compile palemoon myself so its unbranded.

User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Re: Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-06, 16:09

Bababo26 wrote:
2024-11-06, 13:48

Code: Select all

$ xprop -name Browser | grep WM_CLASS
WM_CLASS(STRING) = "Navigator", "Pale moon"
That's what I get too. Both the taskbar and the browser window both pick up "Navigator" as app_id. Isn't it possible to make the appName the same as the className, that is "Pale moon"?
No systemd - Joborun Linux

User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Re: Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-06, 18:04

Moonchild wrote:
2024-11-06, 09:48
If there is no desktop environment, there is likely no way for the browser to query Window Manager class names or its own window reference to apply the icon. Not sure if there is a solution in that case.
I don't know how wayland compositors work, but in the palemoon.desktop entry the

Code: Select all

Name=Pale Moon
property should do the job even though

Code: Select all

StartupWMClass=
is not set. However, maybe labwc is not able to correctly parse the desktop file and it's searching for an icon that matches the appName ("Navigator"), obviously not finding it.
No systemd - Joborun Linux

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37538
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Issues with the icon and app name in Linux

Unread post by Moonchild » 2024-11-06, 19:45

I guess this is a case of ...
"Linux makes everything difficult." -- Lyceus Anubite
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Veit Kannegieser
Apollo supporter
Apollo supporter
Posts: 46
Joined: 2019-03-23, 19:16

Re: Issues with the icon and app name in Linux

Unread post by Veit Kannegieser » 2024-11-06, 20:53

i get

Code: Select all

WM_CLASS(STRING) = "pale moon", "Pale moon"
for the repacked SSE2 build with XFCE4.

User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Re: Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-06, 21:56

Veit Kannegieser wrote:
2024-11-06, 20:53
i get

Code: Select all

WM_CLASS(STRING) = "pale moon", "Pale moon"
for the repacked SSE2 build with XFCE4.
Hmm which distro are you using?
No systemd - Joborun Linux

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2389
Joined: 2018-05-05, 13:29

Re: Issues with the icon and app name in Linux

Unread post by vannilla » 2024-11-06, 22:13

Moonchild wrote:
2024-11-06, 19:45
I guess this is a case of ...
"Linux makes everything difficult." -- Lyceus Anubite
Off-topic:
In fairness, this is ICCCM which predates Linux by something like 10 years.
If anything XDG/Freedesktop compounded the issue and the group is primarily Linux.

User avatar
Veit Kannegieser
Apollo supporter
Apollo supporter
Posts: 46
Joined: 2019-03-23, 19:16

Re: Issues with the icon and app name in Linux

Unread post by Veit Kannegieser » 2024-11-06, 22:41

Wastelander wrote:
2024-11-06, 21:56
Hmm which distro are you using?
This is plain Debian 12.7.
I have tried to claim that it may come from from application.ini, but then i got this too:

Code: Select all

WM_CLASS(STRING) = "Navigator", "Pale moon"
And after following a link in the link bar, it changes to:

Code: Select all

WM_CLASS(STRING) = "pale moon", "Pale moon"
Possibly as part of changing the window title?

Yes, seem to switch between the two, depending on window title.
about:blank -> "Navigator"
quick dial, about:config -> "pale moon"
"html page" with just 123 -> "Navigator"
normal page with title -> "pale moon"

User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Re: Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-07, 12:28

Oh actually on Arch I always get 'Navigator' as app name, whatever the page :think: I have contacted the maintainers of the palemoon-bin package, the developers of the labwc compositor and sfwbar and they all told me that if the application identifies itself as 'Navigator' there's nothing they can do about that, unless I change the icon name from Pale Moon to Navigator or set the WM Class to 'Navigator' in the palemoon.desktop file.
No systemd - Joborun Linux

User avatar
mr tribute
Lunatic
Lunatic
Posts: 354
Joined: 2016-03-19, 23:24

Re: Issues with the icon and app name in Linux

Unread post by mr tribute » 2024-11-09, 06:20

While this is a problem for a subset of Linux users it's still interesting I think. This is what Firefox gave me:

Code: Select all

$ xprop WM_CLASS
WM_CLASS(STRING) = "Navigator", "firefox"

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5434
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Issues with the icon and app name in Linux

Unread post by Night Wing » 2024-11-09, 13:19

Veit Kannegieser wrote:
2024-11-06, 22:41
Wastelander wrote:
2024-11-06, 21:56
Hmm which distro are you using?
This is plain Debian 12.7.
I do not know if this will change anything, but Debian (Bookworm) is now on version (12.8).
Linux Mint 22.1 (Xia) Xfce w/Pale Moon, Waterfox, Firefox
MX Linux 23.6 (Libretto) Xfce w/Pale Moon, Waterfox, Firefox
Linux Debian 12.11 (Bookworm) Xfce w/Pale Moon, Waterfox, Firefox

User avatar
Wastelander
Moonbather
Moonbather
Posts: 62
Joined: 2022-12-28, 15:19

Re: Issues with the icon and app name in Linux

Unread post by Wastelander » 2024-11-10, 11:05

mr tribute wrote:
2024-11-09, 06:20
While this is a problem for a subset of Linux users it's still interesting I think. This is what Firefox gave me:

Code: Select all

$ xprop WM_CLASS
WM_CLASS(STRING) = "Navigator", "firefox"
That, but curiously the icon is working fine with FF on my side.
No systemd - Joborun Linux

User avatar
Veit Kannegieser
Apollo supporter
Apollo supporter
Posts: 46
Joined: 2019-03-23, 19:16

Re: Issues with the icon and app name in Linux

Unread post by Veit Kannegieser » 2024-11-10, 15:04

Wastelander wrote:
2024-11-10, 11:05
That, but curiously the icon is working fine with FF on my side.
And they use:

Code: Select all

StartupWMClass=firefox
Similar LibreWolf, even for about:blank:

Code: Select all

WM_CLASS(STRING) = "Navigator", "LibreWolf"
but

Code: Select all

StartupWMClass=librewolf-default
The strings are set using a

Code: Select all

typedef struct {
	char *res_name;
	char *res_class;
} XClassHint;
structure https://tronche.com/gui/x/xlib/ICC/client-to-window-manager/wm-class.html,

for UXP this is set in /widget/gtk/nsWindow.cpp: https://repo.palemoon.org/MoonchildProductions/UXP/src/commit/7f93d259670ef975d0a721628d6295a45ddc27e9/widget/gtk/nsWindow.cpp#L4086

Ignoring that the res_name changes between "pale moon" and "Navigator", the res_class is actually constant "Pale moon", and be the only thing that matters.
And matches

Code: Select all

StartupWMClass=Pale moon
in the desktop file. Maybe the blank is a problem?

User avatar
mr tribute
Lunatic
Lunatic
Posts: 354
Joined: 2016-03-19, 23:24

Re: Issues with the icon and app name in Linux

Unread post by mr tribute » 2024-11-11, 20:03

Veit Kannegieser wrote:
2024-11-10, 15:04
Ignoring that the res_name changes between "pale moon" and "Navigator", the res_class is actually constant "Pale moon", and be the only thing that matters.
And matches

Code: Select all

StartupWMClass=Pale moon
in the desktop file. Maybe the blank is a problem?
Blank space has a tendency to cause problems so I think it's a good guess. Maybe someone can compile without it, if not Pale Moon then New Moon. Also, "Navigator" seems like a remnant from the past (Netscape Navigator?).

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2389
Joined: 2018-05-05, 13:29

Re: Issues with the icon and app name in Linux

Unread post by vannilla » 2024-11-11, 20:19

mr tribute wrote:
2024-11-11, 20:03
Also, "Navigator" seems like a remnant from the past (Netscape Navigator?).
Well, the WM_CLASS property is designed to identify windows through two names that, in general, should never change.
In particular, the second name identify the type of application this window belongs to; in this case the application type is Navigator.
According to https://www.x.org/releases/current/doc/ ... S_Property the first part of WM_CLASS should be the name of the process which in this case should be "palemoon", while the second part should either be "Pale Moon" or "Navigator", i.e. the opposite of what is done now.
In general, the ICCCM is very ambiguous and things have not improved in the slightest and I'm personally amazed things even work at all.