Make your own free website on Tripod.com
MONKEY LINUX
current version 06              @(õ õ)@
released 9/5/1997                 (Y)                    [ MOUSE TUTORIAL ]
---------------------------------------------------------------------------
[ Home ]        [ Description ]    [ Programs ]     [ System Requirements ]
[ Download ]    [ Installation ]   [ Tutorials ]    [ Links ]
---------------------------------------------------------------------------
     There are two environments in which you can utilize a mouse within
Monkey, console (command line) and X Window.  Use in either environment
requires proper configuration of the pointing device's type, mode, port,
and buttons.  Take a good look at your mouse and write down how many
buttons it has, what kind it is (serial, ps/2, etc.), which port it's
connected to (COM1, COM2, PS/2, etc), and which protocol it uses (MS or
PC).  Here's some bad news for you USB mouse owners, Monkey does not
support USB devices.

     The first part of setting up your mouse is figuring out which port
it's connected to.  Does the connector at the end of the mouse's tail
have nine holes, possibly even 25, lined up in two rows?  If so, then
it's a serial mouse that connects to a COM port in DOS/Windows and a
ttySx port in Monkey.  Maybe the mouse has a round six-socket connector.
If that's the case, then what you have is a PS/2 mouse that connects to
what is known as a PS/2 port in DOS/Windows and the psaux port in Monkey.
A little hint for laptop users, touchpad devices often utilize the psaux
port.  Lastly, if the connector is round with nine sockets then you've
got a bus mouse that connects to the bus mouse port in DOS/Windows.
Monkey is not set up with bus mouse support, but you can compiling it
into the kernel.

     Now it's time to tell Monkey which port the mouse is attached to.
If the mouse is a serial device then it's most likely connected to either
COM1 or COM2 in DOS/Windows.  These ports correspond to the ttyS0 and
ttyS1 ports respectively.  If you have a PS/2 mouse then it connects to
the psaux port in Monkey.  The follow directions demonstrate how to set
up a serial mouse connected to COM1 in DOS/Windows and ttyS0 in Monkey.
If your mouse is connected to the COM2 or PS/2 port in DOS/Windows then
substitute ttyS0 with ttyS1 or psaux, respectively. 

     cd /dev                CHANGE TO /dev DIRECTORY
     ls -la mouse           LOOK AT THE DEFAULT MOUSE CONNECTION
     rm mouse               DELETE OLD LINK
     ln -s ttyS0 mouse      CREATE NEW LINK

     One more thing we need to figure out before we get our mouse working
is which protocol it uses.  On the bottom of some serial pointing devices
there's a switch with two values to choose from, MS (Microsoft mode) or
PC (mouse systems mode).  If those options aren't available then it's
safe to assume that the serial mouse runs under Microsoft mode (MS).
PS/2 pointing devices simply run under the ps2 mode.  You'll be ready to
configure your pointing devices as soon as you create your mouse soft-
link (so Monkey knows where it is) and figured out which protocol the
mouse uses.

     In the console, Monkey uses a program called GPM to set up the mouse
for cut-and-paste operation, as well as, point-and-click operation in the
MC (Midnight Commander) file-menuing program.  Read the man pages on GPM
to learn more about GPM's functionality.  Also, read the 3 Button Serial
Mouse mini-HOWTO from the Linux Documentation Project.  This example
illustrates how I set up my three-button Dexxa serial mouse.

     1. Open rc.local in the joe text editor
          joe /etc/rc.d/rc.local
     2. Press Ctrl+K then H to display the Help Box
     3. Place a # in front of the old mouse configuration
          # /usr/bin/gpm -t bare
     4. Add the new configuration
          /usr/bin/gpm -t ms -3 -B 123
     5. Press Crtl+K then X to save changes and exit joe          
     6. Initiate changes to mouse configuration
          gpm -k; gpm -t ms -3 -B 123

     Here's an explanation of my new mouse settings.  The rc.local file
is a configuration file that runs when Monkey is booted.  It starts up
GPM for us.  The line that I added tells GPM all it needs to know about
my pointing device.

     /usr/bin/gpm     WHERE THE gpm BINARY IS LOCATED
     -t ms            TELLS GPM THAT MY MOUSE RUNS MICROSOFT MODE
     -3               SETTING FOR A THREE BUTTON MOUSE
     -B 123           RIGHT-HANDED BUTTON SETTING

     Configuring the mouse for use in X Window is just a matter of
altering a file.  Specifically, the /etc/XF86Config file.  Make sure you
get the mouse working in the console first.  In the X configuration we
only need to specify which protocol the mouse uses (Microsoft, Mouse
Systems, PS/2, etc).  By default, X is configured for a serial mouse
running under Microsoft mode, so I didn't need to alter /etc/XF86Config
to use my Dexxa mouse.  For the sake of an example, here's how I
configured the touchpad mouse on my Compaq Presario 1210 laptop:

     1. Open XF86Config in joe text editor
          joe /etc/XF86Config
     2. Comment out the default mouse type setting
          # Protocol "Microsoft"
     3. Add the correct mouse type setting
          Protocol "PS/2"
     4. Press Ctrl+K then X to save changes and exit joe
          

     If you're anything like me you’re using Monkey on an old machine
that doesn't run X in a practical fashion so you do the bulk of your
Linuxing in console mode.  I rarely ever need cut-and-paste functionality
and I don't like the idea of running a process (gpm) that I don't use, so
I commented out the gpm-related lines from /etc/rc.d/rc.local.  This way
I free up a serial port for use with other devices, like a modem.  When
you need to use you’re mouse you can start gpm manually at the command
prompt.  If you don't like typing out long commands then learn how to
create aliases.

                                                                    [ top ]
---------------------------------------------------------------------------
Send webmaster an email.               [ Disclaimer ] [ Legal ] [ Updates ]
---------------------------------------------------------------------------
Copyright (C) 2001, 2002 August Chaco