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 gconf-settings.sh 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/gconf-settings.sh (note: you need to be root) and change the line
gconftool -s --type string /apps/metacity/general/button_layout "maximize,minimize,close:"
to
gconftool -s --type string /apps/metacity/general/button_layout "menu:minimize,maximize,close"
Of course, substitute Radiance for Ambiance as necessary.

#1 by Mylan on September 7, 2010 - 9:48 am
Question…when you do this…will it stay in effect after you upgrade again?
#2 by Mike Beach on September 7, 2010 - 10:02 am
Those files are part of the light-themes package. If that package gets upgraded then it will overwrite your changes.
My recent post Move Ubuntu window buttons from left to right and make it permanent
#3 by Nimmy on September 7, 2010 - 10:28 am
I remember you having something like this post on your old, but now dead Kirje.org site.
Thanks for bringing this post back.
#4 by Mike Beach on September 7, 2010 - 2:56 pm
Yes — this time I checked out how to make it more permanent if you change themes.