[# Edit 6, Date 30-Jul-94, Module INSTALL #]   

Installation instructions for selection utility version 1.6
-----------------------------------------------------------

1. Devices
----------

(The instructions below assume that you are using Nick Holloway's MAKEDEV
1.4, available from most Linux sites as MAKEDEV-1.4.tar.gz.)

 A. Make the mouse device. The procedure depends on whether you have a serial
    or a bus mouse.

    Serial mouse
    ------------

    - Check to make sure that you have at least devices ttyS0 and ttyS1 in
      /dev. If not, make them as follows:

	cd /dev; MAKEDEV ttyS0 ttyS1

    - Check to see which of the serial devices your mouse is connected to.
      The easiest way is to type:

	cat -uv /dev/ttyS0

      and move the mouse around randomly. If you get junk on your screen, you
      have the right device.  If not, try /dev/ttyS1.  Your mouse may even be
      on ttyS2 or ttyS3, for all I know.

    - Create a symbolic link for convenience as follows:

	cd /dev; ln -s ttyS0 mouse

    Bus mouse
    ---------

    - Check to make sure that you have the bus mouse devices logibm, psaux,
      inportbm and atibm in /dev. If not, make them as follows:

	cd /dev; MAKEDEV busmice

      (Of course, you only actually need the device corresponding to your
      mouse type.)

    - Create a symbolic link for convenience as follows:

	cd /dev; ln -s logibm mouse

      substituting psaux, inportbm or atibm for logibm if necessary.

 B. Make sure you have the /dev/tty0 (current VC) device. If not, make it
    as follows:

	cd /dev; MAKEDEV tty0

2. The Kernel
-------------

 -  Reconfigure the kernel if necessary by typing 'make config', remembering
    to include the selection mechanism by answering 'y' to the question:

      Selection (cut and paste for virtual consoles) (CONFIG_SELECTION) [n] 

    The default is for the selection mechanism to be disabled, so this step is
    important. In addition, if you are using a bus mouse, make sure that you
    include support for the mouse type when configuring the kernel by
    answering `y' to the appropriate question.

    If you do rebuild, to be safe, rebuild the kernel dependencies using `make
    dep' first.

    To check whether your kernel already has selection support built in, just
    try running `selection' as below.  If an error message of the form:

      selection: ioctl(TIOCLINUX, n): ...

    is generated, this means that the kernel needs rebuilding.

3. Test the program
-------------------

 -  There is a prebuilt binary included in the distribution, compiled with gcc
    2.5.8 and linked against libc 4.5.21. Run `selection' to test it out. Use
    `selection -?' to see what options are supported. Then type `make
    install-dist', which installs the executable in /sbin and the manual page
    in /usr/man, and start it up from /etc/rc.local or wherever local
    initialization is performed at startup.

    Note: selection is installed set-UID so that the `-k' option can work
    correctly.

If you have trouble with bus mice, you are not alone.  Mike Battersby
<mike@starbug.apana.org.au> has written the Busmouse HOWTO (25 May 94),
available on most Linux sites.  This may help you in your difficulty.
Note that the section dealing with selection does not refer to the latest
version, and the selwrap program is no longer needed.

The default size of the paste buffer is 2048 bytes.  This may be changed by
altering the value of SEL_BUFFER_SIZE in /usr/src/linux/drivers/char/console.c
and rebuilding the kernel.

And that's all there is to it, hopefully.  See the manual page for a more
detailed description of operation.  Please let me know of any problems,
suggestions for enhancements, etc, etc.
