186 lines
5.3 KiB
HTML
186 lines
5.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<title> Mconv2 Utility Issue 10 </title>
|
|
</HEAD>
|
|
<BODY>
|
|
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>
|
|
"</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center><h1>Mconv2 Utility</h1></center>
|
|
<center><h4>by Nic Tjirkalli <A
|
|
HREF="mailto:nic@pipex-sa.net">nic@pipex-sa.net</A>,
|
|
<A HREF="http://www.pipex-sa.net/~nic">http://www.pipex-sa.net/~nic </A></H4></center>
|
|
<center><H5>Copyright (c) 1996</H5></center>
|
|
<center> <H5>Published in Issue 10 of the Linux Gazette</H5></center>
|
|
<P> <HR> <P>
|
|
Normally, users of <b>PS/2</b> type mice have a problem in that a PS/2 type
|
|
mouse cannot simultaneously be shared among different applications
|
|
such as <i>gpm</i> (selection) and <i>XFree86</i>. That was until
|
|
the discovery of a tiny utility called, <b><font size="+1">mconv2</font></b>.
|
|
Mconv2 allows several programs to use a PS/2 type mouse at the same time.
|
|
<br><p>
|
|
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 <i>svgalib</i>).
|
|
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 <b>README</b> file included with the mconv2 distribution.
|
|
|
|
|
|
<br><p>
|
|
Installing and using mconv2 is <b>VERY</b> simple :-
|
|
|
|
<br><p>
|
|
<ol>
|
|
<li>
|
|
<b>Getting mconv2</b>
|
|
<br>
|
|
Mconv2 can be downloaded from a variety of Linux archive sites. I got
|
|
my copy from
|
|
<br><p><center>
|
|
<a href="http://sunsite.unc.edu/pub/Linux/system/Misc/mconv2.tar.gz">
|
|
http://sunsite.unc.edu/pub/Linux/system/Misc/mconv2.tar.gz</a>
|
|
</center>
|
|
<br><p>
|
|
<li>
|
|
<b>Extracting Distribution</b><br>
|
|
|
|
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 <i>/usr/src</i> directory, but any directory will do.
|
|
Copy the mconv2 distribution file (mconv2.tar.gz) to the selected working
|
|
directory, eg. <i>/usr/src</i> (or the directory you care to extract it
|
|
in) as follows :-
|
|
<br>
|
|
|
|
<pre>
|
|
cp mconv2.tar.gz /usr/src
|
|
</pre>
|
|
|
|
Go to the working directory and extract the mconv2 archive, as follows :-
|
|
<br>
|
|
|
|
<pre>
|
|
cd /usr/src
|
|
tar -zxvf mconv2.tar.gz
|
|
</pre>
|
|
|
|
This will create a subdirectory called <i>mconv2</i> containing,
|
|
<ul>
|
|
<li>
|
|
the mconv2 source code - <i>mconv2.c</i>
|
|
<li>
|
|
a binary compiled mconv2 executable - <i>mconv2</i>
|
|
<li>
|
|
supporting documentation files - <i>mconv2.lsm</i> and <i>README</i>
|
|
</ul>
|
|
|
|
<br><p>
|
|
<li>
|
|
<b>To compilie mconv2, or not</b>
|
|
<br>
|
|
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 :-
|
|
<br><p>
|
|
|
|
<pre>
|
|
gcc -O2 -o mconv2 mconv2.c
|
|
</pre>
|
|
|
|
<br><p>
|
|
<li>
|
|
<b>Installing the mconv2 binary</b>
|
|
Copy the pre-built, or newly made, mconv2 binary file (<i>mconv2</i>)
|
|
to an appropriate directory for executing binarys from - I use
|
|
<i>/usr/local/bin</i>.
|
|
<br><p>
|
|
|
|
<pre>
|
|
cp mconv2 /usr/local/bin
|
|
</pre>
|
|
|
|
<li>
|
|
<b>Builiding a fifo for the PS/2 mouse</b><br>
|
|
Create a fifo device (pseudo mouse driver) for the PS/2 mouse, as follows :-
|
|
<br><p>
|
|
|
|
<pre>
|
|
mkfifo -m 666 /dev/ps2mouse
|
|
</pre>
|
|
<br><p>
|
|
<li>
|
|
<b>Using mconv2</b>
|
|
<br>
|
|
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, <i>/dev/ps2mouse</i>. It is probably best,
|
|
to start mconv2 from the <i>/etc/rc.d.rc.local</i> file
|
|
with the following command :-
|
|
|
|
<pre>
|
|
echo -n "Runnig mconv2 .... "
|
|
/usr/local/bin/mconv2 /dev/psaux -ps2 /dev/ps2mouse &
|
|
echo "Done"
|
|
</pre>
|
|
|
|
<b>NOTE :- this assumes your original mouse device was /dev/psaux</b>
|
|
<br><p>
|
|
|
|
<li>
|
|
<b>Configuring other programms to use mconv2</b>
|
|
<br>
|
|
As mentioned in the point above, other programs requiring the PS/2 mouse
|
|
must be configured to use the mconv2 pseudo mouse device - <i>/dev/ps2mouse</i>.
|
|
<br><p>
|
|
|
|
Examples :-
|
|
<br><p>
|
|
<ul>
|
|
<li>
|
|
To set up <b>gpm</b>, to use this pseudo device, invoke it as follows :-
|
|
|
|
<pre>
|
|
gpm -t ps2 -m /dev/ps2mouse &
|
|
</pre>
|
|
<b>NOTE :- the -m option tells gpm what mouse device to use</b>
|
|
<br><p>
|
|
<li>
|
|
To set up <b>XFree86</b> to use the pseudo device, modify the
|
|
<b>Pointer</b> section of the <b>XF86Config</b> file to set the
|
|
mouse device to <b>/dev/ps2mouse</b> as follows :-
|
|
|
|
<pre>
|
|
Section "Pointer"
|
|
Protocol "PS/2"
|
|
Device "/dev/ps2mouse"
|
|
</pre>
|
|
</ul>
|
|
</ol>
|
|
Enjoy the PS/2 mouse sharing.
|
|
My thanx to Frode Fjeld
|
|
<A HREF="mailto:frodef@stud.cs.uit.no">
|
|
frodef@stud.cs.uit.no</a>
|
|
for developing the mconv2 distribution.
|
|
<br><p>
|
|
Nic Tjirkalli
|
|
|
|
<!--===================================================================-->
|
|
<P> <hr> <P>
|
|
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
|
|
ALT="[ TABLE OF CONTENTS ]"></A>
|
|
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
|
|
ALT="[ FRONT PAGE ]"></A>
|
|
<A HREF="in.memory.html"><IMG SRC="../gx/back2.gif"
|
|
ALT=" Back "></A>
|
|
<A HREF="netday.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
|
|
<P> <hr> <P>
|
|
|
|
</body> </html>
|