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.
3 Answers
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.
-
-
@dhblah No, you don't need to reboot. You can check immediately the changes. Aug 19, 2013 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. Dec 16, 2015 at 14:47
-
-
This doesn't work with the default Xfwm4 window manager. You have to switch to metacity to apply
gssetings
– cipricusMar 13, 2020 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.
-
-
1actually, 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.– dhblahAug 13, 2013 at 7:30
-
-
1The question is about middle mouse button click, not about rollup on mousewheel. Aug 19, 2013 at 20:25