Next | Prev | Up | Top | Contents | Index

Configuring the BSD lpr Spooler System

Silicon Graphics does not support configuring the BSD lpr print spooler locally (you cannot have the printer physically connected to a Silicon Graphics system). For information about configuring a BSD lpr print spooler on another system, refer to any documentation describing the standard BSD operating system (refer to "Additional Resources" on page xvi). Print requests can be submitted to a BSD print server once it is configured.

The BSD lpr print spooler allows you to access print servers that are attached to other systems on the network. Please be sure to check the other systems, or contact the System Administrator, to verify the type of spooling system those systems are using. Generally speaking, if a system has an /etc/printcap file configured, it is using the BSD lpr print spooling system.

Note: Do not use the mknetpr command for configuring a BSD network printer. This utility supports only the System V lp Spooling System on Silicon Graphics systems. Verify that the System Administrator of the BSD print server system includes your hostname in the print server system's /etc/hosts.equiv file, and that your IP address and hostname appear in the print server system's /etc/hosts file. You must add the print server system's IP address and hostname to your system's /etc/hosts file.

If your files (documents) do not print once you have configured the BSD print spooler, see "Troubleshooting the BSD lpr Spooling System". The troubleshooting section takes you to the point where you can see a copy of your document on the print server system. If the document disappears from the print server system's queue without printing, contact the System Administrator of that system for further assistance.


Verifying Installation of the BSD lpr Subsystem

Enter the following command to verify that the BSD lpr print spooling system was properly installed:

versions -av | grep print.sw.bsdlpr 
Example output of this command looks like this:

print.sw.bsdlpr etc/init.d/lpd print.sw.bsdlpr etc/printcap print.sw.bsdlpr etc/rc0.d/K26lpd print.sw.bsdlpr etc/rc2.d/S61lpd print.sw.bsdlpr usr/bsd/lpq print.sw.bsdlpr usr/bsd/lpr print.sw.bsdlpr usr/bsd/lprm print.sw.bsdlpr usr/bsd/lptest print.sw.bsdlpr usr/etc/lpc print.sw.bsdlpr usr/etc/lpd print.sw.bsdlpr usr/etc/pac print.sw.bsdlpr usr/lib/lpf print.sw.bsdlpr usr/spool/lpd
The BSD spooler is not loaded by default. Check to see if the subsystem is installed. If it is not, refer to IRIX Admin: Software Installation and Licensing and/or your release notes. Most users must use the inst command to install this subsystem.

Use the versions command (versions -av | grep print.sw.bsdlpr) to verify that you have the entire subsystem loaded. Creating an /etc/printcap file is not sufficient.

After you verify that the print.sw.bsdlpr subsystem is installed, edit the /etc/printcap file to configure the lpr spooling system. There are no tools to perform this function, so you need to edit the file manually. The remainder of this subsection takes you through this process. Ensure that you format the entries correctly. The /etc/printcap file expects information in a format similar to that in the /etc/termcap file.


Configuring the Printcap File

Before you begin editing the /etc/printcap file, log in to your system as root.

Note: The printcap file is very sensitive to syntax errors. The name field must begin at the first character on a line. The print server 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. See "Printcap Examples."

There are one name and three definition fields that must be defined. They are:

name

This field must contain all the names the print server can be accessed as. It should include lp because, by default, lpr looks for lp in the name field of the /etc/printcap file. The names are separated with pipe symbols.

:rm

Remote print server system name. This is the name of the system that has the print server physically connected to it.

:rp

Remote print server name. This is the name of the remote print server on the print server system that you are trying to access.

:sd

Spool directory. This is the name of your local spool directory. If you don't use the default directory, /usr/spool/lpd, you must create the directory using the mkdir command.

Printcap Examples

Following are two examples that can help you edit the /etc/printcap file. Example 2-11 shows how to configure the printer configuration file in two lines. Example 2-12 shows how to configure each option of the printcap file on a separate line. The examples are followed by explanations.

Example 2-11 : Printcap Example 1

lp|sleepy|sleepyprinter:\

:lp=:\:rm=snowwhite.story.land:rp=doc:sd=/usr/spool/lpd:

Example 2-12 : Printcap Example 2

lp|sleepy|sleepyprinter:\
    :lp=:\
    :rm=snowwhite.story.land:\
    :rp=doc:\
    :sd=/usr/spool/lpd:
The examples show the print server can be accessed by the names lp, sleepy, and sleepyprinter.

The print server system (where the print server is physically attached) is called snowwhite.story.land.

The name of the print server on the print server system is doc.

The local spool directory is called /usr/spool/lpd.


Using the lpr Command to Print

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 path at the end of the line indicates that the daemon is running. If only one line was returned (grep lpd), then start the lpd daemon by entering the following command:

/usr/etc/lpd

Now, if you type ps -ef | grep lpd, you should see two lines.

As shown in "Printcap Examples", the print server can be accessed by three names; lp, sleepy and sleepyprinter. By default, the lpr command looks for the field lp in the /etc/printcap file. If this is not the first name in the name field, then you need to do one of two things:

Now you can enter the command:

lpr filename

After submitting your request to the print server, 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 nina 113 filename 851 bytes

Verifying Installation of the BSD lpr Subsystem
Configuring the Printcap File
Printcap Examples
Using the lpr Command to Print

Next | Prev | Up | Top | Contents | Index