I am using Ubuntu Mate 20.04 How can I customize the appearance (i.e. background, font color... ) of tooltips?
Maybe through dconf-editor or command line?

  • You can install Gtk2 and Gtk3 themes on Mate and if you want to create your own themes , take a look at here. Also there's a nice program to inspect gtk themes called The widget laboratory – Parsa Mousavi May 26 at 7:14
  • And I don't think it's possible to change it via command line because themes have lots of png files that cover the backgrounds like windows decorations , tooltips , menus , etc. – Parsa Mousavi May 26 at 7:22
  • @ParsaMousavi I am aware of the themes one is able to install at mate. My question refers specifically to the customization of tooltips. Thanks for your time in answering – obaino May 26 at 7:29
  • 1
    @obaino I have refreshed my old post about yellow tooltips, you can follow it also. – N0rbert May 26 at 8:19

You can install Gtk2 and Gtk3 themes and most of them has a structure like this :

$tree . -d
├── assets
├── gnome-shell
│   └── assets
├── gtk-2.0
│   ├── apps
│   └── assets
├── gtk-3.0
├── metacity-1
└── xfwm4

In the gtk-3.0 directory you can find a file named gtk.css . Open it with your favorite text editor and search for ToolTips. There should be some properties like this :

tooltip {
   padding: 4px;
   /* not working */
   border-radius: 5px;
   box-shadow: none;
   text-shadow: 0 1px black; 

tooltip.background {
   background-color: rgba(0, 0, 0, 0.8);
   background-clip: padding-box;
   border: 1px solid rgba(255, 255, 255, 0.1); 

tooltip decoration {
     background-color: transparent; 
tooltip * {
     padding: 4px;
     background-color: transparent;
     color: white; 

You can change the background color of your tooltips via the background-color property.

And in the gtk-2.0 directory there's file named gtkrc which might contain a line like this :

# Tooltip colors
gtk-color-scheme = "tooltip_fg_color:#ffffff\ntooltip_bg_color:#000000"

If you want to change the tooltip background color for a gtk2 program ( they are very rare by now) you can adjust it.

You can change the theme via command line without the need to log-out and log-back . For example for a theme called Sweet :

gsettings set org.gnome.desktop.interface gtk-theme Sweet
gsettings set org.gnome.desktop.wm.preferences theme Sweet 

Happy hacking :)

EDIT : These are just for Gtk apps . But you haven't mentioned that you want to change the tooltips of Gtk or Qt apps . So if you want to customize Qt5 apps you can use a nice theme engine called Kvantum which is very customizable and is SVG based , so you can edit the background color of the tooltips via editing the theme files with something like Inkscape

| improve this answer | |
  • @DKBose Edited the typo . Thanks for pointing out. – Parsa Mousavi May 26 at 7:44
  • 1
    All this will work, but it is safer to change the theme files in ~/.config directory of current user. – N0rbert May 26 at 7:54
  • @N0rbert AFAIK gtk themes go to either /usr/share/themes/ or ~/.themes not ~/.config . Do you mean that we should put css files in ~/.config ? – Parsa Mousavi May 26 at 7:59
  • @ParsaMousavi He means to edit ~/.config/gtk-3.0/gtk.css or ~/.config/gtk-2.0/gtk.css – obaino May 26 at 8:01
  • @obaino, yes "to edit ~/.config/gtk-3/gtk.css or ~/.config/gtk-2/gtk.css " . Thanks :) – N0rbert May 26 at 8:01

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.