System Administration Guide

How the SunSoft Print Client Software Locates Printers

As shown in Figure 39-4, the SunSoft print client commands use more options to locate printers and printer configuration information.

Figure 39-4 How the SunSoft Print Client Software Locates Printers

Graphic

  1. A user submits a print request from a SunSoft 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 print 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 the following example.


      % lpr -P galaxy:neptune filename
      
    • Context-based style, as defined in the Federated Naming Service Guide in the Solaris 2.6 Software Developer AnswerBook, 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:

    • It 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 .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 SunSoft print client's /etc/printers.conf file for configuration information.

    • If the printer is not found in the /etc/printers.conf file, the command checks the name service (NIS or NIS+), if any.

These are the advantages of the SunSoft Print Client method to locate printers: