I am not sure what happened, but I'm running Ubuntu 11.10 and it is unusable right now because of the white text on white background problem as seen in the screenshot.

enter image description here

Does anyone know how to fix this?

  • Maybe a stupid question, but did you try a reboot? Maybe something just got messed up and needs a little kick in the butt. If it doesn't work, try another theme by pressing the cog on the upper right and choosing "System preferences...". There choose the "Appearence" item. – Timo Feb 19 '12 at 0:05
  • Yes, sorry forgot to mention what I have tried already: Tried rebooting; Tried every single theme (everything else besides Ambiance makes it even worse); Tried terminal command {unity --reset} – schematic Feb 19 '12 at 0:11

The only way I've found to change colors is to edit the following three files in whatever theme I'm using.

/usr/share/themes/{theme name}/gtk-3.0/gtk.css  
/usr/share/themes/{theme name}/gtk-3.0/settings.ini  
/usr/share/themes/{theme name}/gtk-2.0/gtkrc

In the beginning of these files you'll find 4 pairs of core foreground and background colors used in applications based on the gtk 2 and gtk 3 libraries. Pair base_color and text_color are used for the document or text entry portions of windows where bg_color and fg_color are are used for the windows area where icons and labels are displayed.

Selected pair is for selected text and the tooltip pair is used for the tips that pop up when you hover over a button or link. These colors may be applied by applications with varying opacity or shadings. The colors you'll want to check are the base_color and text_color pair. #ffffff is pure white. You may find the gcolor2 application helpful for determining the color codes. These sets of labels appear in all three files so I've been changing all three to be the same for any label I change.

Here's an example of what I changed in the gtk.css file in the Ambiance theme:

Keep in mind that the ones you're most interested in are base_color for background and text_color for the text foreground. I your example they both appear to be the same, #ffffff or other tinted white colors.

/* default color scheme */  
@define-color bg_color #cdc3b8;  
@define-color fg_color #262626;  
@define-color base_color #accdff;  
@define-color text_color #262626;  
@define-color selected_bg_color #01b9fc;  
@define-color selected_fg_color #ffffff;  
@define-color tooltip_bg_color #A3D0FF;  
@define-color tooltip_fg_color #023C79;
  • Please do edit your answer with the appropriate code tags so that your answer is more readable next time onwards :) – Nitin Venkatesh Feb 19 '12 at 8:31
  • Your edit did make my answer clearer. I searched for code tags and found nothing. Where do I learn about code tags? – fragos Feb 19 '12 at 22:42
  • Thank you fragos! I have edited all three of the mentioned files and rebooted to no avail. I have found an interesting way around the problem however: if I go to my home folder first and hit Ctrl+H to show hidden files the background becomes black and the text remains white and remains that way while browsing into other folders. It's not the ideal solution, but I can make it work until 12.04 releases and I reinstall my system. But in the meantime if you have any other tricks I could try... do share =) Thanks again! – schematic Feb 19 '12 at 23:39
  • 1
    @fragos Code tags and other text formatting tools are present above the text area where you type your answer. Here is a screenshot of what I mean. The site uses Markdown editing. If you want to know more about it, you can look it up on the editing help section of the site – Nitin Venkatesh Feb 20 '12 at 2:12
  • @nitstorm thanks, I fixed the extra line breaks as well. – fragos Feb 20 '12 at 3:00
/usr/share/{theme}/gtk-2.0/gtkrc AND/OR ~/.themes/{theme}/gtk-2.0/gtkrc

are the ones that need to be edited


is the code for black text and white boxes, for this specific issue fro mthe screenshot you may need to change the other 6 elements and test out which affect that specific text element.

I am using Equinox Evolution Midnight on Sabayon linux with openbox and lxappearance does not change the colour of the white text on black text boxes or white text on white background in firefox (also libreoffice had reversed colours, yuck) I hope someone spends less time figuring this out because of this post


You can use dconf-editor (in package dconf-tools on ubuntu) and change the value at org.gnome.desktop.interface.

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.