Open a Terminal (Applications -> Accessories -> Terminal), or press Alt-F2 to bring up the Run Application dialog.
To put window buttons on the left-hand side, OSX-style, on a single line type:
gconftool-2 --set /apps/metacity/general/button_layout --type string close,maximize,minimize:menu
For the right-hand side, Windows-style (& earlier Ubuntu releases):
gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close
Easy !
But why stop there .. why not experiment and push the boundries of user interface design ? By tweaking these commands, you can also put the close button on a different side to minimize and maximize:
gconftool-2 --set /apps/metacity/general/button_layout --type string menu,close:maximize,minimize
Sure, it will confuse your friends, but who knows, maybe you’ll find it suits you better. I’m trying this variation out for a few days, since my theory is that I’m less likely to accidentally close a window that I intended to minimize/maximize if the close button is kept well away from the others. Chances are I’ll retreat to a more conventional arrangement in a few days, but it’s fun to be able to experiment.
I’ve discovered that an easy GUI way to do this is to use Ubuntu Tweak ( http://ubuntu-tweak.com/ ), under it’s Window Manager Settings section.