Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Ubuntu's toolbar theme (context) in my application which is black for Ambiance and grey for Radiance. So I have got two icon packs (a white and a black one), but how can I figure out which theme is used by the user? So I'll can write an if statement for it.

share|improve this question
up vote 4 down vote accepted

You can type in terminal:

gsettings get org.gnome.desktop.interface gtk-theme

Or in Python:

from gi.repository import Gio'org.gnome.desktop.interface').get_string('gtk-theme')
share|improve this answer
This is a command or what? Please explain it a little bit. :) – Roberto Jun 26 '12 at 15:45
robin@RobinJ:~$ gsettings get org.gnome.desktop.interface gtk-theme outputs 'Ambiance' in my case. If the user uses Radiance it will output that. – RobinJ Jun 26 '12 at 15:56
Thank you sir! :) – Roberto Jun 26 '12 at 18:56

If you choose a stock icon, it will always use the icon of the theme which was chosen by the user.

Also: Why do the GNOME symbolic icons appear darker in a running application?

share|improve this answer
Yeah, but I need own icons. – Roberto Jun 26 '12 at 15:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.