Disable desktop switching with the scroll wheel in Lubuntu?
Starting with Lubuntu 14.04 or earlier, the config file format and solution became slightly different from @SWrobel's answer. Then in Ubuntu 17.10 (or earlier), things changed again.
The following instructions apply to the current situation (Ubuntu 17.10 and later).
Remove the following lines from
~/.config/openbox/lubuntu-rc.xml
to disable any scroll wheel desktop switching in a window, with and without modifier keys. (Keep the outer<context …> … </context>
element though.)<context name="Frame"> […] <mousebind button="A-Up" action="Click"> <action name="GoToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="A-Down" action="Click"> <action name="GoToDesktop"> <to>next</to> </action> </mousebind> <mousebind button="C-A-Up" action="Click"> <action name="GoToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="C-A-Down" action="Click"> <action name="GoToDesktop"> <to>next</to> </action> </mousebind> <mousebind button="A-S-Up" action="Click"> <action name="SendToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="A-S-Down" action="Click"> <action name="SendToDesktop"> <to>next</to> </action> </mousebind> </context>
Also remove the following lines to disable any scroll wheel desktop switching on the desktop background:
<context name="Desktop"> <mousebind button="A-Up" action="Click"> <action name="GoToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="A-Down" action="Click"> <action name="GoToDesktop"> <to>next</to> </action> </mousebind> <mousebind button="C-A-Up" action="Click"> <action name="GoToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="C-A-Down" action="Click"> <action name="GoToDesktop"> <to>next</to> </action> </mousebind> <mousebind button="Left" action="Press"> <action name="Focus"/> <action name="Raise"/> </mousebind> <mousebind button="Right" action="Press"> <action name="Focus"/> <action name="Raise"/> </mousebind> </context>
Also remove the following lines to disable any scroll wheel desktop switching while moving a window around:
<context name="MoveResize"> <mousebind button="Up" action="Click"> <action name="GoToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="Down" action="Click"> <action name="GoToDesktop"> <to>next</to> </action> </mousebind> <mousebind button="A-Up" action="Click"> <action name="GoToDesktop"> <to>previous</to> </action> </mousebind> <mousebind button="A-Down" action="Click"> <action name="GoToDesktop"> <to>next</to> </action> </mousebind> </context>
Execute this to let the settings take effect immediately (source):
openbox --reconfigure
cd ~/.config/openbox
cp lubuntu-rc.xml lubuntu-rc.xml.bak
(this makes a backup file so that when you think you've messed it up you could revert it back.)
leafpad lubuntu-rc.xml
and delete the lines which says;
<mousebind button="UP" action="click">
<action name="DesktopPrevious" />
<mousebind button="Down" action="click">
<action name="DesktopNext" />
Log out and Log in back again to see the changes!
if you've messed it up and want to revert it back;
cp lubuntu-rc.xml.bak lubuntu-rc.xml
Answer quoted from Lubuntu docs