87

Is there a way to the switch gnome-shell window buttons to the left? I've gotten so used to them being on the left that them being on the right has thrown me way off.

(gnome shell has them defaulted to the right corner)

3
  • 1
    You've only said left. Apparently, they're on the left side and you want them on the left side. Nov 12, 2011 at 1:42
  • 3
    Leave the on the left. They're just fine there, since if you'd look at hot map of the screen, you'd see that mouse pointer is more often located on the left part of the screen, not on the right — it means it'd track less to the buttons.
    – poige
    May 21, 2013 at 3:55
  • @Poige isn't that just because that's where the buttons are? On Windows, surely the map shows it more on the right?
    – Tim
    Jul 14, 2014 at 20:55

11 Answers 11

71

For Ubuntu 12.04 and newer

You will need dconf-editor, which is part of the dconf-tools package. Install it first:

dconf-tools

Start dconf-editor:

Alt+F2 → dconf-editor

Go to org → gnome → shell → overrides → button layout. Change it to close,minimize,maximize:

No need to restart the shell.

Note: This also changes the cancel button in the overlay mode.

For 13.10 and higher

As per a few users, it may require a shell restart. Thank you all for pointing that out.

For 15.10 and higher

The schema is now org.gnome.desktop.wm.preferences as per this comment.

7
  • 1
    close,maximize,minimize:menu worked for me too. Oct 9, 2013 at 23:16
  • 1
    This doesn't work on 13.10 ubuntu-gnome-desktop
    – Alvar
    Nov 11, 2013 at 11:36
  • 2
    @Alvar: use gnome-tweak-tool and see if it helps you. There is an option available to switch windows as far as I remember.
    – Ubuntuser
    Nov 12, 2013 at 8:27
  • 1
    had to restart gnome-shell 3.10 in ubuntu 14.04 for the settings to be applied
    – mikakun
    May 16, 2014 at 12:42
  • 7
    For Ubuntu 15.10, in dconf-editor, the schema is: "org.gnome.desktop.wm.preferences"
    – JDS
    Jan 30, 2016 at 18:28
62
+50

While technically not gnome-shell, if you're using gnome-flashback or gnome-flashback-no-effects the key is located at:

org -> gnome -> desktop -> wm -> preferences -> button-layout  

Changing it to:

close,minimize,maximize:  

should give you what you want.

You can use the command:

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

to get this done quicker.

4
  • For Google Chrome under gnome shell, I didn't have the metacity>button-layout key entry, This code worked for me: gconftool-2 --set /apps/metacity/general/button_layout --type string "close,minimize,maximize:"
    – Julio
    Jan 19, 2014 at 2:37
  • 3
    This was the location for standard Gnome 3 on my installation as well. (GNOME Shell 3.18.4 / Ubuntu 16.04)
    – Cybolic
    May 27, 2016 at 15:31
  • the simplest and quickest way is to use the command,it worked for me flawlessly in ubuntu 18.04 including for chrome app that I am using to read SO right now,the effects took place in real time. Sep 6, 2019 at 15:06
  • Love the best "gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:' "
    – Nam G VU
    Sep 7, 2020 at 16:49
31

For 10.10

The more simple way to do that is: Alt+F2gconf-editor

Navigate to apps → metacity → general, and double click on the entry: button_layout, then enter close,minimize,maximize:. You can also use spacer at some point to add a space.

For 11.04 and 11.10

Alt+F2gconf-editor

Navigate to desktop → gnome → shell → windows, and double click on the entry: button_layout, then enter close,minimize,maximize:. You can also use spacer at some point to add a space.

3
  • 5
    If you want the buttons on the left, then the colon needs to be at the end of the list instead of the beginning.
    – cscarney
    Jan 23, 2011 at 22:43
  • on 11.10, I had to make the change in desktop --> gnome --> shell --> windows. To restart gnome shell, press Alt-F2, and type rt.
    – eug
    Oct 30, 2011 at 0:27
  • The approach for 10.10 also works for 12.04, at least when gnome-classic is being used as the session manager.
    – Bart
    Nov 20, 2013 at 9:19
20

If you're using Gnome Shell and you want the window buttons on the left, use this command:

dconf write /org/gnome/shell/overrides/button-layout "'close,minimize,maximize:'"

Then restart the shell if needed: press Alt+F2, type r and press Enter.

4
  • 1
    It is in gnome-tweak: Advanced Settings (application) > Shell > Arrangement of Buttons > pick all
    – SeanJA
    May 11, 2012 at 13:55
  • 5
    Except there it won't let you change them to the left, which is what OP was asking for.
    – Sean
    Aug 10, 2012 at 15:28
  • 1
    This does't work for Ubuntu 12.04
    – BuZZ-dEE
    Sep 27, 2012 at 16:14
  • @BuZZ-dEE: Didn't work in 13.04 either, so I fixed it by adding explicit quotes as required by GVariant format. Also, the shell didn't need to be restarted for me (Gnome 3.4). Perhaps this was only needed in earlier versions of Gnome 3. Jun 26, 2013 at 0:27
14

If you have installed Ubuntu Tweak, go to Window Manager and change the Place from left to right or vice versa. This will change all windows' Titlebar button layout, not only gnome shell.

alt text

10

Gnome version 3.10, Using 13.04 and 13.10

If you upgrade Gnome to 3.10 you may notice a change in window decorations.
Gnome version 3.10 is moving towards Client Side Decorations(CSD for short) in all of the Core apps.

In these apps the close button is integrated into the program window and does not use the normal window decorations.

enter image description here

As Web Upd8 states:

