LOCAL PRINTING (LPRINT) UNDER XENIX - NEED HELP!

Clarence Dold dold at mitisft.Convergent.COM
Sat May 20 02:11:46 AEST 1989


in article <133 at tdl.UUCP>, raulin at tdl.UUCP (Raulin Olivera) says:

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



	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 at tsmiti.Convergent.COM		(408) 434-5293
		...pyramid!ctnews!tsmiti!dold
		P.O.Box 6685, San Jose, CA 95150-6685	MS#10-007



More information about the Comp.unix.xenix mailing list