Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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/

in the terminal type down:

sudo gedit /usr/lib/firefox/

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 :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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