SUMMARY:Printing from SGI to Sun

From: Kevin A. Noll (knoll@csl-emh2.army.mil)
Date: Wed Sep 28 1994 - 01:48:53 CDT


My original posting was regarding printing from an SGI Irix machine
to a SunOS 4.1.3_U1 machine.

Thanks for all the responses.

Pretty much everyone told me that I needed to install the BSD LPR
option from the install media for Irix. That option is something
like

I eoe2.man.bsdlpr 09/18/92 BSD Line Printer Spooling Utilities Manual
                                        Pages

and

I eoe2.sw.bsdlpr 08/12/93 BSD Line Printer Spooling Utilities

as seen from the install routines.

The extension to this is that lpr is not the standard for printing things
from the desktop under Irix, but lp is. THis means that in order to print
things from the X-windows (or whatever they call it in Irix) desktop
applications you have to print to a file and then use lpr to print the file.

Several ppl sent me the following script to use as an interface between lp
and lpr in order to avoid that extra step in the printing process. It
is installed as a model file and simply invokes lpr in the printing process.

----begin --------------snip snip --------- cut cut ------- lptolpr -----

#!/bin/sh
#
# lp interface that invokes lpr. lpr can then invoke a network printer.
# This file allows printing to lpr from workspace.
#
# Instructions:
#
# Before beginning set up the /etc/printcap and the lpr software.
#
# 1. Create this file in /usr/spool/lp/model. Filename is lptolpr
# 2. Change the file to be owned by lp:
# # chown lp lptolpr
# # chgrp lp lptolpr
# 3. Set the -P argument to lpr in the code below. Here it is set to
# 'remote'. It should be set to the name of the LPR spooler set-up
# on this system.
# 4. Install the print spooler:
# # /usr/lib/lpshut
# # /usr/lib/lpadmin -p<printer_name> -v/dev/null -mlptolpr
# # /usr/lib/lpsched
# # /usr/lib/accept <printer_name>
# # enable <printer_name>
# # /usr/lib/lpadmin -d<printer_name>
#
# <printer_name> = the name of the lp printer on this system.
#
# To remove the lp printer:
# # /usr/lib/lpshut
# # /usr/lib/lpadmin -x<printer_name>
#
# The command "/usr/lib/lpadmin -d<printer_name>" sets the
# default printer. You can also set the default printer from
# the Print Manager utility.
#
# This installation will make a copy of /usr/spool/lp/model/lptolpr in the
# directory: /usr/spool/lp/interface under the name <printer_name>
#
# Debugging: Chances are you can not type this file in without
# an error. To find a line with the error invoke the script directly
# with the command: 'lptolpr 0 0 0 1 0 /etc/passwd'. If the script is
# ok the passwd file will print. If there is a bug you will see the
# line number of the bug.
#
# START CODE
#
# This line is needed to print from workspace:
TYPE=Dumb
#
# Grab command line arguments
seqid=$1 # Not used
name=$2i # Not used
title="$3" # Not used
copies=$4
options="$5" # Not used
shift; shift; shift; shift; shift
files="$*"

# Print the files
i=1
while [ $i -le $copies ]
do
        for file in $files
        do

# v---- This is the name of the lpr printer
# on this system.

                lpr -Premote "$file"
# ^-- Leave a space here
# (common edit error)
        done
        i=`expr $i + 1`
done

exit 0

-----end ------------ cut cut -------- snip snip --------- bsdtolpr------

This script (according to karl@water.ca.gov ) is available in a FAX
from SGI regarding the lpr printing system.

BTW you need to read the instructions at the top of the script.

This looks like the easiest and quickest option.

----

The other way to do the printing was suggested by bbrq990@b-r.com (Raymond Trzaska)

His suggestion was to crate a model on the SGI that would rcp the file to the Sun and then rsh to the sun to print it. For example: rcp myfile myserver:/tmp/myfile rsh myserver lpr /tmp/myfile

would be the 'guts' of the model.

----

Considering certain security restrictions we have at our site, the rcp/rsh option is not preferable because it requires us having entries in the /etc/host.equiv or .rhosts. Unfortunately I may not have a choice if I am unable to get the installation media from the folks that loaned us the machine.

I have not been able to test any of the suggestions that I was given because of the lack of the install media, time (what's that?:-), priorities from higher up, etc...

If I have any problems with which ever one I choose I will repost this summary with additional comments.

Many thanks go to all the ppl who responded:

karl@water.ca.gov leg@inel.gov upkar@hub.eng.wayne.edu (Upkar Singh Kohli) John Benjamins <johnb@blas.cis.mcmaster.ca> Dale Carstensen <dlc@c3serve.c3.lanl.gov> farrell@mr.med.ge.com (Brian Farrell 4-6531) Kjell Eidem <Kjell.Eidem@regtek.sintef.no> raoul@MIT.EDU bbrq990@b-r.com (Raymond Trzaska) Richard Butler <richard@biocell.irmkant.rm.cnr.it> yu@math.duke.edu (Yunliang Yu) Cory Tsang <cory@fiu.edu> ZIPSER@SKYNET.SSD.LMSC.LOCKHEED.COM wayne@dcs-systems.com (Wayne Brock) kinscoe@ccmail.crc.com Mike <crumrine@erenj.com> rauthenberg@HHI.DE (Stefan Rauthenberg) weitzel@burke.com (David Weitzel) Glenn Rickersey <glennr@wormald.com.au> W.Edmunds@exeter.ac.uk

--kan-- -- Kevin A. Noll, KD4WOZ kan@crc.com Electrical Engineer (407) 352-3700 vox Coleman Research Corporation Orlando, FL #define PWD "Carlisle Barracks, PA"



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:10 CDT