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

Re: pseudo-OT: curious -- why GPM????



On Sun, Feb 25, 2001 at 09:10:48AM -0800, Xucaen wrote:
> Hi all!
> In the few months that I have been reading the
> debian user list, I have seen many many posts
> about the conflicts GPM seems to have with X.
> I have never used GPM, but I thought it was only
> something to be used in a text-only environment.
> Is there really any significant advantage to
> using it under X? I've read about users banging
> their heads against a wall trying to get it to
> work, and I was curious it it is really worth it
> and if maybe I should be using it. What does it
> do? (I don't have any man or info pages
> installed)

<rant>
And that's why so many have problems with it, they refuse to RTFM!
There is no need whatsoever to have any problems with GPM and X,
just follow the examples and try to read the manpage for a change.
<\rant>

The ps2 port on PC's (or actually the treatment under Linux) doesn't
allow two programs to read from that port at the same time.  So if
you have gpm running to use the mouse on the console *and* you want
X to use that same mouse on such a ps/2 port: troubles, troubles.
Not always, there are those who are lucky and experience none of the
alludged malfunctionings that are reported, but those are few.

Fortunately there is a way out of this mess: let gpm have the ps/2
port all for him self, but let him forward all data he read from that
port to a socket (/dev/gpmdata) and next have X read from that socket
instead of reading from the ps/2 port.

That's basicly it. There are two extras that seem to confuse people:

  1 gpm can do a mouse protocol translation instead of merely
    forwarding the mouse packets he reads from the ps/2 port.

  2 to ease configuration in case gpm is later added or removed from
    the system it is adviced to use a symlink for mouse access in X.

I would advise *not* to use the protocol translation stuff but in
those rare circumstances where X doesn't understand the natural
protocol of the mouse in use. So set the forwarding to raw.

Example /etc/gpm.conf:

    device=/dev/psaux       # let gpm handle the real thing
    responsiveness=
    repeat_type=raw         # and forward all *without* protocol translation
    type=imps2
    append="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""

Example symbolic link:

   lrwxrwxrwx    1 root root    12 Feb  8 05:12 /dev/mouse -> /dev/gpmdata

Example Pointer section in /etc/X11/XF86Config:

    Section "Pointer"
       Protocol        "IMPS/2"
       Device          "/dev/mouse"
       Resolution      200
       ZAxisMapping    4 5
    EndSection
    
Note that X's Protocol "IMPS/2" lines up with gpm's imps2, both refer to
the same mouse protocol in use by my wheel mouse.

-- groetjes, carel



Reply to: