View previous topic :: View next topic |
Author |
Message |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 502
|
Posted: Sat Aug 05, 2023 12:30 am Post subject: [Solved] Firefox-esr window class, missing desktop file |
|
|
When firefox-bin:rapid is installed, the icon in KDE task manager appears normal. If I use firefox-bin:esr, the icon is a generic wayland (W) icon. The reason is that the window class (application) is defined as firefox-esr and the desktop file is not found. In contrast, the window class (application) in :rapid is found to be firefox-bin, which matches the name of the desktop file. The firefox binaries in both versions in a list of running processes are the same, both return as firefox-bin.
The name of the installed desktop file for both :rapid and :esr is firefox-bin.desktop. There are two workarounds, one is to create a symlink, firefox-bin.desktop >> firefox-esr.desktop or create a window rule in KDE Plasma to force change the 'desktop file name' from firefox-esr to firefox-bin.
When using a tool to detect the window properties of firefox, the window class (application name) is returned as firefox-bin in :rapid which matches the name of the running process and binary. In :esr, it returns as firefox-esr which does not match the name of the running process, the binary nor the desktop file, which creates the icon not found issue. I don't know if the difference in naming of the window class (application) in :esr was intentional or an oversight, but it leads to unexpected behavior that requires a workaround.
While it is a minor annoyance, I'd still like to mention the unintended side-effects to the devs. Should I do that upstream or here at Gentoo? Is there anything in the firefox-bin:esr ebuild that could define the window class/desktop file name or is this built into the binary upstream by Mozilla?
Thanks in advance!
Last edited by rab0171610 on Sat Aug 05, 2023 2:43 am; edited 1 time in total |
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 502
|
Posted: Sat Aug 05, 2023 2:41 am Post subject: |
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1530052
From that bug report, I found the simplest fix is to modify a desktop file in ~/.local/share/applications and add "--name=firefox" to the exec lines.
From:
Exec=firefox-bin %u
to:
Exec=firefox-bin --name=firefox %u |
|
Back to top |
|
 |
Juippisi Developer


Joined: 30 Sep 2005 Posts: 762 Location: /home
|
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 502
|
Posted: Sun Aug 06, 2023 5:10 pm Post subject: |
|
|
Thank you for your reply. If I am reading it correctly, this commit:
Code: | + local desktop_filename="${PN}-esr.desktop" |
Creates a desktop file named firefox-esr.desktop for the source version of firefox:esr? That does not happen with the current stable ebuild for firefox-bin:esr as far as I can tell (firefox.desktop is present, but firefox-esr.desktop is not). Would you still like me to file a bug report at Gentoo about this? That would also fix the issue I was having (firefox-esr.desktop not found). |
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 502
|
Posted: Sun Aug 06, 2023 5:15 pm Post subject: |
|
|
Sorry for my confusion. I misread your post, and did not understand that change was made today in an attempt to fix the issue. Yes, if that creates /usr/share/applications/firefox-esr.desktop, then that fixes the problem. Thank you very much.
EDIT:: I am filing a bug report now with updated info. The new change results in /usr/share/applications/firefox-esr-bin.desktop vs /usr/share/applications/firefox-esr.desktop which leads to the same issues, "firefox-esr.desktop not found". |
|
Back to top |
|
 |
Juippisi Developer


Joined: 30 Sep 2005 Posts: 762 Location: /home
|
Posted: Tue Aug 08, 2023 5:43 am Post subject: |
|
|
rab0171610 wrote: | Sorry for my confusion. I misread your post, and did not understand that change was made today in an attempt to fix the issue. Yes, if that creates /usr/share/applications/firefox-esr.desktop, then that fixes the problem. Thank you very much.
EDIT:: I am filing a bug report now with updated info. The new change results in /usr/share/applications/firefox-esr-bin.desktop vs /usr/share/applications/firefox-esr.desktop which leads to the same issues, "firefox-esr.desktop not found". |
Hmm, right, but we can't name it "firefox-esr.desktop" because it'd conflict with the source version. I guess I'll go with editing the .desktop file adding
|
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 502
|
Posted: Tue Aug 08, 2023 6:32 am Post subject: |
|
|
That would work. Not to complicate the issue, but I did test another fix that I would like to point out. It involves simply changing the line in the desktop file:
Code: | StartupWMClass=firefox |
to
Code: | StartupWMClass=firefox-esr |
This corrects the window class issue and allows the binary to find or link to the desktop file and icon correctly in a Wayland session.
It appears to work independent of the name of desktop file (in test case changing desktop filename back and forth from firefox-bin-esr.desktop to firefox-bin.desktop.) It may be simpler and more direct solution than modifying the "exec=" parameters.
While not exact issue but related I came to that solution by reading:
https://bugzilla.mozilla.org/show_bug.cgi?id=1610305 |
|
Back to top |
|
 |
rab0171610 Guru

Joined: 24 Dec 2022 Posts: 502
|
Posted: Tue Aug 08, 2023 7:32 am Post subject: |
|
|
The updated ebuild, firefox-bin-102.14.0-r2.ebuild (esr) with the line:
Code: | local exec_command="${PN} --name=firefox |
fixes the issues I was having on Wayland on two machines.
Thank you Juippisi for your hard work, time and consideration. |
|
Back to top |
|
 |
|