You can specify a default printer destination for a system so you don'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 system's default printer destination by setting any of the following:
LPDEST environment variable
PRINTER environment variable
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. Table 42-1 shows the search order for a system's default printer destination.
Table 42-1 Search Order for Default Printer Destinations|
Search Order |
Using /usr/bin/lp Command |
Using lpr, lpq, and lprm Commands |
|---|---|---|
|
First |
LPDEST variable |
PRINTER variable |
|
Second |
PRINTER variable |
LPDEST variable |
|
Third |
System's default printer |
System's default printer |