If you got a new mouse and wanted to change the scroll wheel settings. That’s when you noticed there’s no such option in Unity / GNOME Control Center.
Under Linux, the easiest to use is “imwheel”, a command line tool that can be used to tweak the mouse wheel behavior and which, among others, can change the scroll speed of the mouse wheel.
sudo apt-get install imwheel
gedit ~/.imwheelrc
And in this file, paste the following:
".*"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
The first (“.*”) line from the code used above represents is used to specify in which applications to use those settings. “.*” means everywhere, but you can also apply application-specific settings by changing “.*” to the window name (and add multiple application-dependent settings). Run “man imwheel” for more information.
And finally, the last 4 lines in the code above are there to allow Ctrl / Shift with mouse scroll wheel up / down to work (for instance, to allow zooming in on a webpage in the web browser, etc.), which is the default behaviour.
- this will most probably not fix issues such as very fast scrolling, if you encounter such an issue, you can try unplugging and then plugging the mouse back;
- if you only want to change the scroll wheel speed in Firefox and Chrome, you can do this from within the app or using an extension: Firefox | Chrome, etc.