[ Team LiB ] Previous Section Next Section

Using the SunSoft Print Client

This section describes how the SunSoft print client works. Starting with the Solaris 2.6 release, the SunSoft print client is provided as part of the Solaris Operating Environment. It was available previously only as an unbundled product.

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

The SunSoft 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 print command locates a printer and printer configuration information in the following sequence.

  1. It checks whether the user specified a destination printer name or printer class in one of the three valid styles.

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

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

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

  5. If the printer is not found in the /etc/printers.conf file, the command checks for any nameservice (NIS, NIS+, or LDAP).

The client does not have a local print queue. The SunSoft 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 SunSoft print client commands use to locate printer names and printer configuration information.

The SunSoft print client commands 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+, NIS+ with FNS, or LDAP) simplifies the maintenance of printer configuration information. When you add a printer in the nameservice, all SunSoft print clients on the network can access it.

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

  • Atomic, POSIX, or context-based printer name or class.

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

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

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

  • Nameservice (NIS, NIS+, LDAP, or NIS+ with FNS).

Print-Naming Enhancement

The Solaris 8 Operating Environment supports the printers database in the /etc/nsswitch.conf nameservice switch file. The printers database provides centralized printer configuration information to print clients on the network.

With the printers database and corresponding sources of information in the nameservice switch file, print clients can automatically access printer configuration information without having it added to their own systems. Table 95 shows the default printers entry for each of the nameservice environments.

Table 95. Default printers Entries in the /etc/nsswitch.conf File

Nameservice

Default printers Entry

graphics/new.gifdns

printers: user files

files

printers: user files

graphics/new.gifldap

printers: user files ldap

nis

printers: user files nis

nis+

printers: user nisplus files xfn

For example, if the nameservice is NIS, print client configuration information is looked up in the following order.

  • user— The $HOME/.printers file for the user.

  • files— The /etc/printers.conf file.

  • nis— The printers.conf.byname table.

If the nameservice is NIS+, print client configuration information is looked up in the following order.

  • user— The $HOME/.printers file for the user.

  • nisplus— The printers.org_dir table.

  • files— The /etc/printers.conf file.

  • xfn— The FNS printer contexts.

Print Request Submission

Users submit a print request from a SunSoft print client by using either the lp or lpr command. The user can specify a destination printer name or class in any of 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-name:printer-name filename
    
  • Context-based style, as defined in the Federated Naming Service Guide in the Solaris Software Developer Answer Book.

    
    
    lpr -d dept-name/service-name/printer-name filename
    

Summary of the SunSoft Print Client Process

The following list summarizes how the SunSoft print client process works.

  1. A user submits a print request from a SunSoft print client by using a SunSoft print client command.

  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 the BSD printing protocol, including SVR4 (LP) print servers and BSD print servers such as the SunOS 4.x BSD print server.

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

  5. The print request is printed.

    [ Team LiB ] Previous Section Next Section