links now works fine; mouse doesn't?

Brian Densmore DensmoreB at ctbsonline.com
Tue Nov 25 17:14:43 CST 2003


> -----Original Message-----
> From: Brian Kelsay
> Sent: Tuesday, November 25, 2003 10:50 AM
> To: kclug at kclug.org
> Subject: links now works fine; mouse doesn't?
> 
> 
> On Tuesday 25 November 2003 08:44 am, Brian Densmore wrote:
> 
> > I have found that gpm and X don't play nice together.
> > I remember reading somewhere to unload gpm before launching X.
> > Maybe they have fixed that, but I know it used to be an issue.
> > Anyway, logic dictates only one program can have physical
> > control of the mouse at a time.
> 
> Not true.  My laptop has both a USB optical mouse and a 
> touchpad and BOTH work equally INSIDE X with XFCE 4.  But, 
What does that have to do with 2 programs accessing 1 device?
The optical mouse and the touchpad are different devices
with different physical addresses and represent different
'files' on the system. Yes it is a gpm problem. It appears to affect
busmice.

see some google results and ideas on fixing below.

">    Make sure you have both gpm and X using the ttyS* device to access
>    your mouse.  They won't coexist using cua* or any flavor of bus mouse.
> 
> I've got a bus mouse -- that seems like a strange restriction.

I don't know all of the details, but it has to do with the way
processes can share ttyS* devices and not the others.  If you have a
bus mouse, you'll need to check the gpm documentation thoroughly.  I
think there's a way you can have X receive mouse events from gpm, but
I don't know how well, or even if, it works." -debian archive

"The procedure involves knowing what the user wants.  Step 1 of the
procedure is to determine which device node the mouse is hooked into.
Step 2 is to determine what protocol the mouse uses.  Step 3 is to
determine whether or not to run gpm.  It goes like this :

    1)  point gpm at the mouse device (eg /dev/psaux but depends on
            your hardware)
    2)  tell gpm the correct protocol to use
    3)  set it up in "raw" repeat mode (this _should_ be the default,
            but I don't know if it is)
    4)  tell X to read from gpm's fifo -- /dev/gpmdata
            (**this is where people create the conflict on their own,
               by telling X to try and bully gpm out of the way, which
               doesn't work**)
    5)  tell X to use the *same* protocol as you told gpm
            (isn't this logical?  if you mouse is a "foo" mouse, then
            both gpm and X need to treat it as a "foo" not a "bar"
            mouse)" -debian archive

http://www.europe.redhat.com/documentation/HOWTO/Busmouse-HOWTO-4.php3
"For a long period of the kernel developement, it was not possible to share busmice between 
processes. Because of this it was hard to run both XFree86 and gpm at the same time. If you try to 
run X with gpm running and you get errors like the following then you know you are using one of 
these older kernels.

Fatal server error:
Cannot open mouse (Device or resource busy)

There are two meathods of getting gpm working with XFree86 with these kernels. The first is to kill 
any copy of gpm you have running before you start up XFree86. The second is to use gpm's "repeater" 
option (it takes mouse data and repeats the information to multiple applications).

I would recommend upgrading your kernel if possible so that you can share busmice between 
processes. For this document, I will only explain the simplest meathod of using XFree86 and gpm 
together with older kernels. Please see gpm's documentation if you would like to use the repeater 
meathod.

Gpm allows you to terminate running copies of itself by executing:

    gpm -k 

This should be done before starting up X11. Take whatever script you use to start up your X 
session, such as startx, and add the above command to the top of the script so that gpm is shut 
down automatically. You may wish to also put a command that restarts gpm at the bottom of the 
script so that it restarts upon exiting your X session. "




More information about the Kclug mailing list