How to Change the Color of your Tooltips

27 11 2006

With all the customization fun I’ve been having with my Ubuntu Desktop, one thing kept bugging me. There isn’t an easy way to change the color of the tooltips. I think this is important to have a consistent color scheme throughout your desktop so I went to find a solution.

I found the answer on the Ubuntu Forums yet again, posted by mcduck.

UPDATE: This may also work in other distributions, not just Ubuntu, since it is a GTK setting.

UPDATE: This seems to only work in Ubuntu 6.10 or lower. People have reported that it does not work in Feisty Fawn (7.04).

Now, when changing the color of the tooltips, it’s important to note that this will change it for ALL themes.

To change the color of the tooltips, do this:

  1. gedit ~/.gtkrc-2.0
  2. Copy and paste the following lines in that file:

    style “tooltip” { bg[NORMAL] = “#FFFFFF” }
    widget “gtk-tooltips” style “tooltip”

  3. Change the Hex code (#FFFFFF) to whatever color you want.
  4. Save the file.
  5. Log out and log back in (or do a CTRL+BACKSPACE). You can probably just do a Desktop Refresh:

    killall nautilus gnome-panel

    …and it may work. I haven’t tested it, though.
    …TESTED: It works. NOTE: You’ll have to change ALL the smart quotes ” to regular quotes after you paste. Just delete them and type in the quotes again. Then do another killall nautilus gnome-panel. (2007.02.12)

Test it by placing your mouse over the Date and Time applet.

Enjoy!


Actions

Information

17 responses

20 06 2007
Bryan Ledford

Works great for me in Feisty Fawn. Thanks a bunch – customization dreams now fully realized.

18 08 2007
Caleb Cullen

Thanks for this! It worked fine for me in Feisty Fawn. Note that I used a more liberal assignment:
widget "*ooltip*" style "tooltip"

1 12 2007
ubuntu.linux-hardcore.com » 100 Ubuntu Links

[...] the easy way – Bypassing the Ubuntu login screen – StartUp-Manager – Configure GRUB and Usplash – Change the color of your tooltips – Installing on a low memory system – Installing with no CD-ROM drive – Managing fsck scans on [...]

17 12 2007
Fixing Some Life Irritating Bugs…. - [LINICKX].com

[...] on available in UK English. WMA to MP3: Converted some old tracks I found in a backup. Gnome: Changed the colour of tooltips as doing it in the theme file didn’t work Eye Candy: Fixed my CPU Temp Gauge (by typing [...]

30 01 2008
Mario G.H.

Why the heck are you using gksu for editing gtkrc-2.0?
it is your file and you should have normal permissions for using it.

It just works by using any-editor ~/.gtkrc-2.0

Regards

30 01 2008
Kevin Guertin

You’re right! Force of habit. :) I’ve updated the post.

1 06 2009
How to Change the Color of Gnome Panel Text, Handles, Buttons, and More « Linux FUD

[...] You may also want to change the color of your tooltips. [...]

Leave a comment