I know this is pretty much a duplicate of How can one make Firefox ignore my GTK theme entirely?, but the answers on that one are no permanent solution. It works by launching firefox from the terminal.

I would like to know a solution that works for every instance of firefox no matter how it was created. There is the possibility to edit the userContent.css file, but the settings you make randomly do not apply to some sites or in some situations, strangely, even with the !important added...

I have a dark GTK theme and this results in some textboxes having a black background with black text with a userContent.css that has

input, textarea {
    color: black !important;
    background-color: white !important;


I changed a setting in about:config from true to false, namely browser.display.use_system_colors. Everything appears normal and well now, for one exception: everything that runs on localhost. This includes PHPMyAdmin and a website I am making. I would like to know if there is a solution to this.


The best solution to tell Firefox that it should use the light theme instead of the dark is by specifying the GTK_THEME variable prior to launching.

So, 3 ways you get for doing this..

1- from terminal you can do:

GTK_THEME=Adwaita:light firefox

2- if you hate the terminal and wanna close it once firefox works:

GTK_THEME=Adwaita:light firefox &

3- if you want this to be the default behavior:

Just add two lines to the Firefox launcher script located at /usr/lib/firefox/firefox.sh

in the terminal type down:

sudo gedit /usr/lib/firefox/firefox.sh

look at the beginning of the script for this:



and change it to this:


export GTK_THEME

Finally, restart Firefox.

Hope this helps.

Please help me by voting this up.

Thank you :)

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.