"Linux Gazette...making Linux just a little more fun! "


Mconv2 Utility

by Nic Tjirkalli nic@pipex-sa.net, http://www.pipex-sa.net/~nic

Copyright (c) 1996
Published in Issue 10 of the Linux Gazette


Normally, users of PS/2 type mice have a problem in that a PS/2 type mouse cannot simultaneously be shared among different applications such as gpm (selection) and XFree86. That was until the discovery of a tiny utility called, mconv2. Mconv2 allows several programs to use a PS/2 type mouse at the same time.

The mconv2 utility also supports the use of a PS/2 type mouse with applications that do not understand the PS/2 mouse protocol, but understand the microsoft serial mouse protocol (such as svgalib). This document only descrdibes the sharing of the PS/2 type mouse - not its use as a microsoft type mouse - for information on this, read the README file included with the mconv2 distribution.

Installing and using mconv2 is VERY simple :-

  1. Getting mconv2
    Mconv2 can be downloaded from a variety of Linux archive sites. I got my copy from

    http://sunsite.unc.edu/pub/Linux/system/Misc/mconv2.tar.gz

  2. Extracting Distribution
    Mconv2 is distributed as a compressed (gz) tar archive. Hence, it needs to be extraceted in a suitable directory before it can be installed. I used the /usr/src directory, but any directory will do. Copy the mconv2 distribution file (mconv2.tar.gz) to the selected working directory, eg. /usr/src (or the directory you care to extract it in) as follows :-
        cp mconv2.tar.gz /usr/src
      
    Go to the working directory and extract the mconv2 archive, as follows :-
        cd /usr/src
        tar -zxvf mconv2.tar.gz 
      
    This will create a subdirectory called mconv2 containing,

  3. To compilie mconv2, or not
    Together with the source and supporting documentation, the mconv2 distribution also comes with a pre-built binary of the program. This can be used as-is or the program can be recompiled very easily, as follows :-

        gcc -O2 -o mconv2 mconv2.c
      

  4. Installing the mconv2 binary Copy the pre-built, or newly made, mconv2 binary file (mconv2) to an appropriate directory for executing binarys from - I use /usr/local/bin.

        cp mconv2 /usr/local/bin 
      
  5. Builiding a fifo for the PS/2 mouse
    Create a fifo device (pseudo mouse driver) for the PS/2 mouse, as follows :-

        mkfifo -m 666 /dev/ps2mouse
      

  6. Using mconv2
    Before running any programs using the PS/2 mouse, mconv2 should be run first and other programs needing the mouse, should be configured to use the PS/2 pseudo device, /dev/ps2mouse. It is probably best, to start mconv2 from the /etc/rc.d.rc.local file with the following command :-
        echo -n "Runnig mconv2 .... "
        /usr/local/bin/mconv2 /dev/psaux -ps2 /dev/ps2mouse &
        echo "Done"
      
    NOTE :- this assumes your original mouse device was /dev/psaux

  7. Configuring other programms to use mconv2
    As mentioned in the point above, other programs requiring the PS/2 mouse must be configured to use the mconv2 pseudo mouse device - /dev/ps2mouse.

    Examples :-

Enjoy the PS/2 mouse sharing. My thanx to Frode Fjeld frodef@stud.cs.uit.no for developing the mconv2 distribution.

Nic Tjirkalli


[ TABLE OF CONTENTS ] [ FRONT PAGE ]  Back  Next