[comp.sys.sgi] Remote printing

meyer@unizh.UUCP (10/26/88)

Hello World,

We are running an Iris 4D/70G in an ethernet. What we would like is
to set up the printer spooling system s.t. spooled files are forwarded
somehow to our VAX via ethernet. Then the VAX takes over and prints
the files on a laserwriter.
This would be no problem on a BSD-like system using rm in /etc/printcap.
As far as I know SYS V does not offer something similar.

Could anybody tell me how to proceed?

Urs Meyer
---
University of Zurich,		{uunet,...}!mcvax!cernvax!unizh!meyer
Dept. of Computer Science,	meyer%ifi.unizh.ch@relay.cs.net
CH-8057 Zurich			K114930@CZHRZU1A.BITNET

blbates@AERO4.LARC.NASA.GOV (Brent Bates TAD/ACB ms294 x2601) (10/28/88)

     That is real fun.  We have an IRIS 3130, but I think the process is the
same.  Our IRIS Owner's Guide has a section on installing a remote printer.
Your manuals should also have a similar section, but I'll give you a brief
idea what ours says.  In /usr/spool/lp/etc/util there are a few printer
utilities.  I executed the script mknetpr to get things started.  This script
sets up various files and lpadmin stuff.  One of the files modified, 
/usr/spool/lp/etc/lib/netprinterface, is change and moved to
/usr/spool/lp/interface directory.  This file is the interface between your
Iris and the remote printer.  It basically rcp's the file to be printed to
scratch space on the remote machine, then rsh's a command on the remote machine 
to have the file printed.  Isn't System V printer handling fun!?  Give me
BSD any day.  I have yet to find anything in V that is better than BSD.
AT&T needs to make their Unix more like BSD.
     If you have any more questions just ask.

rpaul@dasys1.UUCP (Rod Paul) (10/29/88)

If your VAX is running Sys V check out 'mknetpr' on the IRIS.

kur7@tank.uchicago.edu (Shin Kurokawa) (04/13/90)

Any suggestions on how I can make a 4D/220 to access the printer
that is physically connected to a BSD unix system on the
network? Here's what I've done so far... 

I've created an account "lp" on the BSD unix machine. This
account's default directory is /usr/spool/printer_name_here, and
the default shell is /bogus_shell. This is one way the BSD
systems allow remote printing among themselves;and we've been
quite successful in doing so with several BSD machines trying to
print using the printer that's physically attached to a BSD
machine. Of course, the names of those machines which can print
using this printer are listed in /etc/hosts/lpd in the 'main'
BSD machine(the one with the printer on it). I put the name of
the SG 220 in there, restarted inetd, even rebooted the whole
thing, but what I get on the SG screen is an error message which
goes something like "/bogus_shell is not an available
printer..." I even tried putting the actual name of the printer
there (in the default shell field of the passwd file) and
surprisingly it says that it's not an available printer (even
though the same printer is actually an available printer, at
least from the BSD community! :-). 

