fedora-silverblue / issue-tracker

Fedora Silverblue issue tracker
https://fedoraproject.org/atomic-desktops/silverblue/
123 stars 3 forks source link

Desktop icon for default (base image) Firefox is missing in dash (after Fedora 40 upgrade) #572

Open rugk opened 3 months ago

rugk commented 3 months ago

Describe the bug After updating to Fedora 40, with an installation, which also had/has Firefox installed from Flathub as a flatpak, only the flatpak version is shown in the GNOME dash.

To Reproduce I have Firefox from Flathub as a flatpak installed. Also, obviously, the default base image Firerox is installed.

In Fedora 39 I had and could pin them both to the dash, one was named "Firefox Web Browser" and the other one "Firefox" IIRC.

Now, i updated to Fedora 40. After the upgrade, only ne entry is there – the one named "Firefox" – and it starts the flatpak version.

I see no easy way – as a user – to (also) get "back" the "old"/"layered" (by default) Firefox. As it starts different Firefox profiles (obviously), that is immediately visible.

$ pwd           
/var/lib/flatpak/exports/share/applications
$ ls -la *firefox*                                                   
lrwxrwxrwx. 1 root root 101 30. Apr 00:07 org.mozilla.firefox.desktop -> ../../../app/org.mozilla.firefox/current/active/export/share/applications/org.mozilla.firefox.desktop

I know this is likely due to https://fedoraproject.org/wiki/Changes/RenameFirefoxDesktopFile.

So, as I previously reported this in the Fedora discussions, I had found a solution, which has worked in Fedora Silverblue 40.20240430.0 (2024-04-30T00:37:35Z) at least:

$ sudo mkdir -p /usr/local/share/applications/
$ sudo ln -s /usr/share/applications/org.mozilla.firefox.desktop /usr/local/share/applications/org.mozilla.firefox-rpm.desktop
$ sudo update-desktop-database /usr/local/share/applications/

However, at least since Fedora Silverblue 40.20240519.0 (2024-05-19T00:40:18Z), it is broken again. If /usr/local/share/applications/org.mozilla.firefox-rpm.desktop is named differently, the layered Firefox cannot be started at all, it starts/does nothing then. Also links are not resolved when this version is set as the default browser in GNOME Settings.

Expected behavior Two entries, one for Firefox flatpak and one for layered Firefox (rpm):

Screenshots See above

OS version:

$ rpm-ostree status -b
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
BootedDeployment:
● fedora:fedora/40/x86_64/silverblue
                  Version: 40.20240609.0 (2024-06-09T00:56:00Z)
               BaseCommit: 1a1bee91fe13bd449808661e1c3c5dcb7b03db14f4b827ef5704117507b6d05c
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
      RemovedBasePackages: noopenh264 0.1.0~openh264_2.4.0-1.fc40
$ rpm -q firefox                                                      
firefox-126.0-7.fc40.x86_64
$ firefox --version
Mozilla Firefox 126.0

Additional context Originally reported in Fedora Discussions: https://discussion.fedoraproject.org/t/after-fedora-40-upgrade-desktop-icon-for-default-base-image-firefox-is-missing-in-dash/114934 (there are also more details)

chrisawi commented 3 months ago

I'm not sure there's a bug here. You can only have one 'active' installation for a given app ID. This is a well-established limitation of the whole stack.

The fact the Firefox RPM and flatpak originally had different .desktop file names was pure happenstance.

I'll expand a bit more on the forum thread.