How to change tooltip's background color in Xfce?

How do I change tooltip's background color on Ubuntu desktop "Xfce". I know how to change in Gnome but I can't find out how to do so in Xfce.

Tooltip's background color in Eclipse is black, and font's color is black too.


To do it manually:

  • If you want to change the tooltip settings for all GTK2 apps, then edit ~/.gtkrc-2.0.
  • Or, If you just want to change settings for Eclipse, then edit ~/gtkrc-eclipse and then start eclipse with GTK2_RC_FILES=~/gtkrc-eclipse eclipse):

Add the following to your gtkrc file.

style "gnome-color-chooser-tooltips"
{
  bg[NORMAL] = "#FFFFAF"
  fg[NORMAL] = "#000000"
}
widget "gtk-tooltip*" style "gnome-color-chooser-tooltips"

Alternatively, you can do this from a GUI:

  • Install gnome-color-chooser Install gnome-color-chooser.
  • Go to Specific tab > Tooltips and check Foreground (black) and Background (yellow). Click apply.
  • The settings are saved to ~/.gtkrc-2.0 and ~/.gtkrc-2.0-gnome-color-chooser.

Take a look here: ubuntuforums.org - Tooltips/Info popup color scheme change for default 11.04 Xubuntu swap references to clearlooks with greybird. Good luck.

Excerpt from the thead:

So, to sum it all up, for happy yellow tooltips (In Xubuntu)

Open a terminal, type stuff in:

gksudo mousepad /usr/share/themes/Clearlooks/gtk-2.0/gtkrc

Paste the following at the end of the file:

style "clearlooks-tooltips" = "clearlooks-default"
{
        xthickness = 4
        ythickness = 4
        bg[NORMAL] = { 1.0,1.0,0.75 }
}

widget "gtk-tooltips" style "clearlooks-tooltips"

Switch to a different theme, than back again. Yellow tooltips. Yay!

The same thing will work for normal Ubuntu, just swap mousepad out for gedit in the terminal command.


I'm using Xubuntu 12.04 and had the same problem (mostly in Eclipse). Changing the theme was not an option, because I like Greybird. I found a solution at this blog.

To start you will need to edit these three files:

  • /usr/share/themes/Greybird/gtk-3.0/settings.ini
  • /usr/share/themes/Greybird/gtk-3.0/gtk.css
  • /usr/share/themes/Greybird/gtk-2.0/gtkrc

You will need to look for the following entries and replace their values:

tooltip_bg_color
tooltip_fg_color

For my tastes, I’ve used #EAEAEA as the tooltip background color and #666666 for the tooltip foreground color (the font color). That’s it!


I have modified gtkrc in my radiance theme to correct the color issue on tooltips in Eclipse.

In order to modify in your system, run:

  • To open with Terminal based text editor:

    sudo nano /usr/share/themes/Radiance/gtk-2.0/gtkrc
    
  • To open with GUI based text editor (leafpad):

    gksudo leafpad /usr/share/themes/Radiance/gtk-2.0/gtkrc
    

NOTE: Make sure you back up the above file before you make changes.

You need to make the following two changes to correct the tooltip issue:

  1. Replace the first line with

    gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#000000\nselected_bg_color:#f07746\nselected_fg_color:#000000\ntext_color:#3C3C3C\nbg_color:#f6f4f2\ntooltip_bg_color:#FFFFE1\nlink_color:#DD4814"
    
  2. Search for

    bg[SELECTED]      = "#000000"
    

    and replace the line with

    bg[SELECTED]      = "#ffffff"
    

Save the changes and restart Eclipse after that to see the changes.