Howto: Intellimouse Explorer with Ubuntu Dapper
For many years now I’ve been a huge fan of Microsoft’s input hardware: I love the Natural Keyboard and their wireless mice. When I bought a new Microsoft Wireless Intellimouse Explorer near the beginning of the year, however, I wasn’t at the time expecting to switch to Linux so soon.
But when I did switch, I realised that the tilt wheel (horizontal scrolling) as well as the thumb buttons on the mouse didn’t work out-of-the-box. And the numerous guides I tried weren’t able to help me get them to work, so eventually I resigned myself to not having the use of the buttons I paid for.
Yesterday I stumbled upon a blog post which did have information which finally got my buttons working, and now I’m posting a simplified version of that for other Dapper users who might be using a similar mouse.
Note: This guide is meant for Ubuntu Dapper, but will probably work with any other Linux distro using Xorg 7.0 or above, with evdev enabled. If you’re not on Dapper you might be better off clicking the link above for more detailed information, but this guide will assume that you have everything that’s already available in a Dapper installation.
Goal
Primarily, to get the tilt wheel and thumb buttons working in Firefox, and secondarily in other applications.
Before you begin
Make sure your mouse is plugged in. It should already be working fine at this point, apart from being unable to use the tilt wheel and the thumb buttons.
Configure xorg.conf
Open a terminal and type:
cat /proc/cat /proc/bus/input/devices
You should see a section that looks like this (emphasis mine):
I: Bus=0003 Vendor=045e Product=008c Version=0057
N: Name="Microsoft Microsoft Wireless Optical Mouse� 1.0A"
P: Phys=usb-0000:00:1d.0-1.2/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse0 event3 ts0
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=1c3
Now type
sudo gedit /etc/X11/xorg.conf
(Replace ‘gedit’ with your text editor of choice, be it kate, nano, vi or whatever.)
After the existing InputDevice sections, add this:
Section "InputDevice"
Identifier "Microsoft Intellimouse"
Driver "evdev"
Option "Device" "/dev/input/event3"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7 5 4"
Option "Emulate3Buttons" "no"
EndSection
(Replace event3 with the appropriate value taken from the earlier /proc/cat/ output.)
Now look near the end of the file for the ServerLayout sections. Above the existing InputDevice lines for mice, add this one:
InputDevice "Microsoft Intellimouse" "CorePointer"
This should result in a ServerLayout section that looks similar to this:
Section "ServerLayout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Microsoft Intellimouse" "CorePointer"
InputDevice "Configured Mouse"
EndSection
Install and configure imwheel
Exit your text editor and return to the console. At this point if you were to restart your X server, you should find your tilt wheel already working (though perhaps not exhibiting the desired behaviour). Now it’s time to get the thumb buttons working.
Type this to install imwheel:
sudo apt-get install imwheel
Now, if you’re using Gnome, go to System > Preferences > Sessions, go to the Startup Programs tab and click the Add button and type in:
imwheel -k -b "89"
If you’re using KDE, create a new file ~/.kde/Autostart/imwheel and save this text in it:
#!/bin/sh
imwheel -k -b "89"
Then make the file executable:
chmod +x ~/.kde/Autostart/imwheel
Now, create a new file ~/.imwheelrc and put this in it:
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right
"(null)"
None, Up, Alt_L|Left
None, Down, Alt_L|Right
Configure Firefox
The default behaviour of Firefox for the tilt wheel is to use it to move back and forward in your browser history. This is already handled by the thumb buttons, and what we really want is proper horizontal scrolling anyway.
Open a new tab or window in Firefox (so you can go back to this page easily) and type this URI in the location bar:
about:config
Look for the setting mousewheel.horizscroll.withnokey.action and set the value to 0.
If you want to adjust the speed of the scrolling, increase or decrease the value of mousewheel.horizscroll.withnokey.numlines to your liking.
Restart X
The only thing left to do now is to log out of your session, and restart your X server by pressing Ctrl-Alt-Bksp. Log back in and you should be able to use your tilt wheel and thumb buttons in Firefox and various other programs.
Application Support
I tested a few applications to see how well this solution works.

- Desired behaviour is exhibited (back/forward in history, or horizontal scrolling)

- No apparent response

- Application responds but with unexpected or undesired behaviour
| Application | Thumb buttons | Tilt Wheel |
|---|---|---|
| Epiphany | ![]() |
![]() |
| Opera | ![]() |
![]() |
| Evince | ![]() |
![]() |
| OpenOffice.org Writer | ![]() |
![]() |
| Firefox | ![]() |
![]() |
Note that for most of the applications in which the thumb buttons don’t work, it should be possible to create specific rules in your ~/.imwheelrc file to map the buttons to appropriate keyboard shortcuts. In Evince, for example, you might want them to map to Ctrl-PgUp and Ctrl-PgDn. However this isn’t an imwheel tutorial, so you’ll have to find that information somewhere else (the original blog post I linked to does say something about this).
Addendum: Thunderbird
To enable horizontal scrolling in Thunderbird, go to Edit > Preferences. Under the Advanced tab, click on the Config Editor button. From there, do the same thing that you did with the Firefox about:config page.
Addendum: Ubuntu Edgy
Note: If you’re looking for instructions to do this on Ubuntu Edgy, check out this guide on the Ubuntu wiki.
