You can specify a default printer destination for a system so you don't need to type the printer name when using the SunSoft 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
_default in .printers file
_default in /etc/printers.conf file (lpadmin -d command)
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 6-2 shows the search order for a system's default printer destination.
Table 6-2 Search Order for Default Printer Destinations
Search Order |
Using lp Command |
Using lpr, lpq, and lprm Commands |
---|---|---|
First |
LPDEST variable |
PRINTER variable |
Second |
PRINTER variable |
LPDEST variable |
Third |
_default in .printers file |
_default in .printers file |
Fourth |
_default in /etc/printers.conf file |
_default in /etc/printers.conf file |