Previous Table of Contents Next


The following example sets up a print server by using the following information:

  Printer name: seachild
  Network printer access name: nimquat:9100
  Protocol: tcp
  Timeout: 5
  Interface: /usr/lib/lp/model/netstandard
  Printer type: PS
  Content types: postscript
  Device: /dev/null
# lpadmin -p seachild -v /dev/null
# lpadmin -p seachild -i /usr/lib/lp/model/netstandard
# lpadmin -p seachild -o dest:nimquat:9100 -o protocol=tcp -o timeout=5
# lpadmin -p seachild -I postscript -T PS
# cd /etc/lp/fd
# for filter in *.fd;do
   > name=`basename $filter .fd`
   > lpfilter -f $name -F $filter
   > done
# accept castle
destination ` `castle' ` now accepting requests
# enable castle
printer ` `castle' ` now enabled
# lpadmin -p castle -D "PostScript printer"
# lpstat -p castle
  printer castle is idle. enabled since Mon Sep 15 08:45 1997.
available

Setting Up a PostScript Print Client by Using LP Commands

This section describes how to set up a SunOS 5.0 print client to print on a SunOS 4.x print server that has a PostScript printer installed. You must complete the following tasks so the print client can use the printer connected to the print server:

  Identify the printer and server system to which the printer is connected.
  Define the characteristics of the printer.
  Set up the print filters.

You must have a network that enables access between systems to set up print clients. If your network is running NIS or NIS+, follow the appropriate procedures for enabling access between systems. If your network is not running NIS or NIS+, you must include the Internet address and system name for each print client in the /etc/hosts file on the print server. You must also include the Internet address and system name of the print server in the /etc/hosts file of each print client system.

Before you start, you need superuser privileges on the print client system. You also need the name of the printer and the name of the print server system. You do not need to specify a printer type or file content type for a printer client. If no printer type is specified, the default is unknown. If no file content type is specified, the default is any, which allows both PostScript and ASCII files to be printed on a PostScript printer.

To set up a PostScript print client:

1.  Become superuser on the print client system.
2.  Type lpsystem -t bsd server-system-name and press Return. The print server system is identified as a BSD (SunOS 4.x) system.
3.  Type lpadmin -p printer-name -s server-system-name and press Return. The printer and the server system name are registered with the client LP print service.
4.  Type cd/etc/lp/fd and press Return.
5.  Type lpfilter -f download -F download.fd and press Return.
6.  Typelpfilter -f dpost -F dpost.fd and press Return.
7.  Type lpfilter -f postio -F postio.fd and press Return.
8.  Type lpfilter -f postior -F postior.fd and press Return.
9.  Type lpfilter -f postprint -F postprint.fd and press Return.
10.  Typelpfilter -f postreverse -F postreverse.fd and press Return. The PostScript filters are installed.
11.  Type accept printer-name and press Return. The printer is now ready to begin accepting (queuing) print requests.
12.  Type enable printer-name and press Return. The printer is now ready to process print requests in the print queue.
13.  (This step is optional but recommended.) Typelpadmin -d printer-name and press Return. The printer you specify is established as the default printer for the system. You should define a default printer even if there is only one printer configured for a system.
14.  Type lpstat -t and press Return. Check the messages displayed to verify that the printer is accepted and enabled.
15.  Type lp file-name and press Return. If you have not specified a default printer, type lp -d printer-name file-name and press Return. The file you choose is sent to the printer.

If you want to set up SunOS 5.0 print clients and print servers in addition to setting up the LP print system, you must also configure the port monitors using the Service Access Facility. See Chapter 3, "Administering Devices," for information on how to set up the port monitors. If you use the Solaris 2.1 Printer Manager, the port monitors are configured for you automatically. See Appendix A, "Major Differences: SunOS 4.x Versus SunOS 5.x Operating Systems," for information about the Printer Manager. To set up a SunOS 5.0 print client, in place of step 2 in the procedure described above, type lpsystem server-system-name and press Return. The print server system is identified as a SunOS 5.x system.

Using Printing Commands

The following sections describe how to use lp to submit requests from a command line. When a request is made, the LP print service places it in the queue for the printer, displays the request ID number, and then redisplays the shell prompt. The lp command has many options that can modify the printing process, as summarized in Table 6-4 earlier in the chapter. For a complete list of options, see the lp(1) manual page.

Printing to the Default Printer

When the LP print service is set up with a default printer, users can submit print requests without typing the name of the printer. Type lp file-name and press Return. The file specified is placed in the print queue of the default printer, and the request ID is displayed.

The following example will print the /etc/passwd file:

pine% lp /etc/passwd
request id is pinecone-8 (1 file)
pine%


Previous Table of Contents Next