	Copyright (C) 1999 Chad Schwartz
 
 	This program is free software; you can redistribute it and/or modify
 	it under the terms of the GNU General Public License as published by
 	the Free Software Foundation; either version 2 of the License, or
 	(at your option) any later version.

 	This program is distributed in the hope that it will be useful,
 	but WITHOUT ANY WARRANTY; without even the implied warranty of
 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 	GNU General Public License for more details.

 	You should have received a copy of the GNU General Public License
 	along with this program; if not, write to the Free Software
 	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


*Installation for Transparent Print v1.1.0*

Edit the Makefile to choose your C-compiler.  Usually the
default will work however it is best to look it over just to be safe.

*Steps for compiling and installing tprint*


#1: Edit the Makefile and verify that your compiler definition is correct.

#2: Create /etc/tprint/tprint.conf. (a sample tprint.conf is included with 
    this package)
    
The file's format looks like:

/dev/ttyS0:192:\033[5i:\[033[4i

    The format of this file, is as follows:

FULLPATHTOSERIALTTY:MAXCPS:ONSTRING:OFFSTRING

    Note that the file can have more than one line, and can also have 
    commented out lines, in it, such as:

# This is a commented out line

    You will need to determine the onstring and offstring for your 
    particular terminal emulation.  Enter them in the format as shown above.  
    The example onstring/offstring above has been known to work with the 
    'linux', 'vt100', and 'ansi' terminal emulations.  Additional 
    ONSTRING/OFFSTRING codes can be had for other termtypes by looking in 
    the file '/etc/termcap', or your terminfo database.

   MAXCPS is a variable that controls exactly how many characters per
   second you want to print.  Changing this number will have a DRASTIC 
   effect on how much bandwidth is left over for your terminal to use  
   while transparent printing.   

   A good formula to calculate the maximum characters per second that 
   you can use, is:  (BPS * 10%) * 10%.
                                                                     
   So in other words, if I have a terminal connected to my serial port 
   and it is running at 19200bps, the MAXCPS value would be 192.       
   However, one can definitely tailor this value to their likings.      
   Transparent print isn't an exact science, and your results may vary.

   Also, it should be noted that the IDEA of setting the MAXCPS correctly
   is to attain a value that makes it possible for transparent printing
   to occur WITHOUT making the printer flow control.  (By not sending 
   any more data than it can handle at any one time.) Additionally, we  
   can also insure that the user will always be able to use the terminal 
   efficiently while the terminal is transparent printing. (Thus, the user can 
   still move around in the system while they are printing TO THE SAME 
   TERMINAL.) 

#3: Once you are satisfied that your Makefile and tprint.conf files have been
    configured properly, go ahead and run a 'make'.  This will generate the 
    tprint binary.

#4: Run 'make install'.  This copies the tprint binary over to /usr/bin
    for you, as well as installing any supporting utilities that may be 
    present. (As of version 1.1.0, there are no other supporting utilities.)

#5: Run a 'make clean'.  This cleans out the source directory of any object
    code, corefiles, and any binaries that may exist in the build
    directory. 

#6: You're done!  If you ever wish to UNINSTALL this program, you can run
    'make uninstall' and it will remove the necessary files for you.


*Usage*

The tprint program can be used in several ways, and in several commandline
formats.  I will attempt to document them all here. 

#1: input from file, specify tty device for output

    tprint /etc/termcap /dev/ttyS0

    This will cause tprint to print the file /etc/termcap to terminal device
    /dev/ttyS0.  (tprint assumes that you have a terminal set up with a 
    getty running on /dev/ttyS0, that is working properly.  It also assumes
    that you have a printer hooked to the terminal on the other port, and
    that the terminal is configured correctly - so it can pass on the data
    to its second serial/parallel port when an ONSTR is received.

#2: input from file, assume local tty device for output 

    tprint /etc/termcap

    This will cause tprint to print the file /etc/termcap to THE LOCAL TTY
    DEVICE.  This would be useful if a user was sitting on the terminal
    they intended to print to.

#3: input from stdin, assume local tty device for output

    cat /etc/termcap | tprint

    This will pipe the output of cat into tprint.  It will print to THE LOCAL 
    TTY DEVICE.  This would be useful if a user wanted to pipe output data 
    from a program to tprint via stdin, and output to the local tty device.

#4: input from stdin, specify tty device for output

    cat /etc/termcap | tprint /dev/ttyS0

    This will pipe output from cat into tprint.  It will print to the 
    specified tty device.  This would be useful in a print spooler utility,
    such as the lpd package.  We pipe output data from a program to 
    tprint, and output to the specified tty device.  

Realize that you may want to background one of these processes.  From
the commandline you would use 'tprint <commandline> &'.  Doing this
not only enables transparent print to work, but it also allows you to
transparent print, and also use your terminal at the same time. :)

Also realize that if you wish to use tprint in a spooled situation (I.E.
being called directly from lpd) you can do this. However, it OBVIOUSLY
introduces insecurities, since we certainly may NOT be printing to a
terminal that WE OURSELVES ARE ON.)  As a result, you will have to mark
tprint 'suid root' by executing the command 'chmod 4755 /usr/bin/tprint'.
This makes tprint run as root.  (BAD idea, unless you do group-based 
security to decide WHO can use tprint directly without using the spooler.)

*Contact Information*

If you have comments or suggestions, or if you wish to send patches, please 
go ahead and email me at coax@users.sourceforge.net

