Move Minimize, Maximize and Close Buttons (Ubuntu – Gnome)

Everybody has their own preference as to where they like their minimize, maximize and close buttons. These days some even prefer to remove some of these window controls as the way some desktop environments have been developed suggest you don’t really need them.

This post aims to show you how you can put them where YOU want them!

TL:DR …. One liner ….

If you are quite confident changing settings (and recovering if they go wrong), this is most likely the one liner you will need.

  • change the order of minimize, maximize and clase to what you want.
  • the colon represents the middle of the window
    • : right corner
    • left corner :
gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'

Update

I first wrote this post back in April 2012. It still gets a lot of views so I thought I should update it as there have been some changes since Ubuntu 12.04! If you are looking for the Ubuntu 12.04 (and lower) instructions please scroll down!

 

Moving window controls in Ubuntu 12.10 (and later)

Since Ubuntu 12.10, Dconf has been the preferred method of changing the settings related to these specific windows controls. So… what is Dconf you ask? In the words of Gnome

dconf is a low-level configuration system. Its main purpose is to provide a backend to GSettings on platforms that don’t already have configuration storage systems.”

Changing Gsettings via terminal

Firstly, open up a terminal, then type/copy the relevant command from below to change the settings. Obviously change the order of minimize,maximize,close to your desired order:

# move buttons to the right
gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'

# move buttons to the left
gsettings set org.gnome.desktop.wm.preferences button-layout 'minimize,maximize,close:'

After pressing enter your changes should be applied… and you’re done!

The buttons didn’t change…

if for some reason it’s not done, you can also try these commands, they do the same thing but these are an override for gnome shell….

# move buttons to the right
gsettings set org.gnome.shell.overrides button-layout ':minimize,maximize,close'

# move buttons to the left
gsettings set org.gnome.shell.overrides button-layout 'minimize,maximize,close:'

 

Changing Gsettings via GUI

dconf-editorYou will need Dconf-editor to change these settings graphically, type/copy the following command to install it (you may already have it installed):

sudo apt-get install dconf-tools

Now open up dconf-editor through your apps menu or type/copy `dconf-editor` in your terminal.

In the directory tree on the left navigate through the following:

org
└── gnome
 └── desktop
  └── wm
   └── preferences

Now in the panel on the right, locate button_layout and click on the text in the value column.

Change the value from “close,maximize,minimize:” to “:minimize,maximize,close” (obviously without the quotes).

Press enter and the changes should be applied immediately.

The buttons didn’t change…

If nothing has happened, you may be using gnome shell, in which case navigate through the tree again to this destination:

org
└── gnome
 └── shell
  └── overrides

Again try changing the value from “close,maximize,minimize:” to “:minimize,maximize,close” and we should be done!

 

Old method of moving windows controls (Ubuntu 12.04 and lower)

gconf-editor - GNOME configuration editorThe old method uses gconf-editor.

I can’t find gconf-editor?

It may not be installed by default. If not open up a terminal and type/copy in…

sudo apt-get install gconf-editor

Now open up gconf-editor through your apps menu or type/copy `gconf-editor` in your terminal.

In the directory tree on the left navigate through the following:

apps
└── metacity
 └── general

Now in the panel on the right, locate and double click on button_layout

Change the value from “close,maximize,minimize:” to “:minimize,maximize,close” (obviously without the quotes).

Click OK and Ubuntu should apply the changes immediately.

If you think you can do without the maximize button like me, try removing it from the line above and see how you get on!

  • robin wynne-lloyd

    Thanks. I appreciate you taking the time to help people like me.

  • http://www.sudo-juice.com/ Gareth Parmar

    No probs

  • Pingback: How to Change Ubuntu Window Icons (for Unity and Metacity)

  • http://www.facebook.com/rob.stoiber Rob Stoiber

    Thank you for sharing this tip. Love Love Love Ubuntu, and now love it even more with the minimize, maximize, and close buttons on the right side where they belong. Odd that Ubuntu does not set it up that way from the start.

  • Mattias Magnusson

    This did not work for me, it says read only… what to do?

    • sudojuice

      try opening it with ‘sudo gconf-editor’

  • SS

    Thanks a ton… it worked..

  • http://twitter.com/cevarief cevarief

    After applying, i miss the close button. It only appears on maximized window only.

  • http://www.sudo-juice.com/ Gareth Parmar

    That is quite strange. Though I think that could be normal behaviour if you are using unity. What desktop environment are you using?

  • capsx

    hmzzzz

    i changed

    also restarted ubuntu

    but nthg – buttons still in the left corner … :(

    Ubuntu 12.10

  • capsx

    oh: For ubuntu 12.10, gconf-editor won’t work any more.

    use this command:

    gsettings set org.gnome.desktop.wm.preferences button-layout ‘:minimize,maximize,close’

    • Carlton Randolph

      Yes it does… the command should read ‘:minimize,maximize,close,’

    • Akyro

      thank you man! it is working

  • TeacherMac

    Thanks

  • http://twitter.com/pdoh00 Phil Cleveland

    Thank you so much. All steps worked perfectly.

  • Carlton Randolph

    the command should read ‘:minimize,maximize,close,’

    I’ll put this at the top so maybe the author can see it or anyone new coming in that experiences the same problem cevarief had.

  • Martin Rettig

    Thanks dude :) I am right handed not left ;)

  • C. Benjamin Stanfield

    Thanks for the assist. I have a computer science degree, but I’m way to used to Windows doing everything for me. Learning slowly but surely, and things like this really help. Was kinda scary when the close button disappeared, but that tends to happen when one omits spaces (oops).

  • Jagannath Padaki

    i’m usinng Ubuntu 14.04 LTS ”

    I can’t find /apps/metacity/general/button_layout
    metacity” in my

    gconf-editor Please help me sir

    • http://www.sudo-juice.com/ Gareth Parmar

      Sorry for the delay…. I’ve updated the post with some new instructions settings have changed since I originally wrote this.

  • Ross Banick

    This can’t possibly work in Ubuntu 13.10 because “metacity” doesn’t even exist.
    Didn’t anyone ever test this stuff before posting it?

    Nothing will work in Ubuntu 13.10 except getting rid of the Unity interface.

    On Ubuntu 13.10, you can get half the windows to move the window controls using unity tweak tool…..

    $ sudo apt-get install unity-tweak-tool
    $ /usr/bin/unity-tweak-tool
    [unity-tweak-tool]Window Controls->Alignment->Right
    [unity-tweak-tool]Window Manager->Window Snapping->Off
    [unity-tweak-tool]Window Manager->Hot Corners->Off

    But it’s only a partial workaround since they screwed up in Unity in the first place.

  • preeti

    i’m usinng Ubuntu 14.04 Gnome ”

    I can’t find /apps/metacity/general/button_layout
    metacity” in my

    gconf-editor Please help me sir
    I want to change button layout leftside to right side…

    • http://www.sudo-juice.com/ Gareth Parmar

      I’ve just updated this article with the latest instructions. It should help you. Or you can just put the following in a terminal and it should move your buttons….
      gsettings set org.gnome.desktop.wm.preferences button-layout ‘:minimize,maximize,close’