You can specify a default printer destination for a user so the user doesn't need to type the printer name when using the print commands. Before you can designate a printer as the default, the printer must be known to the print service on the system. You can set a user's default printer destination by setting any of the following:
LPDEST environment variable
PRINTER environment variable
The _default variable in the user's .PRINTERS file
System's default printer (by using the lpadmin -d command or Admintool)
When an application provides a printer destination, that destination is used by the print service, regardless of whether you have set a system's default printer destination. If an application doesn't provide a printer destination or if you don't provide a printer name when using a print command, the print command searches for the default printer in a specific order. The table below shows the search order for a system's default printer destination.
Table 5-1 Search Order for Default Printer Destinations
Search Order |
Using /usr/bin/lp Command |
Using SunOS/BSD Compatibility Commands (lpr, lpq, and lprm) |
---|---|---|
First |
LPDEST variable |
PRINTER variable |
Second |
PRINTER variable |
LPDEST variable |
Third |
System's default printer |
System's default printer |