`flatpak run org.mozilla.firefox` runs system’s firefox instead of flatpack’s

Preludium: I am new to Silverblue and new to Fedora (experience mostly with Debian, CoreOS and Ubuntu) and I got myself into a mess by trying to install video and audio codecs for use by the system Firefox with rpm-ostree. Those I want to clean up too, but that will be a different thread.

I installed the Firefox flatpack from flathub:

That worked fine, the correct flatpack starts, videos play, codecs are vendored into the flatpack. But the GUI and the rendered websites were not crisp as I am using a scaling factor of 1.5 and the flatpack does not seem to use that if I understood correctly.

Searching in this forum I found this hint about telling the flatpack Firefox to use Wayland, which made sense to me, so I ran these three commands:

But if I now run flatpak run org.mozilla.firefox it starts the system’s Firefox (conveniently a version 85.0 so easy to distinguish from the flatpacks version 86.0) instead of the flatpack one.
To make things more confusing, flatpak run org.mozilla.firefox --version returns as it should Mozilla Firefox 86.0.

So how do I make flatpak run org.mozilla.firefox actually run the flatpack but using Wayland and hence correct scaling?

Related question: Is there a way to enforce Wayland for other flatpack too? Blurry text is not that ergonomic in Bitwarden, Zoom, MS Teams, Glimpse or Signal either.

1 Like

@toMeloos had the answer to getting Firefox running specifically on Wayland vs the default of XWayland in another thread, see below. However not all applications are equal in regards to Wayland support. I’d generally recommend just living with the defaults, the migration to Wayland is occurring at a sure pace and will happen naturally.

flatpak override --socket=wayland org.mozilla.firefox
flatpak override --env=GDK_BACKEND=wayland org.mozilla.firefox

I tried using this trick for VLC and yet it still runs XWayland, plus my whole shell had some really buggy behavior afterward. Applications opening super slow or just an empty box. I wasn’t sure how to remove the override so I did a flatpak repair and rebooted, which seemed to help. So, just word to the wise.

1 Like

Thank you, it is a bit hard to see because one hast to unfold the quoted posting above, but what you proposed is exactly what I did and how I ended up with the wrong firefox being started. Hence your post is not helpful to my problem.

BTW: A great way to manage overrides, including resetting overrides to defaults, is to use the app called Flatseal. It’s available as a flatpak (of course) on Flathub.

3 Likes

Ah my apologies, yeah I thought you just ran the very last command but I see now.

Possible troubleshooting steps:

  1. See if you can recreate the issue and file a bug https://bugzilla.redhat.com/
  2. Run flatpak repair and reload, see if issue goes away
  3. Just remove the base FF image with an rpm-ostree override remove firefox (will no longer be able to install GNOME extensions I believe, see thread in regards)
  4. Collect these outputs and post them here:
    • flatpak run --verbose org.mozilla.firefox (get terminal output)
    • Go to URL about:support in FF and take a screenshot of the Application Basics section

No problem, it is easy to overlook.

I tried 2. with no success.
4. gave me this:

$ flatpak run --verbose org.mozilla.firefox 
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/mon/.local/share/flatpak
F: Opening user flatpak installation at path /var/home/mon/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/mon/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Cleaning up unused container id 747254331
F: Cleaning up unused container id 883529466
F: Allocated instance id 626619780
F: Add defaults in dir /org/mozilla/firefox/
F: Add locks in dir /org/mozilla/firefox/
F: Allowing wayland access
F: Allowing pulseaudio access
F: Pulseaudio user configuration file '/var/home/mon/.config/pulse/client.conf': Error opening file /var/home/mon/.config/pulse/client.conf: No such file or directory
F: Running 'bwrap --args 41 xdg-dbus-proxy --args=43'
F: Running 'bwrap --args 41 firefox'

If I do 3. how would I undo that?

For comparison purposes, my terminal output looks similar. Two differences – you are not allowing x11, which is expected on your part but perhaps not supported, and also there is an additional unused container to clean up. I do not know what the latter means, could be nothing at all.

Blockquote[matthew@localhost ~]$ flatpak run --verbose org.mozilla.firefox
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/matthew/.local/share/flatpak
F: Opening user flatpak installation at path /var/home/matthew/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /var/home/matthew/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Cleaning up unused container id 2173171092
F: Allocated instance id 3336504420
F: Add defaults in dir /org/mozilla/firefox/
F: Add locks in dir /org/mozilla/firefox/
F: Allowing wayland access
F: Allowing x11 access
F: Allowing pulseaudio access
F: Pulseaudio user configuration file ‘/var/home/matthew/.config/pulse/client.conf’: Error opening file /var/home/matthew/.config/pulse/client.conf: No such file or directory
F: Running ‘bwrap --args 43 xdg-dbus-proxy --args=45’
F: Running ‘bwrap --args 43 firefox’

To your last question, I have not actually tried reverting my Firefox (remove) override, but there are a couple of possible commands:

sudo rpm-ostree override reset firefox
sudo rpm-ostree reset --overrides

Before you get to that point there are a few things you could try though:
sudo flatpak permissions-reset org.mozilla.firefox

In my experience flatpaks save configurations through installations. So if you do a flatpak repair, a permission-reset, uninstall then reinstall, and it still doesn’t work then I don’t know what else to do. Best thing would be to try and recreate and file a bug.

Seems like a symlink is pointing to the wrong binary, but that is just speculation on my part.

1 Like

sudo rpm-ostree override reset firefox
sudo rpm-ostree reset --overrides
sudo flatpak permission-reset org.mozilla.firefox
and then reinstalling flatpak firefox did work. I learned another funny behaviour. As soon as I started the non-flatpack firefox once, running flatpak run org.mozilla.firefox will start the non-flatpack binary. But as long as I never run it, I am fine. What a weird bug. Thank you all for your help.