You have to edit your xorg.conf file.
Type "su" to log in as root. Then type "cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup" so you don't mess up.
Type "pico /etc/X11/xorg.conf" to edit the file.
Look for the mouse section.
This is my mouse settings. I use a Logitech MX500 and actually have 10 buttons, but it's working anyway.
It might differ a little from yours.
Code:
# Identifier and driver
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/mouse"
Option "Buttons" "7"
Option "ButtonNumber" "7"
Option "ZAxisMapping" "4 5"
EndSection
The important thing is "ZAxisMapping". "4 5" is usually the right buttons on most mice i believe.
So just add that to the section. If it's not working there is a command so you can check what buttons it is, but i have forgot what it is
If you have a USB mouse, change the "Protocol" to "IMPS/2" or "ExplorerPS/2" on some mice.
EDIT: To save the file in pico press CTRL + X and it will ask you to save. Type "y" and press enter twice.
Then press CTRL + ALT + Backspace to kill X.