Ubuntu – How to disable window minimizing on middle mouse button click in xubuntu

mousexubuntu

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.

Best Answer

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.