Verified on Ubuntu Desktop 12.04.
Move window buttons to upper-right corner:
gconftool -s /apps/metacity/general/button_layout -t string menu:minimize,maximize,close
Move window buttons to upper-left corner:
gconftool -s /apps/metacity/general/button_layout -t string close,minimize,maximize
Only show close and minimize buttons at upper-left corner:
gconftool -s /apps/metacity/general/button_layout -t string close,minimize
(You can maximize window by double-clicking title-bar)
You have to use current user to run this command, or you will get "No D-BUS daemon running" error. For example, if you login desktop as user "john", you will find a .dbus folder owned by john in $HOME of user john.