Closed Bug 1640153 Opened 5 years ago Closed 4 years ago

Firefox flatpak running instances are not shown with the same icon

Categories

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

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: rasmusnielsen91, Assigned: support.refragate, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Installed firefox from flathub.
Place the icon in the dock.
Run firefox

Actual results:

Two firefox icons are shown: the beautiful highres one for the launcher. Then a low res one for the actual running process

Expected results:

The launcher should merely show a blue dot underneath as other apps do when an instance of them is running

Component: Untriaged → Release Automation: Flatpak
Product: Firefox → Release Engineering
Version: 76 Branch → unspecified

Found in triaging. Going forward, Flatpak-related bugs will no longer be filed under RelEng, but instead in Core/Widget:GTK where folks have much more in-depth knowledge on this. If the issues are RelEng related, they can be filed against Release Engineering :: Release Automation: Other and we'll take care of that.

Component: Release Automation: Flatpak → Widget: Gtk
Product: Release Engineering → Core
Blocks: flatpak
Priority: -- → P3
See Also: → 1107281

From bug 1107281:

(In reply to simsbruno2002 from bug 1107281 comment #4)

It seems StartupWMClass is not present in the .desktop file of the Flatpak version.
Adding StartupWMClass=Firefox in the desktop entry fixes the duplicate icon on Plank & elementaryOS.

I'm confused because https://searchfox.org/mozilla-central/source/toolkit/mozapps/installer/linux/rpm/mozilla.desktop has existed for a long time, but it seems snap and flatpak integration both have their own .desktop files, for reasons that I do not understand.

I'm guessing fixing this is as simple as copying that 1 line from the rpm copy of the .desktop file, but really, it seems like we should have a smarter solution here so there's 1 shared place for shared .desktop stuff that wants going into all these files. :glandium, does that sound right?

Flags: needinfo?(mh+mozilla)
Assignee: nobody → oidgmek101

Review ping?

(In reply to support.refragate from comment #5)

Review ping?

r+, will land this on central + beta next week. thanks for the ping, I missed this in my review queue.

(In reply to :Gijs (he/him) from comment #2)

From bug 1107281:

(In reply to simsbruno2002 from bug 1107281 comment #4)

It seems StartupWMClass is not present in the .desktop file of the Flatpak version.
Adding StartupWMClass=Firefox in the desktop entry fixes the duplicate icon on Plank & elementaryOS.

I'm confused because https://searchfox.org/mozilla-central/source/toolkit/mozapps/installer/linux/rpm/mozilla.desktop has existed for a long time, but it seems snap and flatpak integration both have their own .desktop files, for reasons that I do not understand.

Re-reading this, makes a lot of sense for them to share that. I wonder why we went a different route. We either didn't know of that file or maybe the env var passing was different? It's certainly worth exploring that path.

:glandium's https://bugzilla.mozilla.org/show_bug.cgi?id=1323666#c12 makes a lot of sense as well. On the other hand, both Snap and Firefox Flatpak for Snapstore and Flathub are built on Firefox infra and are baking our .desktop files so in this case, they do use the in-tree ones. But I couldn't agree more, we should aim to single-source things into a single place and ease this out.

Pushed by mtabara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2dc693aa4abd Added StartupWMClass to flatpak .desktop file r=mtabara DONTBUILD
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch

Closing loop, this started riding the beta trains this week.

Hi! With Firefox 99 (Flatpak) this issue has appeared again. :(

(In reply to marco4mp from comment #11)

Hi! With Firefox 99 (Flatpak) this issue has appeared again. :(

Please file a new bug with more details. Commenting in old closed bugs doesn't help.

Flags: needinfo?(marco4mp)

I created a new bug for this issue, see https://bugzilla.mozilla.org/show_bug.cgi?id=1770636

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

Attachment

General

Created:
Updated:
Size: