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
1. Fire up the Configuration Editor from the Overview. Initially the Configuration Editor will look like the above figure
2. Navigate to desktop->gnome->shell->windows
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
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.
Useful Posts
- Which Linux Distro Should a Newbie Choose
- Things Every Linux User Should know
- Gnome 3 on on my PC
- Ambiance GTK3 port ‘Adwance’ gives GNOME Shell users some ubuntu flavour (omgubuntu.co.uk)
Pingback: Gnome Shell Extensions for Fedora 15, Open Suse 11.4, Arch Linux : Ranjith Siji – Programming the Web
Thanks, I needed this!
Glad to be of help 🙂
thanks for this nicely documented tip
Thank you from the bottom of my heart, I was looking for this solutions for hours. 🙂
Really thanks. 🙂
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.
Good to know that it worked for you 🙂
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.
don’t bother I re-installed the whole os everything is ok now and without “-” buttoon
Pingback: 6 GNOME Shell Tweaks « 6ix E11even
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 ?
The change appears once you restart gnome-shell (type ‘r’ and press enter in the run dialog box).
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)
Hi! Thx for the tip!
Still for me, i also had to change the button_layout in gconfig-editor/apps/metacity/general/button_layout !
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?
It’s work.
Alt + F2 don’t work for me. But I shut a process “gnome-shell”.
Thanks a lot!
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.
Command line:
dconf write /org/gnome/shell/overrides/button-layout ‘”close:”‘
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!
Okay, I thought my comment was going to be nested.
Just to verify, I am on the 12.04 LTS with the Gnome shell.
Worked perfectly, didn’t even have to restart the shell like the old method!
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.
The method I posted in my above comment should work for you.
Pingback: How to Move the Close Button in Gnome-Shell 3.4 to the Left Like Ubuntu? « Geekum
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”