Change selection color in Ubuntu 12.04 themes (Linux)

Monday, July 30, 2012 posted by CSch

The color of selection elements in themes used by Ubuntu 12.04 is determined by a single value and is therefore the same for all of them: highlightened buttons, files, menu items as well as the selection box that you get by holding and dragging your mouse.

You can set this value in the settings.ini of each theme. The settings file of the Ambiance theme for example is located in /usr/share/themes/Ambiance/gtk-3.0

Before you edit the file, create a backup copy of it in case you want to reset the theme to its original state. Just copy the file somewhere else to do that. Afterwards, open the original file as administrator. This is easily done using the terminal:

sudo gedit /usr/share/themes/Ambiance/gtk-3.0/settings.ini

The value that determines selection color is nselected_bg_color – it is formated as hexadecimal value (#000000). You can now use a graphic editor to find out the hexadecimal value of the color you want to use – if you wanted to use red for example, you would have the value #FF0000.

Afterwards save the file and log out of your current session. After the next login, all elements of selection should now have the color of your choice:

Be Sociable, Share!


One Response to “Change selection color in Ubuntu 12.04 themes (Linux)”

  1. ken says:

    Hi, I tried this and found that changing to say “nselected_bg_color –#0000ff” for blue like MS Windows 7 it will change the the color of the Ubuntu menus and stuff but in some programs it will not have any efect like Firefox, LibreOffice. I did the steps above “loged out and back in” the only thing I can think of is that maybe Ubuntu has a prefech like Windows does and maybe a full restart may work, I’m not sure how to dump the prefech in Ubuntu as in Windows or even if Ubuntu has a simular prefech, my thoughts anyway I’m a linux noob so…

Leave a Reply