[ba.general] LOCAL PRINTING

gary@rencon.UUCP (Gary Falsken) (05/10/89)

I have 5 modem lines coming into my 386 system with users calling in from
other locations using MS-DOS based equipment and Procomm Plus as the 
terminal emulator.  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?  I want/need to 
talk to someone who has either used lprint or can tell me how to do it.
Can it/Does it really work as advertised?  What about compressed print
and the like?  Please email me!  Thanks!
-- 
Gary Falsken 
internet: gary@rencon
usenet: {ames,pacbell,sun,pyramid,hpscdc,hplabs}!rencon!gary
         ---- is the preferred path.

raulin@tdl.UUCP (Raulin Olivera) (05/18/89)

In article <2446@rencon.UUCP>, gary@rencon.UUCP (Gary Falsken) writes:
> I have 5 modem lines coming into my 386 system with users calling in from
> other locations using MS-DOS based equipment and Procomm Plus as the 
> terminal emulator.  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?  I want/need to 
> talk to someone who has either used lprint or can tell me how to do it.
> Can it/Does it really work as advertised?  What about compressed print
> and the like?  Please email me!  Thanks!
> -- 
> Gary Falsken 
> internet: gary@rencon
> usenet: {ames,pacbell,sun,pyramid,hpscdc,hplabs}!rencon!gary
>          ---- is the preferred path.

I can't really add a solution to this problem.  I hope someone on the
net can.  I am using Procomm with a hardwire connect and would like to
do the same thing.  Lprint didn't tell me much.  I imagine that you
can write your own interface script to send whatever codes necessary
to get remote printing to work.  The problem as I see it is that any
codes sent will be intercepted by Procomm while in terminal mode.  I 
don't know of any way to wake Procomm up in command mode so that you 
can tell it to send output to lpt? or com? without some keyboard
interaction.  You can always do the "Alt L" and cat the file to the
screen but that has some limitations.  SCO published an article in
their May/June 88 Discover magazine about remote printing through
a terminal.  The problem is that this method was designed for 
terminals with 2 ports.  The codes are intercepted by the terminal
which turn on the auxillary port (which is connected to a printer)
and sends data through it. 

Let me know what you find out.  I suppose that I will see any more
responses on the net.  Thanks for raising the question.

=Ralo->


interaction.  

jcg@sactoh0 (John C. Gonnerman) (05/23/89)

In article <2446@rencon.UUCP>, gary@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...)

raulin@tdl.UUCP (Raulin Olivera) (05/24/89)

In article <1001@sactoh0>, jcg@sactoh0 (John C. Gonnerman) writes:
> In article <2446@rencon.UUCP>, gary@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

epsilon@wet.UUCP (Eric P. Scott) (05/24/89)

In article <1001@sactoh0> jcg@sactoh0 (John C. Gonnerman) writes:
>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...)

Kermit 2.32/A for MS-DOS does this.  You can get it for free via
anonymous ftp from cunixc.cc.columbia.edu [128.59.40.130] in the
kermit/a directory.  BITNET and uucp distributions are also
available.

You can get also mail order from

          Kermit Distribution
          Columbia University Center for Computing Activities
          612 West 115th Street
          New York, NY  10025  (USA)

(ask for a current order form; last I checked, they wanted $20
for your choice of 5 1/4" or 3 1/2" diskette)

Kermit isn't shareware.  Yet it can be copied and distributed
freely, even included with commercial products (a version came
with our UNIX distribution).  I haven't seen anything else
(commercial or otherwise) I consider worth switching to.
And it doesn't make Procomm's annoying "squeak"!!!

Complete source code and machine-readable documentation (ASCII or
PostScript) are available and the "product support" is excellent.

See also: comp.protocols.kermit
	(or Info-Kermit@watsun.cc.columbia.edu)