Geekum

A blog about computers and me (and then some)

How to Move the Close Button in Gnome-Shell to the Left Like Ubuntu?

[note: Users of Ubuntu 12.04 with Gnome 3.4 installed please check the updated post for the method that will work for you]


You might have installed Adwance GTK3 theme and looking forward to adding this last Ubuntu touch. Or maybe you simply like the buttons on the left. This post is for you. The methods mentioned here are very simple and harmless. You can change back to the default when you feel like it.

This change can be performed in two simple steps
Step I: Set the key value in gconf
Step II: Restart Gnome-Shell to Apply the Changes

Step I: Set the key value in gconf

This step can be performed in two ways. Either from the terminal, or using the gconf-editor tool. The terminal method is very straightforward and fast, while the gconf-editor method has a GUI. Choose either one.

  • Using gconftool (terminal)

This is as simple as it gets. Fire up the terminal and run the following command to move the close button to the left
gconftool --type string --set /desktop/gnome/shell/windows/button_layout "close:"
Now the key has been set. Proceed onto the next step.

  • Using gconf-editor (GUI)

This is a very standard utility for editing the gconf registry and is a must have for any power user. If you installed a standard1 distribution, chances are that you already have it installed. If you don’t have it, install it from the repositories. 2

Follow the following steps

Configuration Editor

Initial Configuration Editor

1. Fire up the Configuration Editor from the Overview. Initially the Configuration Editor will look like the above figure
The Initial Values

The Default Values

2. Navigate to desktop->gnome->shell->windows
Configuration Editor - Values Changed

Configuration Editor – Values Changed

3.Edit the key button_layout and give it the value close:

The correct key value has been set. You may close the configuration-editor and move onto the next step.

Step II: Restart gnome-shell to Apply the Changes

In the first step, the gconf was edited and the correct key value was set. To see the effect, you need to restart gnome-shell. Just fire up the run dialog (press alt+f2) and type r

Gnome-Shell Run Dialog

Restart Gnome-Shell

Now press return (enter) and the gnome-shell will restart. You should see all the close buttons on the left.

To reverse the effect, run
gconftool --type string --set /desktop/gnome/shell/windows/button_layout ":close"
or change the value of button_layout to “:close” using the gconf-editor and again restart gnome-shell.
You might have guessed already that “:” represents the space (like a separator) and “close” represents the button. Their relative positions in button_layout value decide how the windows are drawn.

Single Post Navigation

