fedora-silverblue / silverblue-docs

Fedora Silverblue documentation
https://docs.fedoraproject.org/en-US/fedora-silverblue/
61 stars 75 forks source link

Remove Firefox tip #177

Closed Hofer-Julian closed 2 months ago

Hofer-Julian commented 3 months ago

It doesn't work anymore with Fedora 40

alebastr commented 3 months ago

It should work if you replace every occurrence of firefox.desktop with org.mozilla.firefox.desktop. Rather than removing, it would be better to fix the tip.

That would break the instructions for f39 though, so maybe we need to have a separate instructions for f40 and f39 or below. Or update the instructions with a cryptic one-liner:

for desktop_file in /usr/share/applications/*firefox.desktop; do sed "2a\\NotShowIn=GNOME;KDE" "$desktop_file" | sudo tee "/usr/local/share/applications/$(basename $desktop_file)"; done
Hofer-Julian commented 3 months ago

Unfortunately, I can not confirm that this works. This hides the fedora firefox, but also the flatpak firefox. This makes sense I think since they share the same app id.

alebastr commented 3 months ago

Unfortunately, I can not confirm that this works. This hides the fedora firefox, but also the flatpak firefox. This makes sense I think since they share the same app id.

It's not supposed to, as flatpak exports are placed first in the XDG_DATA_DIRS and have higher priority than the /usr/local. This might be a bug somewhere (or a deliberate spec violation) :(

I've just checked the latest Silverblue F40 and it does seem to work as expected though:

  1. Flatpak Firefox replaces system Firefox even without the override desktop entry.
  2. Flatpak Firefox remains visible and is used by default after adding /usr/local/share/applications/org.mozilla.firefox.desktop
  3. Firefox menu entry is not available after removing the Flatpak Firefox with /usr/local override in place.
Hofer-Julian commented 3 months ago

I've just checked the latest Silverblue F40 and it does seem to work as expected though:

I only tried it on my local installation not a virtual machine. Maybe something is messed up on my system...

travier commented 2 months ago

Thanks for the PR. See https://github.com/fedora-silverblue/silverblue-docs/pull/178