Another pretty major change in the latest GNOME 3.10 is the introduction of "header bars" or "client side decorations". These decorations use the GTK+ toolkit and theme engine:

As you can see, the close button is now displayed inline with the toolbar which saves spaces but unfortunately it also creates an even bigger discrepancy between GNOME core apps and the other applications, because only the core GNOME apps use these client side decorations.


Some applications that have CSD may respect the environment variable GTK_CSD=0 (a variable used to "try out" CSD in eariler gnome versions with =1) for more information about Environment variables: https://help.ubuntu.com/community/EnvironmentVariables especially the section: Launching desktop application with an environment variable to experiment with programs adding something like this to a launcher:

Exec=env GTK_CSD=# gedit

substuting "#" with 1 or 0 for on and off, and gedit with program of choice

However it seems with Nautilus in 3.10 the variable Does not work.


Simply put:

In 3.10 it's going to have a close button at the top right no matter what[...]


So what can you do?

  • Stay at an older version of Gnome. Development is still progressing and the Gnome version in the repositories works just fine. It may be likely that options will be added in the future.
  • Replace Nautilus with Nemo. Form most cases Nemo looks and acts like Nautilus:

    enter image description here

    To Install:

    1. Open Terminal put the following command:
    2. sudo apt-get install nemo
    3. Make nemo the default file browser
5
  • What about editing Nautilus' source code and re-compiling?
    – Seth
    Oct 5, 2013 at 18:43
  • 1
    The nasty part is that not only nautilus has the big close button on the right side but more applications like Clocks, Music etc. Oct 7, 2013 at 17:41
  • What about Ubuntu-gnome 13.10? How do I fix the buttons on the left side there?
    – Alvar
    Nov 11, 2013 at 20:06
  • This one is about gnome 3.10, or the "client side decorations"
    – Mateo
    Nov 11, 2013 at 23:26
  • 1
    So you can't use client side decorations/unmodified GNOME and move the window buttons? :(
    – Vincent
    May 27, 2015 at 6:39
8

In Ubuntu 18.04 and later there are multiple options:

  1. You can now just install GNOME Tweak Tool (which is a helpful tool anyway) from the Software Center or by running in a terminal:

    sudo apt install gnome-tweaks
    

    and in the menu Window Titlebars change Placement to Left.

    Tweaks

  2. Dconf-editor/tool change still works:

    /org/gnome/desktop/wm/preferences/button-layout
    

    set to close,minimize,maximize.

  3. And the terminal option, too:

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

The workspace window view of gnome shell uses the same button layout as the window manager (albeit only for the close button). (relevant code)

If you set your close window buttons to the left using gconf, the close button on the window preview in workspace view will also display on the left.

Using gconf-editor, change /desktop/gnome/shell/windows/button_layout to close,minimize,maximize: and re-login to see the change.

5
  • Yep, I can confirm that that is exactly how I have that setting in my gconf, but the close button is still on the right. Maybe it's a bug. Note that it was working properly until I installed some gnome-shell theme extension. I'm betting that relevent js file got overwritten. I'll look into it. Thanks.
    – Gaidin
    Oct 20, 2011 at 14:04
  • The workspace.js file in my /usr/share/gnome-shell/js/ui/ folder is different than the one you linked me to, but it still contains that same function, albeit in a different place. Doing a direct replace of the workspace.js file with the one in the bzr repository you linked to just breaks gnome shell. Something in the theme extention must be making some assumptions.
    – Gaidin
    Oct 20, 2011 at 14:18
  • I expect we'll see many problems with shell extensions that just monkey patch the UI functions and lead to confusing results. I'm pretty sure what you are seeing is an extension that positions that button. Can you provide a link to the theme extension please? Edit: Also, which version of ubuntu are you using, and is the gnome-shell package from that version's ubuntu repository? Oct 20, 2011 at 16:35
  • I'm using 11.10, and I'm using the gnome shell extension repository from here (webupd8.org/2011/10/official-gnome-shell-extensions.html). THe ppa is here: ppa:webupd8team/gnome3
    – Gaidin
    Oct 20, 2011 at 18:53
  • 1
    I've also just discovered that it's not the theme extension that's causing the problem is the Native Window Placement extension. Thanks for sending me down the right path. I'll submit a bug report to the extension developer.
    – Gaidin
    Oct 20, 2011 at 18:54
4

Do what hrhnick said, except use this command instead:

gconftool-2 -s /desktop/gnome/shell/windows/button_layout -t String minimize,maximize,close:" where "minimize,maximize,close:

Then hit Alt+F2 and type

gnome-shell --replace

and hit enter

4

17.04 and 17.10 (Gnome 3.22)

The beginning is as in this answer: https://askubuntu.com/a/113995/286561

You will need dconf-editor, which is part of the dconf-tools package. Install it first:

dconf-tools

Start dconf-editor:

Alt+F2 → dconf-editor

But the key is /org/gnome/desktop/wm/preferences/button-layout, the default is: appmenu:cloe, I've changed it to close,minimize,maximize:appmenu. (appmenu doesn't seem to have an effect.)

enter image description here

I've you want to do it on the terminal you can do it as pointed out in this answer: https://askubuntu.com/a/377811/286561

gsettings set  org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'
0
3

This command should work: gconftool-2 --set /apps/metacity/general/button_layout --type string "menu:minimize,maximize,close" (Assuming you want to move them from left to right, which is what I interpreted from your question...assuming move from left to left was a typo :-) ).

1
  • Actually, I wanted to move them from right to left.
    – jfmessier
    Dec 14, 2011 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .