Changing mouse button behaviour in Ubuntu

I've just replaced my expensive old mouse after a pathetically short life, and went for the Logitech MX620. I've now discovered that the middle mouse button malfunctions in pretty much all of them, including mine, but that's another story.

Experiences with older Linux distros proved rarely easy to configure hardware, so I plugged in my new mouse with trepidation - but it all worked perfectly, first time. Even the search button - I'm impressed with intrepid.

However, I find I very rarely use back/forward in my browser due to tab usage, so prefer to map the back/forward buttons to page up and page down. Logitech's Setpoint made it fairly easy in Windows, so how hard would it be under linux? Turns out, fairly easy with imwheel:

apt-get install imwheel
mv /etc/X11/imwheel/imwheelrc /etc/X11/imwheel/imwheelrc.bak
cat <<EOF > /etc/X11/imwheel/imwheelrc
".*"
None,           Thumb1, Page_Down
None,           Thumb2, Page_Up
EOF
vi /etc/X11/imwheel/startup.conf

and change IMWHEEL_START=1

The imwheel tool should fire up next time you start up, or you can run it immediately with imwheel.

Comments

William Black

I've just installed Ubuntu. nVidia graphics driver won't install and security updates also refuse to install. I can't say I've ever suffered the same nonsense from Windows. Back I go...

That's pretty odd - sounds like it's just a problem with your package manager. Shouldn't be too hard to fix - once you get it running you won't run into too many problems.

Leave a comment