Move Ubuntu window buttons from left to right (and make it permanent)

I thought I had posted this before, but my mistake.

Starting with Ubuntu 10.04, two new themes were introduced: Ambiance and Radiance. These two themes both feature the window buttons (minimize, maximize, close) on the left side instead of the right. Ambiance is the default theme on a new install, but if you do a dist-upgrade to 10.04, you will still get the buttons on the right.

If you were not used to it (as I wasn’t), these can be a pain. You can always switch themes, but if you really like the color scheme, you might just want to fix the button position.

Fortunately, there’s a simple command that, when run from the command line, can reset the buttons to the more-typical right-side position.

Simply run Applications > Accessories > Terminal and paste in this command:

gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close

That will stay in effect as long as you don’t change themes. If you do change themes, you can run it again, no big deal.

UPDATE: At some point the themes were changed and the following no longer works because the file doesn’t exist. I may look into this at some point in the future, but I would appreciate feedback from readers on how to change the setting on a permanent basis.

If you’re looking to make the change permanent, edit the file /usr/share/themes/Ambiance/metacity-1/ (note: you need to be root) and change the line

gconftool -s --type string /apps/metacity/general/button_layout "maximize,minimize,close:"


gconftool -s --type string /apps/metacity/general/button_layout "menu:minimize,maximize,close"

Of course, substitute Radiance for Ambiance as necessary.