Fix Firefox dark text input on Ubuntu 18 with dark themes

1 min read Original article ↗

Marc Liu

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

Press enter or click to view image in full size

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

Press enter or click to view image in full size

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.

Press enter or click to view image in full size

Cross-posted from https://lsm.ai/fix-firefox-dark-text-input-ubuntu-dark-theme/.