Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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: http://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.

share|improve this answer
    
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

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.

share|improve this answer
    
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

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'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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