All Articles

Fix Firefox dark text input on Ubuntu 18 when using Gnome dark theme

The text input box in my Firefox 60 has dark text on a black background (see below)


The reason is I’m using a dark theme called Adwaita-dark on Ubuntu 18.


It turns out to be a generic problem people are facing. I’m sure someone will fix it down the road but here is the quick fix if you can not wait:

1. Create a desktop icon:

gedit ~/Desktop/Firefox.desktop

2. Fill the following content & save the file.

#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=env GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc GTK_THEME=Adwaita:light /usr/bin/firefox Name=Firefox Comment=Firefox Icon=firefox

3. Right-click on the Firefox icon you just created on your desktop and click:

Properties -> Permissions -> Allow executing file as program

4. Double-click the Firefox and click Trust and Launch (you only need to do this once).

5. Done, enjoy the dark color text on white text inputs.