Rolling your SERIAL mouse wheel on FreeBSD + Xorg

This one is easy. However it took me a while before I found the sollution.

Here is the scenario. You have an old serial wheel mouse and you do not want to buy a new one as the current is doing great its job :)

If you try the Xorg auto configuration and fire up your favorite X window manager the mouse wheel is not going to work in 99% of the cases. This is not a problem. Fire up your terminal and su to root:

[vaLntine@X ~]$ su -
Password:
[root@X ~]#

Now you have to edit the main Xorg configuration file. We are going to use vi but you can use any editor:

[root@X ~]# vi /etc/X11/xorg.conf

Scroll down to the section InputDevices and replace the mouse configuration block with the following one:

Section “InputDevice”
Identifier “Mouse0″
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/sysmouse”
Option “ZAxisMapping” “4 5 6 7″
EndSection

The key here is the auto Protocol. I have experimented with several other protocols even I did not know what was the right one for my Genius mouse but the auto one did the trick.

ZAxisMapping variable was also changed. After googling around most of the articles suggested ZAxisMapping set to “4 5″ but this did not work for me.

The above is tested and running on both FreeBSD and Linux (Slackware and Gentoo). However if you are using Linux distribution you have to replace the Device line with:

“Device” “/dev/mouse”

If /dev/mouse is not pointing (sym-linking :) to your COM1/2 port you can try with either:

“Device” “/dev/ttys0″

or:

“Device” “/dev/ttyS1″

If your mouse is plugged into COM1 you have to use ttys0 and of course ttys1 if your mouse is plugged into COM2.

Ok. Save the xorg.conf file and restart your X window manager. Now you should be able to use your mouse wheel.

Bookmark and Share

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top  banner ad


Leave a Reply