Using Print Client Commands

A system becomes a print client when you install the Sun print client software and enable access to remote printers on the system. The Sun print client commands have the same names and produce the same output as the print commands of the previous Solaris releases.

The Solaris print client commands use a greater number of options to locate printer configuration information than in the previous Solaris Operating Environment, and the client communicates directly with the print server.

The lp print command locates a printer and printer configuration information in the following sequence.

  • Users can specify the name of a printer as part of the lp print command.When the user specifies a printer, lp checks to see if the specified destination printer name or printer class is specified in one of the three valid styles—atomic, POSIX, or context-based. See “Print Request Submission” for more information.

  • If the user did not specify a printer name, the search for a suitable default printer follows the sequence below.

    • If the user did not specify a printer name or class in a valid style, the command checks the user's PRINTER or LPDEST environment variable for a default printer name. Note that PRINTER takes priority over LPDEST and is probably searched only if the /etc/nsswitch.conf file has a printers: files entry.

    • If neither environment variable for the default printer is defined, the command checks the .printers file in the user's home directory for the _default printer alias.

    • If the command does not find a _default printer alias in the .printers file, it then checks the Sun print client's /etc/printers.conf file for configuration information.

  • If the printer is not found in the /etc/printers.conf file and the printers: entry in the /etc/nsswitch.conf file enables searches in the nameservices such as nis, nisplus, xfn, or ldap, then, the lp command checks them in the specified order.

The client does not have a local print queue. The Sun print client sends its requests to the queue on the specified print server. The client writes the print request to a temporary spooling area only if the print server is not available or if an error occurs. This streamlined path to the server decreases the print client's use of resources, reduces the chance for printing problems, and improves performance.

Printer Configuration Resources

This section describes the resources that the print client commands use to locate printer names and printer configuration information.

The print client commands introduced in the Solaris release can use a nameservice, which is a shared network resource, for storing printer configuration information for all printers on the network. The nameservice—NIS, NIS+, or NIS+ (xfn)—simplifies the maintenance of printer configuration information. When you add a printer in the nameservice, all print clients on the network can access it.

The Sun print client software locates printers by checking the following resources.

  • Atomic, POSIX, or context-based printer name or class (see “Print Request Submission” below for more information).

  • User's PRINTER or LPDEST environment variable for the default printer.

  • User's .printers file for a printer alias.

  • Sun print client's /etc/printers.conf file.

  • Name service—NIS, NIS+, or NIS+ (xfn).

Print Request Submission

Users submit a print request from a print client by using either the lp or lpr command. The user can specify a destination printer name or class in any of the following three styles.

  • Atomic style, which is the print command and option followed by the printer name or class and the file name.

    									lp -d
    									printer-name filename
    								
  • POSIX style, which is the print command and option followed by server:printer and the file name.

    									lpr -P
    									server:printer filename
    								
  • Context-based style, as defined in the Federated Naming Service Guide in the Solaris Software Developer AnswerBook®.

    									lpr -d
    									dept-name/service/printer filename
    								

Summary of the Print Client Process

This section summarizes the print client process.

  1. A user submits a print request from a print client with a print client command (lp or lpr).

  2. The print client command checks a hierarchy of print configuration resources to determine where to send the print request.

  3. The print client command sends the print request directly to the appropriate print server. A print server can be any server that accepts BSD printing protocol, including SVR4 (LP) print servers and BSD print servers.

  4. The print server sends the print request to the appropriate printer.

  5. The print request is printed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.240.252