Ubuntu – How to one make Firefox ignore the GTK theme entirely


I have a dark GTK theme installed in my Ubuntu 10.10 install and a persona installed for Firefox that I also like.

The problem is that Firefox is using my dark GTK theme for items like buttons and text fields on common web pages, and this commonly creates unreadable menus, text areas, and buttons. (white text on white backgrounds, or black text on black buttons).

I don't want to change either theme, because they look great in every other application, and I don't want to have to do something crazy to my Firefox install like use custom user scripts or CSS overrides.

All I want to do is tell Firefox to stop using my GTK theme completely. This appears to be what Google's Chrome browser does and it makes the most sense by far.

How can web developers possibly work around all the possible GTK themes out there?

Best Answer

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...





Related Question