The Solaris Print Client-Server Process

This section provides an overview of how Solaris printing works.

The Print Client Process

The following figure illustrates the path of a print request from the time the user initiates the request until the print request is printed.

Figure 1.1. Overview of the Print Client Process

Overview of the Print Client Process
  1. A user submits a print request from a print client.

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

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

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

  5. The print request is printed.

Using Print Clients

This section of the overview focuses on the print client, a system that can send print requests to a print server. This section also discusses print commands, which enable the print client to initiate print requests.

The following figure highlights the part of the print process in which the user submits a print request from a print client.

Figure 1.2. The User Submits a Print Request from a Print Client

The User Submits a Print Request from a Print Client

What Is a Print Client?

A system becomes a print client when you install the Solaris print software and enable access to remote printers on the system.

The Solaris print software checks the following resources to locate printers and printer configuration information:

  • The command-line interface by using the lp d command (atomic or POSIX format)

  • A user's LPDEST or PRINTER variables

  • The _default variable in the sources configured for the printers database in the /etc/nsswitch.conf file

  • The user's $HOME/.printers file

  • The local /etc/printers.conf file

  • The LDAP, NIS, or NIS+ name service database

The print client sends its requests to the print server's queue. The print client does not have a local queue. 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 chances for printing problems, and improves performance.

Printer Configuration Resources

This section describes the resources that the print software uses to locate printer names and printer configuration information.

The print software can use a name service, which is a network (shared) resource for storing information that can be accessed on a network. The name service can be used for storing printer configuration information for all printers on the network. When you add a printer in the name service, all print clients on the network can access the printer.

How the Print Software Locates Printers

The following figure highlights the part of the print process in which the print software checks a hierarchy of printer configuration resources to determine where to send the print request.

Figure 1.3. How the Print Client Software Locates Printers

How the Print Client Software Locates Printers
  1. A user submits a print request from a print client by using 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 lp command and option, followed by the printer name or class, as shown in this example:

      % lp -d neptune filename
      
    • POSIX style, which is the print command and option, followed by server:printer, as shown in this example:

      % lpr -P galaxy:neptune filename
      
    • Context-based style, as shown in this example:

      % lpr -d thisdept/service/printer/
      printer-name filename
      
  2. The print command locates a printer and printer configuration information as follows:

    • The print command checks to see if the user specified a destination printer name or printer class in one of the three valid styles.

    • If the user didn't 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.

    • If neither environment variable for the default printer is defined, the command checks the sources configured for the printers database in the /etc/nsswitch.conf file. The name service sources might be one of the following:

      • LDAP directory information tree in the domain's ou=printers container

      • NIS printers.conf.byname map

      • NIS+ printers.conf_dir map

Using Print Servers

The print server is a system that has a local printer connected to it and makes the printer available to other systems on the network. The following figure highlights the part of the print process in which the print server sends the print request to the printer.

Figure 1.4. The Print Server Sends a Print Request to the Printer

The Print Server Sends a Print Request to the Printer
  1. The print client submits a print request.

  2. The print request is processed on the print client.

  3. The print request goes to the print server.

  4. The print request goes to the printer.

  5. The print output is produced on the printer.

The BSD Printing Protocol

The print commands use the BSD printing protocol. One of the big advantages of this protocol is that it can communicate with a variety of print servers:

  • lpd-based print servers

  • SunOS 5.10 and compatible SVR4 (LP) print servers

  • Any other print server or printer that accepts the BSD printing protocol

The BSD printing protocol is an industry standard that is widely used because it provides compatibility between different types of systems from various manufacturers.

Starting with the Solaris Express 8/06 release, PAPI has been implemented in the Solaris OS. PAPI support includes the modification of the majority of the common BSD and SYSV printing commands. These new command implementations are layered on top of the PAPI. As a result, these commands can now work with a number of print services.

For more information about the BSD and SYSV command changes, see the following man pages:

  • accept ( 1M )

  • cancel ( 1 )

  • disable ( 1 )

  • enable ( 1 )

  • lp ( 1 )

  • lpc ( 1B )

  • lpmove ( 1M )

  • lpq ( 1B )

  • lprm ( 1B )

  • lpstat ( 1 )

For more information, see PAPI Print Command and IPP Implementation.