Have a Microsoft Intellimouse or a Logitech Mouseman? This will get you going with using the side buttons.
You can also find this document on the wiki at:
Step 1: Editing the config file:
Edit your /etc/X11/XF86Config-4 or /etc/X11/xorg.conf file so that the mouse section looks like this:
Identifier "Configured Mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
Option "Resolution" "100"
Note1: The resolution option is optional, that's just for mouse accuracy.
Note2: even if you're using a Logitech Mouseman with only one thumb button, this will still work.
Step 2: Installing imwheel:
Now we need to install imwheel using apt-get:
$ sudo apt get install imwheel
or by using synaptic to find and install it.
Step 3: Creting the imwheel config file
Create a file called /etc/X11/imwheelrc using your favorite text editor, in this case, nano:
$ sudo nano /etc/X11/imwheelrc
and put this text in it:
Step 4-1: Configuration for GDM, KDM, and XDM
If you don't use GDM, KDM, or XDM (if you log in through a graphical interface, you DO use one of these), skip this step. If you do, create a file called "57xmodmap" in /etc/X11/Xsession.d/:
sudo nano /etc/X11/Xsession.d/57xmodmap
and put this code in it:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
Save the file and then change the permissions so that it can be executed:
sudo chmod 777 /etc/X11/Xsession.d/57xmodmap
To explain the naming convention, the number at the beginning tells the xsession when to load a process. If you list the contents of /etc/X11/Xsession.d/ you'll notice that the file starting with 60 is the imwheel script. It was automatically created when installed. We need the xmodmap to run before that, so I chose 57. Now log out and log back in to get everything working. You should now be able to use the forward and back buttons (or just the back button, depending on how many buttons your mouse has). Log out and log back in to see the changes.
Step 4-2: Editing for startx users
If you use GDM, KDM, or XDM, you're already done. If you use text mode login and use startx to enter X, put the following in your /home/username/.xinitrc file, before the line that starts your window manager (which you have to have if you're using an .xinitrc, as far as I can tell):
xmodmap -e "pointer = 1 2 3 6 7 4 5" &
exec imwheel -k -b "67" &
You may have to make this file. If so, be sure you put in
or whatever command your Window Manager uses at the very end of it. Log out and log back in to see the changes.
This concludes the tutorial. Maybe that expensive mouse wasn't a waste after all!