Home | Photos | Family | Linux | Motorcycling | Work
NOTE: There are 9 links related to this category and 3 links related to this subcategory.

Two mice with X...

How to configure two mice for use in XFree86
This comes in very handy if you have a laptop and don't always want to use that handy-dandy usb or external mouse. Here's the quick and dirty since I always forget how to do it.

Under RedHat or Mandrake (and probably others) edit /etc/X11/XF86Config-4.
Look for lines similar to this one from my XF86Config-4 file:

Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "PS/2"
    Option "Device" "/dev/psaux"
    Option "Emulate3Buttons"
    Option "Emulate3Timeout" "50"
EndSection

Above this add the following section:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "no"
EndSection

The above is for my Logitech USB TrackMan Wheel mouse. You may need to change this to suit your hardware. The important things to note are that the "Identifier" must be unique. If you're using a USB mouse, in order to get the correct Device (in /dev) you can check dmesg (do a tail -f /var/log/dmesg as you plug in the mouse). Unfortunately for me, this didn't reveal a whole lot, so instead I had to check in /etc/devfs/conf.d/usbmouse.conf (on Mandrake 9.0). This revealed that my mouse was mapped to /dev/input/mice. This can be verified by typing "cat /dev/input/mice" and then moving the mouse. You should see some garbage on your screen corresponding to mouse movements. You can CTRL-C out of that.

Next, look for the following section in the XF86Config-4 file (typically at the end):

Section "ServerLayout"
    Identifier "layout1"
    InputDevice "Keyboard1" "CoreKeyboard"
    InputDevice "Mouse0" "AlwaysCore" "SendDragEvents"
    InputDevice "Mouse1" "CorePointer"
    Screen "screen1"
EndSection
Note the second InputDevice, add it as shown above. An unusual problem that I had when I first did this was that I could use the second mouse, click things, the wheel worked, but I couldn't drag things. I had to add the "SendDragEvents" for this to work.

Before the changes take effect, you'll need to re-start your Xserver: log out of KDE (or your favorite window manager) and press ctrl-alt-backspace. Log in , and enjoy!

By the way - if you're wondering where that little Icon I got from, it's actually a small part of a picture of the first computer mouse developed in 1968. Click here to learn more, it's an interesting read!

Created by swannie on 2003-02-19 16:12:05, modified by swannie on 2003-02-19 16:31:48.
Modify Page

Home > Linux > KDE > Two mice with X...

Hosting for this website generously provided by Narnia Pet Behavior and Training, Inc. Page dynamically created using PHP, page last modified on November 05, 2003 11:00:16.
All images and texts contained herin are © Copyright 1995-2010 swannie.net, and Brian R. Swan unless noted otherwise. All rights reserved.