Since we just received the SG unit several weeks ago without any
manuals (we're still waiting for that!), I haven't been able to
RTFM. Please help me out, if you can. Thanks in advance! 

Shin Kurokawa                           kur7@tank.uchicago.edu
Physical Sciences Numerical Calculation Laboratory, University of Chicago
5640 S.Ellis Ave., Chicago, IL 60637 USA

usenet@nlm-mcs.arpa (usenet news poster) (04/13/90)

In article <8448@tank.uchicago.edu> kur7@tank.uchicago.edu (Shin Kurokawa) writes:
>
>Any suggestions on how I can make a 4D/220 to access the printer
>that is physically connected to a BSD unix system on the
>network? 

A real simple hack that can be set up easily is to create a shellscript file
with the following commands:

cat $1 | rsh PRINTER_HOST lpr 

you need to have an account on the PRINTER_HOST machine and need to setup
a .rhosts file, but then you can print transparently.  It is very useful
when you are working on a remote system that is not particularly well
integrated with your own and want to be able to print locally.

David States

jweldon@renegade.sgi.com (Jack P. Weldon) (04/14/90)

In article <8448@tank.uchicago.edu> kur7@tank.uchicago.edu (Shin Kurokawa) writes:
>
>Any suggestions on how I can make a 4D/220 to access the printer
>that is physically connected to a BSD unix system on the
>network? Here's what I've done so far... 
>
I've posted a solution to this a number of times, and probably sent out over
40 copies of it over email to requestors.  I have a "public-domain" version
of lpr/lpq in source form that I will send to anyone that requests it.  I 
know that it has also been archived in the info-iris.archives as well.

A second solution is to port the 4.3BSD lp suite to the IRIS--the diffs have
been posted to this newsgroup a few times.

I know that SGI will be implementing a BSD lpr (client-only) in a "future 
release". I think you will like it, as well as other BSD compatibility
enhancements.

Cheers, 

Jack P. Weldon (jweldon@sgi.com)     
SGI Product Support Engineering

daveh@xtenk.sgi.com (David A Higgen) (04/14/90)

In article <6348@odin.corp.sgi.com>, jweldon@renegade.sgi.com (Jack P. Weldon) writes:

> I know that SGI will be implementing a BSD lpr (client-only) in a "future 
> release". I think you will like it, as well as other BSD compatibility
> enhancements.

It's in 3.3, coming momentarily. I don't know what you meant by client-only,
the version in 3.3 is a complete port of the BSD 4.3-tahoe lpr.


			Dave Higgen

buchanan@cs.ubc.ca (John Buchanan) (04/14/90)

In article <11968@nlm-mcs.arpa> states@tech.NLM.NIH.GOV (David States) writes:
>In article <8448@tank.uchicago.edu> kur7@tank.uchicago.edu (Shin Kurokawa) writes:
>>
>>Any suggestions on how I can make a 4D/220 to access the printer

>>that is physically connected to a BSD unix system on the
>>network? 
>

We have a printer hooked up to a PI, but would also like to provide access
to the other printers which are attached to BSD machines.  The following 
csh script has done the job for us.  It is slow but works.

#!/bin/csh -f

#
#	lpr fake for Sys V
#
# 	Fake a minimal lpr
#
#		John Buchanan 26 Feb 1990
#
#	the users must have a .rhosts which allows them access to both
#	hosts. 
set FILES = ()
set WOODY_HOST = abbott
set OTHER_HOST = grads

#default printer.

set PRINTER = woody

#available printers

set PRINTERS = (woody 				\
		garibaldi lw gari lw334		\
		tusk lw244			\
		clinker clink lwd lwdraft	\
		fissile lw332			\
		wedge lw312 			\
		)
#
#Parse the arguments only -P is allowed right now.
#
while (${#argv} >= 1)
 	set flag = `echo $argv[1] | awk ' /\-..*/ {print substr($1,2,1) }'`
	if ($flag != "") then
		switch ($flag)
			case "P":
				set PRINTER = `echo $argv[1] | sed 's/-P//'`
				breaksw
			default:
				echo Unknown flag $argv[1]
				exit 1
		endsw
	else
		set FILES = ($argv[1] ${FILES})
	endif
		
	shift
end

#
# if no files we assume stdin
#

if ( ${#FILES}  == 0) then
	set FILES = ( /tmp/${USER}.lpr.tmp )
	cat > /tmp/${USER}.lpr.tmp	#copy stdin to /tmp
endif


#check to see if it is a valid printer

set NOT_VALID = 1

foreach i ($PRINTERS)
	if ($i == $PRINTER) set	NOT_VALID = 0
end


if ($NOT_VALID == 1) then
	echo Sorry: the printer $PRINTER is unknown
	echo known printers are $PRINTERS
	exit 1
endif

#
#	set up the printer spec
#
if ( ${PRINTER} == woody ) then
	set PRINT_HOST = ${WOODY_HOST}
	set LP = "lp -c -o-h  -dwoody"
else
	set PRINT_HOST = ${OTHER_HOST}
	set LP = (lpr -P${PRINTER} )
endif



#
# for each file copy to /tmp on the PRINT_HOST machine and then
# print them out.
#
foreach i (${FILES})
	rcp $i ${PRINT_HOST}:/tmp/lpr.${USER}.from.imager
	rsh ${PRINT_HOST} $LP  /tmp/lpr.${USER}.from.imager
	rsh ${PRINT_HOST} /bin/rm /tmp/lpr.${USER}.from.imager
end


#remove tmp file if input was stdin.
	
if (-e /tmp/${USER}.lpr.tmp ) /bin/rm  /tmp/${USER}.lpr.tmp	

#end of lpr