31 thoughts on “How to Move the Close Button in Gnome-Shell to the Left Like Ubuntu?

  1. Pingback: Gnome Shell Extensions for Fedora 15, Open Suse 11.4, Arch Linux : Ranjith Siji – Programming the Web

  2. chris4585 on said:

    Thanks, I needed this!

  3. thanks for this nicely documented tip

  4. Thank you from the bottom of my heart, I was looking for this solutions for hours. 🙂
    Really thanks. 🙂

  5. I can’t seem to find gconftool while using Fedora. Any ideas?

    • Try searching for gconftool-2 instead. Or perhaps you would find gconf-editor to be a better option.

      • @Pawan Hegde
        My goal is to be able to move the titlebar buttons to the left, but also to do it via CLI. That is why I want to install gconftool. I want to use your instuctions above with gconftool to be able to configure new Fedora installs very quickly. I already have in my newly-installed-distro script commands to ‘yum install …’ and also commands to ‘ln -s …’ to link various config files into my home directoy (from a mounted partition which isn’t formatted when I install Fedora). My script does dozens of changes so far, and one thing I’m missing is a way to move the titlebar menus to the left.

        These are all the packages I can see (after enabling RPMFusion free & non-free):
        #
        [root@localhost ~]# yum list gconf*
        Loaded plugins: langpacks, presto, refresh-packagekit
        Installed Packages
        GConf2.i686 2.32.3-1.fc15 @koji-override-0/$releasever
        GConf2-gtk.i686 2.32.3-1.fc15 @koji-override-0/$releasever
        Available Packages
        GConf2-devel.i686 2.32.3-1.fc15 fedora
        gconf-cleaner.i686 0.0.3-2.fc15 fedora
        gconf-editor.i686 3.0.0-2.fc15 fedora
        gconfmm26.i686 2.28.2-2.fc15 fedora
        gconfmm26-devel.i686 2.28.2-2.fc15 fedora
        #

        Do you have any advice? I thank you for your time.

      • Actually, ignore my earlier comment from an hour ago. I see that I have the ‘gconftool-2’ package installed! Thanks for suggesting to look for that.

  6. It ruined my Gnome 3.2 I used the first method and now when I login with the Gnome option
    it loads slow. and then goes to a stupid interface without anything no network manager or application totally useless . and I have to restart using the hardware button . I don’t know how can I fix this . I’m back to Unity 😦 I removed gnome-shell from software center and install it again the same thing.

    • Changing window decorations should not ideally affect other applications. Did you install or upgrade/downgrade an application when you applied this trick?

      gconftool –type string –set /desktop/gnome/shell/windows/button_layout “:close”
      Will revert it back to the standard look.

      Plus, I find purging packages rather than removing a sure way of getting a clean slate, since it also clears the configurations.

  7. Pingback: 6 GNOME Shell Tweaks « 6ix E11even

  8. I tried this and does not work for me.. I changed like that and still the buttons are on the right side..
    gconf-editor doesn’t doesn’t effect on what i change on it.. why is that ?

  9. I restarted gnome-shell a million times, it’s not that. I want to say that gconf-editor, no matter what changes i make i gconf-editor … there is no effect or after effect.. the problem is in gc i think..
    what do u think ?

    • I can’t think of anything that may be causing this. Did the method using gconf-editor (terminal) also fail?

      (I’m exxtremely sorry for replying this late. I completely missed this comment)

  10. Jillian on said:

    Hi! Thx for the tip!

    Still for me, i also had to change the button_layout in gconfig-editor/apps/metacity/general/button_layout !

  11. I notice that Google Chrome still have all the buttons on the left and Gnome on the right. How do I change the ones on Chrome?

  12. It’s work.

    Alt + F2 don’t work for me. But I shut a process “gnome-shell”.

    Thanks a lot!

  13. Alan Smithee on said:

    In Ubuntu 12.04, using Gnome Shell 3.4.1, there is no /desktop/gnome/shell folder in gconf-editor. I can add it via gconftool on the command line, but Gnome Shell ignores whatever is there regardless. Thoughts?

    • For Ubuntu 12.04, use dconf Editor (sudo apt-get install dconf-tools)
      Change org->gnome->shell->overrides->button_layout from :close to close:

      Let me know if it works for you.

  14. Different person here, but I’m trying it now. It’s set as:

    :minimize,maximize,close

    Changing it to:

    close,minimize,maximize:

    ———-
    It worked. My computer froze upon restarting the GUI, but it’s been doing that upon other visual changes too.
    Thank you so much! I just couldn’t get used to them being on the right again!

  15. Ben on said:

    Sigh… I was running 11.10, then I updated to 12.04 LTS with the Gnome shell. I love Gnome 3, but I can’t get the darn button on the left. I was able to do so using gconf editor in 11.10, but I can’t get it in 12.04 LTS. Help! I would really like to have the buttons on the left.

  16. Pingback: How to Move the Close Button in Gnome-Shell 3.4 to the Left Like Ubuntu? « Geekum

  17. In Fedora Core 17, the gconf solution doesn’t work as most of Gnome Shell configuration keys have been moved elsewhere. The following command worked for me:

    gsettings set org.gnome.shell.overrides button-layout “close”

    If you want the minimize and maximize buttons too, then try this:

    gsettings set org.gnome.shell.overrides button-layout “close,minimize,maximize”

Leave a reply to Ben Cancel reply