Once this is done login as the user whome you want the customization to be done and run the command.sudo apt-get install gconf-editor
Undergconf-editor
change the value for/apps/metacity/general/button_layout
button_layout from
toclose,maximize,minimize:
:minimize,maximize,close