13

I am wondering why chrome close/maximize buttons are aligned to the left while all the buttons are aligned to the right. The truth is that the chrome buttons are right aligned too when in the chrome settings I tick "use system title bar and borders". But since I dont want the borders, I unticked this option and the buttons got aligned to the other (left-hand) side.

Does anyone know why this is? By the way, I am using cinnamon interface on Ubuntu 12.04.

0

3 Answers 3

23

Chrome draws its own buttons rather than letting the OS do it. There is a setting that allows it to use native window titlebars, but this isn't the most elegant solution to the problem because you lose the benefit (when windowed) of Chrome not having extra space for the titlebar.

Chrome guesses which side to put the buttons on based on various Gnome-related settings, but this doesn't always work properly with Ubuntu's Unity interface.

This article tells how to move them to the desired side. Note that if you sometimes use Gnome-shell rather than Unity, this has the potential to affect how all title bars appear in your Gnome-shell sessions.

To quote:

To move window buttons of Google Chrome to the right under Ubuntu 12.10 or older, open the terminal and issue this command:

gconftool-2 --set /apps/metacity/general/button_layout --type string ":minimize,maximize,close"
10
  • Ubuntu 13.04 doesn't use Metacity.
    – user85164
    Apr 29, 2013 at 4:39
  • 2
    Frank, Ubuntu hasn't used metacity for a long time, but that's not relevant - Chromium/Chrome still looks for that gconf2 setting under /apps/metacity/general. Apr 29, 2013 at 5:01
  • 1
    Also, dconf is not gconf-2. These should go into gconf-2 settings, not dconf. Apr 29, 2013 at 6:09
  • 3
    Ditto @Achim A. You just made a small mistake, as minimize follows close in other applications it should be: gconftool-2 --set /apps/metacity/general/button_layout --type string "close,minimize,maximize:"
    – metakermit
    Jul 21, 2013 at 11:14
  • 1
    gconftool-2 --set /apps/metacity/general/button_layout --type string "close,minimize,maximize:" worked for me on Ubuntu 15.04 and Chromium. Sep 17, 2015 at 17:45
5
+200

In the settings from Google Chrome, in Appearance, you have to choose GTK+theme. You also have to enable 'Use system title bar and borders.' To make it work, you have to logout, and login.

Now you can test it with the Unity Tweak Tool (You can download that program from the Ubuntu Software Center).

In Unity Tweak Tool, choose Window Controls. Change Alignment from Left to Right, or from Right to Left. The title bar form Google Chrome will change immediately.

The reason why it works, I guess, is because by default Google Chrome doesn't call the gtk-window-decorator that comes with the Compiz window manager. If you install the CompizConfig Settings Manager (from the Ubuntu Software Center), you will see that the Windows Decoration module uses the program /usr/bin/gtk-window-decorator.

So, this works problaby only when you're running a default Ubuntu 13.04 setup. That means: the Compiz window manager and a GTK+ enabled theme (Ambiance for example).

3
  • Can someone confirm this works? (It's not that I don't believe you it's just I'd like confirmation that this will indeed work for other users before I award the bounty). Apr 29, 2013 at 20:01
  • @JorgeCastro This appears to work on Chromium 25 in Ubuntu 12.10.. I don't need to specify a GTK+ theme though...
    – Seth
    Apr 29, 2013 at 20:07
  • 1
    @Seth: You are right. It works when you set 'Use system title bar and borders' in Chrome. You don't have to set 'Use GTK+ theme.' But if you do so, also the background of the 'tabs bar' in Chrome has the same colour als the 'window title bar' from Compiz.
    – user85164
    Apr 29, 2013 at 20:47
0

Choose The GTK+ Theme in chrome Just right click on the title bar and choose GTK+ Theme.

You must log in to answer this question.

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