22

I am using the Chromium web browser, and standard gnome (i.e. not unity). Chromium (like lots of things) has many tabs, and allows you to middle click on a tab to close the tab. But if I middle click on the blue part outside the tab, then it lowers the window underneath all the other windows. However I often find myself attempting to middle click on a tab to close it, and accidentally middle clicking outside the tab (which is the title bar in chromium), and hence accidentally lowering the window.

How do I disable this "middle click to lower window" behaviour?

  • Are you using GNOME Shell, GNOME Classic, or GNOME Classic without effects? I'm asking because each of these uses a different window manager, and the setting you want is attached to the window manager. – Dylan McCall Jun 10 '12 at 23:42
9

For 14.04 (Trusty Tahr) it could be disabled with the command:

gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'none'

Restore original state:

gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'lower'

Also, the following variants are possible:

gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'toggle-shade'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'maximize'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'toggle-maximize-horizontally'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'toggle-maximize-vertically'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'minimize'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'shade'
gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'menu'

But the bug is still there, the Google Chrome option in Setting "Use system title bar and borders" could lower the impact...

  • I was curious what the '*shade' options do, so I tried them out on Ubuntu 14.04. 'shade' is "outside of valid range", and 'toggle-shade' seems to have no effect. Drat the luck! They sounded interesting. :) – CivMeierFan Jul 18 '16 at 21:14
8

You can install Ubuntu Tweak and there should be a setting for it.

You can also get at it through gconf-editor. Go to apps > metacity > general > action_middle_click_titlebar and set it to "none". This value, "none", is case sensitive.

  • 2
    Your solution works (also for Unity) but it seems Google Chrome is a special case and has a bug. It ignores the middle mouse system settings (all other programs are fine) for the bar where the tabs are located. I will try to make a bug report at chromium :-/ – therealmarv Jun 11 '12 at 10:28
  • @therealmarv Good catch. I can confirm this behavior on my machine. A bug report seems to be in order. – Kris Harper Jun 11 '12 at 10:57
  • 1
    here is my bug report on this: code.google.com/p/chromium/issues/detail?id=132061 – therealmarv Jun 11 '12 at 14:23
  • 2
    and 5 years later, this bug is still a thing -_- – Alice May 4 '17 at 12:41
3

I'll assume that you are using GNOME Shell. You can change this setting using a tool called gnome-tweak-tool, which appears as "Advanced Settings" in the activities overview.

First, install gnome-tweak-tool using Software Center.

Once it is installed, go to the Activities overview, type "Advanced Settings," and open the application that appears.

You can configure lots of things in this tool, but the one you're interested in is in the Windows section on the left side. Click that, and change "Action on title bar middle-click" to whatever you want.

gnome-tweak-tool's window settings panel

3

This works for Chromium:

gconftool-2 --type string --set /apps/metacity/general/action_middle_click_titlebar "none"
  • On my machine (regular Ubuntu 16.04), this is under a different setting. For me that would be gconftool-2 --type string --set /org/gnome/desktop/wm/preferences/action_middle_click_titlebar "none". – Hassan Jul 28 '16 at 22:18
  • There's lot of weird invisible characters in the command above so it will fail. The command without these weird characters is: gconftool-2 --type string --set /org/gnome/desktop/wm/preferences/action_middle_click_titlebar "none" – laurent Aug 17 '16 at 9:09
  • 1
    It might be better to just use gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar none. Note that you may need to log out for Chrome / Chromium to notice the change. – Kevin Sep 13 '16 at 20:36
  • Minor correction: Chrome (53.0.2785.113) respects the setting, but Chromium (52.0.2743.116) doesn't for some reason. – Kevin Sep 13 '16 at 20:43
1

In case anyone wants to turn this on, there's a bug affecting it on recent Cinnamon. See https://bugs.chromium.org/p/chromium/issues/detail?id=777821.

The work around: Manually create a .config/gtk-3.0/settings.ini with:

[Settings]
gtk-titlebar-middle-click=lower

Then restart chrome with chrome://restart

0

As of Ubuntu 18.04.1 LTS this problem is solved using $ gnome-tweaks window/middle and just clicking to none.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.