[svlug] Two mouse solution

David Madison svlug.org at daveola.com
Mon Nov 20 18:34:02 PST 2000


After wrangling for an hour or so, I figured out how to get *my*
two mice to work, you probably wouldn't want to use this for a
graphics tablet since I've used gpm, not Xinput as my solution
(since I couldn't get Xinput to work properly :)

The trick I used is to use the gpm repeater function.  gpm is the
daemon that handles the mouse for virtual consoles, but you can
'repeat' the mouse information into the /dev/gpmdata pipe, and gpm
can handle multiple mice (and even remap buttons :)

So I start up gpm:

% gpm -k				# Kill the gpm daemon
% gpm	\				# And restart it..
	-R MouseSystems \		#   repeat to gpmdata as MouseSystems
	-t ps2 -m /dev/psaux \		#   first mouse, PS/2
	-M -t ms -m /dev/ttyS0 -B 132	#   second mouse, serial, switch buttons

Then I configure X to use the repeated data as if it
were a MouseSystems mouse, as specified above:

# File:  /etc/X11/XF86Config (or /usr/X11R6... or..)
--------------------------------------------------
Section "Pointer"
    Protocol    "MouseSystems"
    Device      "/dev/gpmdata"
--------------------------------------------------

Now I have to setup my laptop the same way for different mouse reasons.
I'm surprised that more people don't run into multiple mice difficulties.

As a side-note, I couldn't get Xinput to work, though I didn't read
all the docs..  Here's my failed attempt:

--------------------------------------------------
Section "Xinput"
  SubSection "Mouse"
    Port "/dev/ttyS0"
    DeviceName "Mouse"
    #Mode Relative
    AlwaysCore
    Protocol    "Microsoft"
  EndSubSection
EndSection
--------------------------------------------------

If anyone familiar with Xinput can see any obvious problems, I'd love
to know for future reference.

-- 
Dave             GetDave.com




More information about the svlug mailing list