By Ralinx

(Transferred from the wiki by Peter)

Introduction

The purpose of this tutorial is to get the side buttons of your mouse working. In this tutorial I will set them up so the left side buttons functions as the "back" button in mozilla and konqueror and the right side button will be the "forward" button in moz and konq. personally i think this is something u can't live without anymore once you're used to it, but you're always able to make the side buttons do other stuff. let's begin.

NOTE: this works with my MS Optical Intellimouse. if it doesn't work with ur type of mouse, buy me one of those mouses, send it to me, and i'll try to get it to work

Editing XF86Config


First of all u'll need to modify ur mousepointer section in /etc/X11/XF86Config
mine looks like this:

Code:
Section "InputDevice"

Identifier and driver

Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/mouse"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
So basically, u have to edit the Protocol option, add the "Buttons" option and then change the ZAxisMapping from "4 5" to "6 7" so ur mousewheel will still work.

Edit X Files in Your $HOME Directory

After doing that u'll have to add the following line to either ur ~/.xinitrc or ~/.xsession (if u have both files, add the line to both of them):
Code:
xmodmap -e "pointer = 1 2 3 6 7 4 5"
Now install imwheel1.0.0pre1 or any later version. u can download it from here: http://jcatki.no-ip.org/imwheel/
Save the file to /usr/src and then execute the following commands:
Code:
tar zxvf imwheel-1.0.0pre1.tar.gz
cd imwheel-1.0.0pre1
./configure
make
make install
If this worked u can safely delete the imwheel-1.0.0pre1 directory from /usr/src
Now u will have to set up the ~/.imwheelrc file to set up ur side buttons. Put the following lines in that file:
Code:
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right
Again, this will only make the side buttons work as back and forward buttons in your browser. if u want to have those buttons do other stuff, do 'man imwheel' and the way the imwheelrc file works is explained in there so then u can basically make them do whatever u want.
Now u will again have to add a line to either ~/.xinitrc or ~/.xsession (or both):
Code:
imwheel -k -b "67"
Conclusion

That's it. any comments/suggestions/questions/hatemail can be sent to davy.brion@pandora.be and if your lucky i might even respond.