Firefox – Fix Default Window Bar Appearance Issue When Running as Snap

20.0422.04firefoxsnap

Today I upgraded my Ubuntu from 20.04 LTS to 22.04 LTS. As announced, Firefox is now running as a Snap package by default. While the application is running fine, I noticed some weird behavior in the appearance of the window bar.

This is how the window bar looks with Firefox as a snap:

Firefox with different window bar appearance

This is how the window bar looks with any other snap I have installed, here it's KeepassXC:

Normal looking window bar

To me it looks as if Firefox uses some other theme and does not respect the system's theme settings.

Best Answer

Yes. Snap ignores your theme and selects one of the co-packed snap themes. This is one of the drawbacks of snap.

You could remove Firefox from snap with:

sudo snap disable firefox
snap remove --purge firefox

For Ubuntu 22.04, the empty Firefox Deb is pre-installed as a wrapper. You have to remove it via command:

sudo apt remove --autoremove firefox

On Ubuntu 22.04, you'll have to add a ppa now:

sudo add-apt-repository ppa:mozillateam/ppa

Now you can install it as deb:

sudo apt install -t 'o=LP-PPA-mozillateam' firefox

To avoid clashes during the next updates you might setup the priority in the mozillas ppa file:

sudo nano /etc/apt/preferences.d/99mozillateamppa

Below the existing lines add the following entries:

Package: firefox*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501

To block Ubuntu's own (empty) deb add these lines as well:

Package: firefox*
Pin: release o=Ubuntu
Pin-Priority: -1

This all has been explained here in detail

I removed snap altogether, because I want to have the freedom to decide about the look & feel of my desktop - uniformly ;-)