LOCAL PRINTING (LPRINT) UNDER XENIX - NEED HELP!

Raulin Olivera raulin at tdl.UUCP
Wed May 24 03:11:15 AEST 1989


In article <1001 at sactoh0>, jcg at sactoh0 (John C. Gonnerman) writes:
> In article <2446 at rencon.UUCP>, gary at rencon.UUCP (Gary Falsken) writes:
> > ... These users want to be able to print files out on their 
> > local printers.  SCO says I should use a program called lprint.  I looked
> > up the command in the xenix manual and it says I need to generate termcap
> > entries for any of the terminals that have local printers. OK. Has anyone
> > already done this for ansi, vt52, vt100, vt102 termcaps?  
>         [ excess text deleted ]
> > -- 
> > Gary Falsken 
> 
> I have used XENIX, and am familiar with lprint.  It does, indeed, generate
> codes taken from termcap (or terminfo on most System V versions).  These
> codes should have been delivered as part of the standard termcap entries
> for your version of the OS.
> 
> However, the terminal emulators I have used have not often supported local
> printing.  The answer is in your manual for Procomm, more than likely.
> Good terminal emulators do, but most do not.  If you have an emulator
> for which source is available, you may be able to add these functions.
> 
> On the terminals I have used, the control codes were "start printer"
> and "stop printer".  While in printing mode, the terminal passed all
> escape codes except "stop printer" to the printer.  The condensed, 
> standout, etc. codes for the printer will therefore usually work.
> I am not sure if this is true for all terminals, however.
> 
> Look around on local bulletin boards.  MS-DOS machines have a number of
> PD or affordable shareware programs available which may solve this problem.
> Unfortunately, at this point XENIX has passed the ball to your PC's.
> 
> (but if anyone out there has the MS-DOS solution to this problem, I
> would like it also...)

I received a couple of replys from people (to whom I am very greatful)
on the net concerning this topic that just worked out great.  I will 
include a copy of the modified shell script that I copied from the 
Discover magazine.  I have tested this script with Procomm in VT100 
emulation and in Crosstalk in both VT100 and VT52 emulation.  It works 
great.  It doesn't use the spooler but who cares.  The print is apparently
sent to PRN on the DOS side.

		=Ralo->
:
# - Localprint -
# This is a local printing script copied from Discover magazine
# May/June 88.  It has a minor adaptation in the escape sequences
# to utilize the ansi local print codes.  It works with Procomm
# in terminal emulation on a PC.

PATH=/bin:/usr/bin

# If no command-line arguments are given 
if [ $# -eq 0 ]
  # If standard input is a tty, print usage message and exit to
  # keep from locking up the terminal.
  then
  if [ -t 0 ]
    then
      echo "$0 - shell script to perform local printing\n"
      echo "Usage:\n     $0 <file(0)>     or"
      echo "    <command> | $0\n"
      exit 2
    # If standard input is not a tty, use standard input.
    else
      filelist="-"
    fi
# Otherwise, use command-line arguments as inpit.
else
  filelist="$*"
fi

# The following escape sequence will lock the keyboard and turn
# on transparent print mode for a Wyse 60 terminal.  Change this
# line as necessary for your type of terminal.
#echo "\033#\033d#\c"	# Wyse 60 codes
echo "\033[5i\c"	# Ansi codes

# Send each file to the terminals printer
for file in "$filelist"
do
  cat "$file" 2>&1
  # If you do not want a pare eject sent at the end of each
  # file, delete the next line
  echo "\f\c"
done

# The next line sends the escape sequence to unlock the 
# keyboard and turn off transparent print for the Wyse 60.
# Change this line as necessary for your type of terminal.
#echo "\024\033\"	# Wyse 60 codes
echo "\033[4i\c"	# Ansi codes

sleep 5

# Successful exit
exit 0



More information about the Comp.unix.xenix mailing list