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 need to tweak my gtk2 theme. Currently I edit the gtkrc file, then go to System>Appearance>Customise, change the widgets to something else and then back again to see the effect.

This is slow and clumsy. Is there a command or something to trigger all gtk2+ windows to udpate? Or, is there a GUI editor where the results can be previewed immediately? (like firebug for gtk2?)

share|improve this question

I've used an app before that is like firebug for GTK, called Parasite but it can't update the widgets in the sense you are suggesting.

You could try something like:

sudo compiz --replace &

if you're using compiz, that is.

Another thing you could try would be to put the commands to change the theme in a script, and assign it to a keyboard shortcut. That way you could change your .gtkrc, hit the keyboard shortcut and watch as you save a minute of your life.

I did a quick google search and found this thread on ubuntu forums. The script would look something like this (assuming the theme you want to end up with is Ambiance, and the icon theme is ubuntu-mono-dark):


#Change GTK theme:
gconftool-2 --type=string -s /desktop/gnome/interface/gtk_theme Clearlooks
gconftool-2 --type=string -s /desktop/gnome/interface/gtk_theme Ambiance

#Change Metacity theme:
gconftool-2 --type=string -s /apps/metacity/general/theme Clearlooks
gconftool-2 --type=string -s /apps/metacity/general/theme Ambiance

#Change Icons:
gconftool-2 --type=string -s /desktop/gnome/interface/icon_theme gnome
gconftool-2 --type=string -s /desktop/gnome/interface/icon_theme ubuntu-mono-dark

You may still need to close and re-open applications for the changes to take affect.

share|improve this answer

Try The Widget Factory (in ubuntu repos). Install, then run with twf

It shows all the different widgets and you can select a theme from the menu. It's faster than the full theme change.

share|improve this answer

If you're trying to change something on the panels, you can do:

$ killall gnome-panel

for Ubuntu or

$ killall xfce4-panel

for XUbuntu.

I think Gnome will immediately restart the panels, but in Xfce, you'll have to restart them again:

$ xfce4-panel

I'd imagine it'd be the same with any other "widget" you're working on. Kill the process and restart it.

share|improve this answer

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.