Closed Bug 1782448 Opened 2 years ago Closed 2 years ago

Beta and Developer Edition on Wayland are missing window icon

Categories

(Core :: Widget: Gtk, defect, P3)

Unspecified
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1751153

People

(Reporter: tustamido, Unassigned)

References

(Blocks 1 open bug)

Details

  1. Enable Firefox Wayland*: MOZ_ENABLE_WAYLAND=1
  2. Launch Firefox.

*: do not confuse it with simply launching Firefox on a Wayland session. about:support must display Window Protocol: wayland, not xwayland.

Results:
Firefox release icon (orange?) and Nightly one (blue-violet?) are OK, but Developer Edition and Beta launch as if there is no icon, using Wayland default (Wayland logo, white W over yellow circle).

Tested on openSUSE Tumbleweed KDE Plasma Wayland.

I am getting the same problem with firefox-esr (and thunderbird) on Debian testing with KDE/Wayland.

See:
https://bugs.kde.org/show_bug.cgi?id=459536

The icon is incorrect only in the task-switcher, but correct in the taskbar.

Here is incorrect in both cases. It's correct only in Application Launcher and other ways that rely on .desktop file (like file "Open With" menu), because icon is set by Icon= instead of the binary.

I had this problem with other apps (Gnumeric, BackIntTime), and the devs fixed it.
The problem was to set the app_id in the app itself so that it matches the .desktop file name.
I hope firefox devs can fix that as well.

I debugged a bit with WAYLAND_DEBUG=1.
It appears that firefox sets its app_id as "Firefox-esr", while the .desktop file name is "firefox-esr".
So it is a problem with the capital "F".

I don't think this is related to .desktop file. I have multiple .desktop files to launch different Firefox profiles, each with a different name and this was never an issue before I enabled Wayland, using the same installation, the same .desktop files...

Even launching Firefox from terminal instead of using .desktop the issue is still present. But only for Beta and Developer Edition. Nightly and release are fine. I didn't test with ESR.

Nightly is fine even after renaming its .desktop file to a random string.

I am 99% sure it is related to .desktop files.
Wayland and X11 work in a different way for icons.
Wayland get the app_id, and looks for a corresponding .desktop file name.
See here for more info:
https://nicolasfella.de/posts/importance-of-desktop-file-mapping/

On my side, renaming the .desktop file fixed the problem, but I hope a proper fix can be done upstream.

Blocks: wayland
Priority: -- → P3
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1751153
Resolution: --- → DUPLICATE

I don't think this is the same issue as bug 1751153.

I have Nightly and DevEd here, both manually installed by unpacking the .tar.bz2 from https://ftp.mozilla.org/pub/ to a folder and manually creating a .desktop file.

Both use the exact same content in their .desktop file, of course changing only path and name, one being "Firefox Nightly" and the other one "Firefox Developer Edition".

Yet, Nightly opens with the right icon, while DevEd launches with the yellow Wayland default icon.

Previously I tested every available channel the same way and confirmed this bug only affects DevEd and Beta, not Nightly or release.

bug 1826330: The desktop file must be named firefox-dev.desktop for DevEdition and firefox-beta.desktop for Beta.

otherwise it has to be:
customname.desktop
Exec=/path/to/firefox --name customname

Finally! It works, thank you.

There's an issue with this --name approach. It's not remembered on restart. For instance, if I open about:profiles and click Restart normally..., it restarts with the yellow Wayland icon.

Should I open a new bug for this?

  1. Default name for Developer Edition is firefox-aurora, not firefox-dev.
  2. Firefox looks for the icon in the .desktop file with the name it was launched.

Developer Edition users need to have a firefox-aurora.desktop file, then there's no icon issue even after restarting. Even if you have extra .desktop files to launch other Firefox profiles, as long as firefox-aurora.desktop exists.

There's a bug in Firefox: when the browser triggers the command to restart, the --name option should be passed to the new instance, but it's not, so it reverts to default.

For KDE Plasma users, you can check this issue by using "Detect Window Properties" from "Window Rules" dialog.

  • If you launch Developer Edition without passing --name option, window class is firefox-bin firefox-aurora (firefox-aurora is the default name).
  • If you launch Developer Edition using --name customname, window class is firefox-bin customname.
  • If you launch Firefox Edition with custom name then click to restart, window class after restarting is firefox-bin firefox-aurora.

So while this issue isn't fixed, having just a customname.desktop with Exec=/path/to/firefox --name customname doesn't work properly because the name is lost after restarting and so is the icon if you don't have a desktop file with the default name.

Thanks for checking this! I will put this in my bug report about the broken default browser check. Firefox would anyway need to know its desktop file name to be able to set the correct .desktop file as default browser, so --name would have to be checked there too. Current autogenerated ~/.local/share/applications/userapp-Nightly-*.desktop etc. is incorrect and has a wrong icon on Wayland.

You need to log in before you can comment on or make changes to this bug.