A few weeks ago I bought a second-hand Razer Boomslang mouse just to see if I can
get it working in Linux. I got the 1000 dpi version, and you can buy a 2000 dpi. This
tutorial will work with either version.
I was really amazed that it isn't hard to get it working. I use USB instead of PS/2,
as the mouse responds better with USB. This tutorial is specific for the Razer Boomslang
mouse, but it may work with other mouses that have side buttons. If you know of other
special mice that work with this tutorial, please
email me.
First of all, connect your mouse on a USB port and start the system. If you don't have
USB configured, kudzu or harddrake will configure it, if it is set to run at bootup.
Open a terminal without X by pressing
Ctrl+Alt+F1. Log in as root.
Now type in
mouseconfig and hit
Enter. Select
USB|Wheelmouse and then
OK.
This will enable an USB mouse for your system and you can use the mouse in terminals without X.
Now type in
modprobe hid and hit
Enter. Next, type in
modprobe usbmouse
and hit
Enter.
Next you must modify the InputDevice section of the /etc/X11/XF86Config-4 file. Type
in
pico /etc/X11/XF86Config-4 (substitute pico with the name of your favorite
editor. vi is a good choice as well) and modify to look like the following:
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Device" "/dev/input/mouse0"
Option "ZAxisMapping" "6 7"
Option "Protocol" "ExplorerPS/2"
Option "Resolution" "1000"
# When you're using a 2000 dpi mouse, choose option "Resolution" "2000"
Option "SampleRate" "200"
Option "Buttons" "7"
# ChordMiddle is an option for some 3-button Logitech mice
# Option "ChordMiddle"
EndSection
When you want to use the side buttons of your Razer Boomslang mouse, you have to make
a script what will be executed when you login into X. I put the script in ~/.kde/Autostart/
as KDE will start all programs located in here when you start it.
I named the script pointer.sh, you can use any name you like, just substitute that
name and path in the following steps.
Now, as your normal user, type in
pico ~/.kde/Autostart/pointer.sh and
hit
Enter and add:
#!/bin/sh
# Razor Boomslang modifications for buttons
/usr/X11R6/bin/xmodmap -e "pointer = 1 2 3 6 7 4 5"
Now X will recognize the Razer Boomslang mouse, and you can use it for apps and games.
To get this working, now you'll have to restart X. To restart X, press
Ctrl +
Alt + Backspace when it is running. If you are in a console and don't have X
running, you can just run
startx. It is not recommended that you run X as root.
Alternately, you can type in
init 3 and hit
Enter, and then type
in
init 5 and hit
Enter again, if you use a runlevel of 5. If you don't
know what this means, you can either ignore it or just try it, as it won't screw up
your system. If you are still unsure, you can do the Windows thing and reboot your
computer.
Assuming that this works, and you want to load these drivers at system startup, type
in
pico /etc/modules and hit
Enter. At the end of the file, add the two modules:
#This section is for USB-mouse
hid
usbmouse
Also, modify the file /etc/modules.conf by adding a line like this to the end:
alias usb-interface0 usb-uhci
If the lines are already in either of those files, do not add them a second time.
Now, when you reboot, this should all be done automatically for you.
You can now play your favorite games using the Razer Boomslang mouse. For example,
RTCW and Quake 3 support the side buttons. I haven't been able to get Unreal Tournament
to bind the buttons, so if you know how, please let me know.