It's very annoying especially when closing tabs in a browser. If a middle mouse button is pressed to often then you accidentally minimize a browser's window. That's not ok.


To disable window minimizing on middle mouse button, run the following command in terminal:

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

To revert it back, run:

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

To disable browser's tab to close on middle click, see: https://superuser.com/questions/113048/how-do-i-prevent-firefox-from-closing-tabs-on-middle-click

You can also to use xbindkeys. To install it, run in terminal:

sudo apt-get install xbindkeys

Then the next two lines must be placed in ~/.xbindkeysrc file:

""    #don't do nothing
b:2   #mouse button 2

And finally, you must to clear current bindings with killall xbindkeys and then just execute xbindkeys to restart it.

  • should I reboot after that? – dhblah Aug 15 '13 at 10:54
  • @dhblah No, you don't need to reboot. You can check immediately the changes. – Radu Rădeanu Aug 19 '13 at 20:23
  • @RaduRădeanu Nope.. the first of your suggestions does not work immediately. Some kind of restart or other action seems to be required. – donquixote Dec 16 '15 at 14:47
  • After logout + login it works. – donquixote Dec 16 '15 at 14:52
  • This doesn't work with the default Xfwm4 window manager. You have to switch to metacity to apply gssetings – cipricus Mar 13 '20 at 10:56

To expand on Radu's answer, for those of us who actually want the windows to minimize instead of be sent to the background, this works:

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

To disable the window rollup on mousewheel feature: Open the Settings Manager Scroll down to Other and select Settings Editor

Select the xfwm4 option, and uncheck the mousewheel_rollup option. This should stop window shading when you accidentaly use your mousewheel near the titlebar.

  • should I restart after that? – dhblah Aug 13 '13 at 7:28
  • 1
    actually, it prevents rollup when i scroll up near the title bar, that is nice feature, but I need to disable windows minimize on middle mouse button clicked. – dhblah Aug 13 '13 at 7:30
  • There should be a different setting for middle mouse button click. – dhblah Aug 13 '13 at 7:31
  • 1
    The question is about middle mouse button click, not about rollup on mousewheel. – Radu Rădeanu Aug 19 '13 at 20:25

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.