[comp.dcom.modems] Attached printers over modems

dpavey@cccbbs.UUCP (doug pavey) (05/25/91)

Does anyone have an idea of how one might be able to setup a printer
on a unix system such that a remote user, calling in over a modem can
print on his local printer?
My plight is getting desparate.  I need to put together some method for
doing this soon.  My employer is getting frustrated with me and my
co-workers for not coming up with a solution for this problem.
I need some help developing the necessary entries in a printer model,
very little documentation is provided with the system to assist one
in this endeavor.
A sample script would be helpful, determining what terminal type is
in use (wyse 60 or VT100 for example use different start/stop sequences
for the printer) and how to use terminfo, printcap or whatever to determine
those sequences if defined.
If this is not the appropriate newsgroup, please forward it to that area.
I am on a waffle connection and do not have ftp access.  E-mail or post
responses please.

Ad-Thanks-vance


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Douglas A. Pavey
Programmer/Analyst
Syncor International
+1 513/984-2839 9-5 EDT
dpavey@cccbbs.UUCP

This is not an official document of Syncor International.  
This work is the sole responsibility of the author and has not been

jhoward@helps.cactus.org (James Howard) (05/29/91)

In article <9u5g34w164w@cccbbs.UUCP> dpavey@cccbbs.UUCP (doug pavey) writes:
>Does anyone have an idea of how one might be able to setup a printer
>on a unix system such that a remote user, calling in over a modem can
>print on his local printer?
>...

Here is the shell script used here.  We only have VT100 terminals calling.
You could use if statements based on the "$TERM" to select the correct
strings to use the local printer.

Also following is an old artical on the same subject.

----------cut----------cut----------cut----------cut----------cut----------
:
echo "\033[5i\c"
if [ $# -ge 1 ]
then
	files="$*"
	for file in $files
	do
		cat "$file" 2>&1
		echo "\014\c"
	done
else
	cat -
	echo "\014\c"
fi
echo "\033[4i\c"
sleep 1
exit 0
#
# Clarence A Dold - dold@tsmiti.Convergent.COM		(408) 434-5293
# 		...pyramid!ctnews!tsmiti!dold
# 		P.O.Box 6685, San Jose, CA 95150-6685	MS#10-007
# 
# Article 1588 of comp.unix.xenix:
# From: dold@mitisft.Convergent.COM (Clarence Dold)
# Newsgroups: comp.unix.xenix
# Subject: Re: LOCAL PRINTING (LPRINT) UNDER XENIX -  NEED HELP!
# Message-ID: <699@mitisft.Convergent.COM>
# Date: 19 May 89 16:11:46 GMT
# References: <133@tdl.UUCP>
# Organization: Convergent Technologies, San Jose, CA
# Lines: 68
# 
# in article <133@tdl.UUCP>, raulin@tdl.UUCP (Raulin Olivera) says:
# 
# > 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
# 
# > 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 
# 
# The codes that cause a vt100 terminal to turn on printing to a second
# serial port are recognized both by MS-DOS Kermit and ProComm.  In both
# cases, it causes print to go to PRN:, which is normally a parallel printer.
#  
# You can either have someone use 'local' instead of 'lp' as their print
# program: ( local /etc/passwd ), or you can install an lp printer
# using an interface that sends the same codes, and -v set to each of
# the available ports.
# The 'lp' method is pretty ugly but it works.  /etc/profile could then set 
# LPDEST to some printer name, based on the terminal line in use.
# You can't use '/dev/tty', since the lp spooler has no attached tty.
# This method is really only for programs hard-coded to drive lp.
# Any configurable program should be set up to use 'local', or whatever
# you might call it.
# 
# If you are using some smart XENIX serial port board, there are ways
# to do simultaneous print, this shell script freezes the terminal until
# printing is done.
#
# For a terminal or emulator understands ansi local print controls.
# see pg 29 of TERMINFO(4) in CTIX Version C manual for detail.
# Media copy strings for ansi:
# mc5i - echo "\033[5i\c" - print without displaying to screen
# mc4  - echo "\033[4\c"  - turn off local print
# presumably 'tput mc5i' would work in place of the echo strings below.

___

James Howard          Howard Electronic Laboratories Products & Services
AA5R           cs.utexas.edu!helps!jhoward  or  jhoward@helps.cactus.org