[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sorg: understanding InputDevice, dev assignments, and mice

On Wed, Oct 26, 2005 at 12:23:38AM -0400, Matt Price wrote:
> I am very closeto having a fully working Debian/sid system (well, lots
> of littlethings like sound are still out of order, but...).  Now I
> want to make sure that the mouse works under all conditions:
> 1 - the laptop is fully detached, only the internal pointer (the
> trademark ibm pointer) is necessary/working.  
> 2 - I'm at home, the laptiop is plugged in to its dock, there's a PS/2
> wheel mouse & a usb keyboard on the dock &, both the internal and
> external pointers should work
> 3 - I'm at work, no dock, but there is an extra USB mouse, I plug that
> in to do some work.  
> what I want to know is:
> - how do I determine which device each physical mouse is/should be attached to?

You can `cat /proc/bus/input/devices` to see which devices the mice are
connected to.

> - what stanzas do I need in xorg.conf to ensure that all the mice, and
> ESPECIALLY the internal pointer, always work?  

If all your mice are registered proberly as mice, you can probably have
just one InputDevice section for all your mice with
Option "Device" "/dev/input/mice" in it and all your mice should work.

If your mice have different configuration (for example they have
different kind of buttons, scroll wheel or something like that) or if
you want to have different configuration for each mice for some reason,
you need to have a separate InputDevice section for each mice. In that
case you also need a different Option "Device" "/dev/something" for them.

Mice have their separate devices in /dev/input/mouseX, where X is
0,1,2... depending on the number of mice connected to your computer.

You can see from the /proc/bus/input/devices which mouse is connected to
which /dev/input/mouseX. Those can of course change between reboots, so
to be on the safe side and always have a certain device for a certain
mouse, you can use symlinking in udev.

Just put a line like:
SYSFS{bus}=="usb", SYSFS{name}=="EPSON Presentation Remote", SYMLINK="epson"
into your /etc/udev/rules.d/010_local.rules

The SYSFS{bus} is the bus your mouse is connected to ("serio" for a ps/2
mouse), SYSFS{name} is the name you find in the /proc/bus/input/devices
or in the /sys filesystem (if you have /sys filesystem) and SYMLINK is
the name you want in your /dev directory.

In the example above my usb presentation mouse has a symlink as
/dev/epson so I can put that in my xorg.conf InputDevice section.

If you have separate InputDevice sections for your mice, you also need
to refer to them in the ServerLayout section as
InputDevice "inputdevice_identifier"

I think, only one mouse can be a core pointer (Option "Corepointer" in
the InputDevice section). In your case it's probably the internal

You can also have multiple ServerLayout sections. The first one in the
xorg.conf is the default. The others can be used by starting X as:
startx -- -layout "serverlayout_id".

> appreciate the help!
> matt
> -------------------------------------------
> Matt Price	    matt.price@utoronto.ca
> History Department, University of Toronto
> (416) 978-2094
> --------------------------------------------
> The following addresses are for you if you're an evil spambot:
> zeus@derailleur.org aardvark@derailleur.org

:r ~/.signature

Attachment: signature.asc
Description: Digital signature

Reply to: