home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!sgigate!odin!twilight!news.csd.sgi.com!lodi.csd.sgi.com!niblett
- From: niblett@lodi.csd.sgi.com (Ray Niblett)
- Newsgroups: comp.sys.sgi.admin
- Subject: Re: Printing with lpr on an IRIS
- Message-ID: <1993Jan7.193405.20079@news.csd.sgi.com>
- Date: 7 Jan 93 19:34:05 GMT
- References: <1993Jan7.165829.28175@athena.mit.edu>
- Sender: news@news.csd.sgi.com (Net News CSD)
- Organization: Silicon Graphics, Inc.
- Lines: 407
-
- On solution is to set up lpr such that it sends all files to
- lp:
-
-
-
-
- Silicon Graphics Technical Support
- ____________________________________________________________
-
- Integrating The AT&T Spooler With The BSD LPR Print Spooler
-
-
-
-
-
-
- ____________________________________________________________
- | Support Statement |
- |___________________________________________________________|
- | SGI does not support |
- | configuring the BSD LPR print |
- | spooler locally (you can not |
- | have the printer physically |
- | connected to an SGI system). |
- | If you want to be a print |
- | server then you will need to |
- | refer to the Communications |
- | guide for setting up printers |
- | for the SYSTEM V LP spooling |
- | system. |
- | However, SGI system users have |
- | requested any available |
- | information on this subject, |
- | whether or not it is |
- | supported. |
- |___________________________________________________________|
-
- You can not use the System Manager's printer tool to
- configure a BSD LPR spooling system, nor can you use the
- mknetpr(1M) command for configuring a network printer. Both
- of these utilities only support the SYSTEM V LP spooling
- system.
- This document will assist you in configuring the IRIS so
- that other systems will be able to submit print jobs to the
- LPR spooler, which will then pass the job to the LP spooler
- for local printing.
- Before beginning to use this document, you should have
- already configured and tested the LP print spooler.
-
-
-
-
-
-
-
-
-
-
-
-
-
- ____________________________________________________________
-
- February 13, 1992 -xx Page 1
-
-
-
-
-
-
-
-
- Silicon Graphics Technical Support
- ____________________________________________________________
-
- Verifying the BSD LPR Subsystem was Properly Installed
-
-
-
- The BSD LPR subsystem is only available on IRIX version
- 3.3.1 or greater. If you have an earlier release/version of
- the IRIX Operating System you will need to upgrade to at
- least 3.3.1 prior to proceeding with the installation
- instructions. You should be able to verify the version of
- software that you are running by entering the following
- command:
- # uname -r
- Enter the following command to verify that the BSD LPR print
- spooling system was properly installed.
- # versions long | grep eoe2.sw.bsdlpr
- Your output should be:
- eoe2.sw.bsdlpr etc/init.d/lpd
- eoe2.sw.bsdlpr etc/printcap
- eoe2.sw.bsdlpr etc/rc0.d/K26lpd
- eoe2.sw.bsdlpr etc/rc2.d/S61lpd
- eoe2.sw.bsdlpr usr/bsd/lpq
- eoe2.sw.bsdlpr usr/bsd/lpr
- eoe2.sw.bsdlpr usr/bsd/lprm
- eoe2.sw.bsdlpr usr/bsd/lptest
- eoe2.sw.bsdlpr usr/etc/lpc
- eoe2.sw.bsdlpr usr/etc/lpd
- eoe2.sw.bsdlpr usr/etc/pac
- eoe2.sw.bsdlpr usr/lib/lpf
- eoe2.sw.bsdlpr usr/spool/lpd
- The BSD spooler is not loaded by default. Most users will
- have to use inst(1M) and select the manual option, to
- install this subsystem.
- Please make sure you execute the versions command (versions
- long | grep eoe2.sw.lpr) to verify that you have the entire
- subsystem loaded. Just having an /etc/printcap file is not
- enough.
- If you don't have the subsystem installed and would like to
- do the installation please refer to your Release Notes,
- Installation guide or the System Administrator's Guide.
-
-
-
-
-
-
-
-
-
-
-
-
-
- ____________________________________________________________
-
- February 13, 1992 -xx Page 2
-
-
-
-
-
-
-
-
- Silicon Graphics Technical Support
- ____________________________________________________________
-
- Configuring the /etc/printcap file
-
-
-
- You will need to edit the /etc/printcap file manually.
- Please make sure you format the entries correctly. The
- /etc/printcap file expects information in a format similar
- to /etc/termcap.
- This document will show you an example of how to configure
- each option of the printcap file on separate lines. There
- will be explanations of both examples.
- Please note that the printcap file is very sensitive to
- syntax errors. The name field must begin at the first
- character on a line of the /etc/printcap file. The printer
- names must be separated by pipe symbols (the vertical bar
- ``|''). The name line must be terminated with a colon
- followed by a backslash (``:\''). Make sure that there are
- no spaces, tabs, or any other character after the backslash.
- The definition lines must begin with a tab character
- followed by a colon (``:''), followed by the field you are
- defining, followed by an equal sign. The definition line
- must end with a colon. If you are using multiple lines, see
- example two.
- There is only one name and five definition fields that must
- be specified. They are:
-
- name This should be all the names the printer will be
- accessed as. It should include ``lp'' so ``lpr''
- without a printer name will work. The names are
- separated with pipe symbols.
-
- :lp= (line printer) The name of the device to use. Use
- /dev/null.
-
- :sd= (spool directory) The name of your local spool
- directory. If you don't use the default directory
- /usr/spool/lpd, you will need to create the directory
- by using the mkdir(1M) command.
-
- :lf= (log file) This is the LPR log file. Use
- /usr/spool/lpd/lp-log.
-
- :sh (supress header) This will supress the LPR header
- (banner) page. It has no affect on the LP banner
- page.
-
- :of= (output filter) This is the name of the filter to send
- all output through. Use /usr/spool/lp/etc/lprtolp.
- You will create this file in this procedure.
-
-
-
- ____________________________________________________________
-
- February 13, 1992 -xx Page 3
-
-
-
-
-
-
-
-
- Silicon Graphics Technical Support
- ____________________________________________________________
-
- Configuring the /etc/printcap file
-
-
-
- Printcap example(/etc/printcap)
-
- lp:\
- :lp=/dev/null:\
- :sd=/usr/spool/lpd:\
- :lf=/usr/spool/lpd/lp-log:\
- :sh:\
- :of=/usr/spool/lp/etc/lprtolp:
- The printer can be accessed by the following name:
- lp
- The local spool directory is called:
- /usr/spool/lpd
- The device where the LPR spooler will actually output data
- is /dev/null. This is because the data will actually be
- sent to the LP spooler by lprtolp before LPR can output it.
- The log file for LPR is:
- /usr/spool/lpd/lp-log
- The output filter for LPR is:
- /usr/spool/lp/etc/lprtolp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ____________________________________________________________
-
- February 13, 1992 -xx Page 4
-
-
-
-
-
-
-
-
- Silicon Graphics Technical Support
- ____________________________________________________________
-
- Configuring for Lprtolp
-
-
-
- You will need to edit the /usr/spool/lp/etc/lprtolp file
- manually. Please make sure you format the lines correctly.
- The first line of the file must begin with ``#!'', followed
- by a single space, followed by /bin/sh.
-
- #! /bin/sh
- lp -s
-
- The shell /bin/sh will be invoked when the filter is called.
- All input to this filter will be sent to:
- lp -s
- Other options may be appropriate for LP depending on your
- particular printer type and configuration.
-
- You will also need to set permission correctly for this
- script to execute:
- # chown lp /usr/spool/lp/etc/lprtolp
- # chgrp lp /usr/spool/lp/etc/lprtolp
- # chmod 755 /usr/spool/lp/etc/lprtolp
-
-
-
- Configuring for Remote Access
- Put the hostname of any systems that will want to print in
- your /etc/hosts.equiv file, and verify that their IP address
- and hostname appear in their /etc/hosts file. They will
- need to add the your IP address and hostname to their
- /etc/hosts file.
-
-
-
- Configuring the log file
- You will need to make a log file and set permissions
- accordingly:
- # touch /usr/spool/lpd/lp-log
- # chmod 644 /usr/spool/lpd/lp-log
- # chown lp /usr/spool/lpd/lp-log
- # chgrp lp /usr/spool/lpd/lp-log
-
-
-
-
-
-
-
-
-
-
-
- ____________________________________________________________
-
- February 13, 1992 -xx Page 5
-
-
-
-
-
-
-
-
- Silicon Graphics Technical Support
- ____________________________________________________________
-
- Attempting to Print Using the LPR command
-
-
-
- Now that you have the /etc/printcap file configured, make
- sure that the daemon is running. Enter the following
- command:
- # ps -ef | grep lpd
- Your system should return something similar to:
- root 195 1 0 11:06:04 ? 0:00 /usr/etc/lpd
- root 1293 753 2 13:20:39 ttyq6 0:00 grep lpd
- The /usr/etc/lpd at the end of the lines indicates that the
- daemon is running. If you only got one line back (``grep
- lpd''), then start the lpd daemon by entering the following
- command:
- # /usr/etc/lpd
- Now if you do ``ps -ef | grep lpd'' you should see 2 lines
- returned to you.
- From the configuration pages, note that the printer is
- accessed by the name lp. By default the lpr command will
- look for the entry lp in the /etc/printcap file.
-
- Now enter the command:
- lpr filename
-
- After submitting your request to the printer. You can see
- if your job has made it to the print spooling queue by
- entering the following command:
- # lpq
- Your system should return something similar to:
- lp is ready and printing
- Rank Owner Job Files Total Size
- 1st guest 113 filename 851 bytes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ____________________________________________________________
-
- February 13, 1992 -xx Page 6
-
-
-
-
-
-
- --
-
- Ray Niblett
-
- PSE, Silicon Graphics
- niblett@sgi.com
-