SUMMARY:Printing from SGI to Sun

From: Kevin A. Noll (
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

I 09/18/92 BSD Line Printer Spooling Utilities Manual


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 -----

# 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.
# This line is needed to print from workspace:
# Grab command line arguments
seqid=$1 # Not used
name=$2i # Not used
title="$3" # Not used
options="$5" # Not used
shift; shift; shift; shift; shift

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

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

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

exit 0

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

This script (according to ) 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 (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: (Upkar Singh Kohli) John Benjamins <> Dale Carstensen <> (Brian Farrell 4-6531) Kjell Eidem <> raoul@MIT.EDU (Raymond Trzaska) Richard Butler <> (Yunliang Yu) Cory Tsang <> ZIPSER@SKYNET.SSD.LMSC.LOCKHEED.COM (Wayne Brock) Mike <> rauthenberg@HHI.DE (Stefan Rauthenberg) (David Weitzel) Glenn Rickersey <>

--kan-- -- Kevin A. Noll, KD4WOZ 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