How can one make Firefox ignore my GTK theme entirely?

Permanent solution:

You can specify a light GTK theme to use for rendering webpages in about:config. This is great because your system theme will still apply for menus etc. but the webpages will be rendered as they are with light themes.

  1. Navigate to about:config in your Firefox browser
  2. Right click and select new->string
  3. Enter widget.content.gtk-theme-override as the name
  4. Enter a light GTK theme that you have installed on your system for the value. e.g. Arc
  5. Restart firefox.

Source: https://www.reddit.com/r/firefox/comments/6rbvvw/photon_rectangular_tabs_have_landed_in_nightly/dl4318f/

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1283086


Start Firefox with one of the following command:

  • GTK3 Firefox 46+: env GTK_THEME=Adwaita:light firefox
  • GTK2 Firefox <46: env GTK2_RC_FILES=/usr/share/themes/Simple/gtk-2.0/gtkrc firefox

This will launch Firefox using the Simple/Adwaita:light theme, which is pretty basic and should blend with your Persona. You can try other themes, by replacing Simple with the theme name, but this doesn't work with all themes.

So far I have successfully tested with Simple and Redmond themes...

Before

Before

After

After


I would like to add to the great answer of @lovinglinux a way to make Firefox to load the theme when opened from a launcher in the taskbar instead of command line:

  1. Edit /usr/share/applications/firefox.desktop as sudo,
  2. In the "Exec" line, replace the value after the "=" with a command using the instructions provided by the mentioned @lovinglinux:

    bash -c 'GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc firefox %u' Kate editing firefox.desktop

And the result is this:

Firefox with Redmond theme and all other applications with a dark theme