Ubuntu – How to get rid of white color on white text for Ambiance Blue theme

12.04themes

After upgrading to Ubuntu 12.04, windows pop up with white color on white text. I am lost, confused, feeling very stupid and am not sure what to do next. I would greatly appreciate it if someone could please take a look at my issue.

My problem is similar to this person's experience:

Hope-DT GTK+ theme displays white fonts after upgrade to 12.04

I see on advanced settings I am using the 'Ambiance Blue' GTK+ theme, whatever a GTK+ is. Changing this to any of the other GTK+ themes fixes the white on white problem, but makes the background colours of minimised windows really ugly – i.e. like graphics of early 1980s PCs. Only 'Ambiance Blue' seems to set them right.

Looking at White text on white background problem,
it seems I need to manually edit some configuration files. There's 3 configuration files and I didn't know which one to use, so I changed them all. Now I have:


**/usr/share/themes/Ambiance Blue/gtk-3.0/gtk.css:**

/* 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;

**/usr/share/themes/Ambiance Blue/gtk-3.0/settings.ini:**

    [Settings]
gtk-color-scheme = "base_color:#accdff\nbg_color:#cdc3b8\ntooltip_bg_color:#a3d0ff\nselected_bg_color:#ffffff\ntext_color:#262626\nfg_color:#262626\ntooltip_fg_color:#023c79\nselected_fg_color:#ffffff\nlink_color:#1448dd\nbg_color_dark:#373b3c\nfg_color_dark:#d2dbdf"

**/usr/share/themes/Ambiance Blue/gtk-2.0/gtkrc:**


gtk-color-scheme = "base_color:#accdff\nfg_color:#262626\ntooltip_fg_color:#023c79\nselected_bg_color:#01b9fc\nselected_fg_color:#ffffff\ntext_color:#262626\nbg_color:#cdc3b8\ntooltip_bg_color:#a3d0ff\nlink_color:#1448dd"

I restart the computer and then go into advanced settings and select 'Ambiance Blue' and I still get white on white.

Q1. Which of the 3 configuration files actually matters?

I am not using unity; I'm not sure what I'm using. Gnome 2 or gnome 3 or gnome-something or something like that I think. Here are some environment variables:

GTK_MODULES=canberra-gtk-module:canberra-gtk-module
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DEFAULTS_PATH=/usr/share/gconf/gnome-classic.default.path
XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome-classic:/etc/xdg
DESKTOP_SESSION=gnome-classic
MANDATORY_PATH=/usr/share/gconf/gnome-classic.mandatory.path
GDMSESSION=gnome-classic
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
XDG_DATA_DIRS=/usr/share/gnome-classic:/usr/share/gnome:/usr/local/share/:/usr/share/
XDG_CURRENT_DESKTOP=GNOME

Q2. Is there some way of testing this without restarting the computer each time? (I tried turning all numbers in one of the files to #000000 but it didn't seem to do anything.

Q3. Exactly which number do I need to change to get rid of the white-on-white?

Best Answer

These are the ones that need to be edited:

/usr/share/{theme}/gtk-2.0/gtkrc 

or

~/.themes/{theme}/gtk-2.0/gtkrc

change it to:

text_color:#000000
bg_color:#ffffff

is the code for black text and white boxes 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 answer.

Related Question