NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES
$HOME/.printers
The $HOME/.printers file is a simplified version of the system /etc/printers.conf file (see printers.conf(4)). Users create the $HOME/.printers file in their home directory. This optional file is customizable by the user.
The $HOME/.printers file performs the following functions:
Sets personal aliases for all print commands.
Sets the interest list for the lpget, lpstat, and cancel commands. See lpget(1M), lpstat(1) and cancel(1).
Sets the default printer for the lp, lpr, lpq, and lprm commands. See lp(1), lpr(1B), lpq(1B), and lprm(1B).
Use a line or full screen editor to create or modify the $HOME/.printers file.
Each entry in $HOME/.printers describes one destination. Entries are one line consisting of two fields separated by either BLANKs or TABs and terminated by a NEWLINE. Format for an entry in $HOME/.printers varies according to the purpose of the entry.
Empty lines can be included for readability. Entries may continue on to multiple lines by adding a backslash (`\') as the last character in the line. The $HOME/.printers file can include comments. Comments have a pound sign (`#') as the first character in the line, and are terminated by a NEWLINE.
Setting Personal Aliases
Specify the alias or aliases in the first field. Separate multiple aliases by a pipe sign (`|'). Specify the destination in the second field. A destination names a printer or class of printers (see lpadmin(1M)). Specify the destination using atomic, POSIX-style (server:destination), or Federated Naming Service (FNS) (.../service/printer/...) names. See printers.conf(4) for information regarding the naming conventions for atomic and FNS names, and standards(5) for information regarding POSIX.
Setting the Interest List for lpget, lpstat and cancel
Specify _all in the first field. Specify the list of destinations for the interest list in the second field. Separate each destinations by a comma (`,'). Specify destinations using atomic, POSIX-style (server:destination), or FNS names (.../service/printer/...). See printers.conf(4) for information regarding the naming conventions for atomic and FNS names. This list of destinations may refer to an alias defined in $HOME/.printers.
Setting the Default Destination
Specify _default in the first field. Specify the default destination in the second field. Specify the default destination using atomic, POSIX-style (server:destination), or FNS names (.../service/printer/...). See printers.conf(4) for information regarding the naming conventions for atomic and FNS names. The default destination may refer to an alias defined in $HOME/.printers.
The print client commands locate destination information based on the “printers” database entry in the /etc/nsswitch.conf file. See nsswitch.conf(4).
Locating the Personal Default Destination
The default destination is located differently depending on the command.
The lp command locates the default destination in the following order:
lp command's -d destination option.
LPDEST environment variable.
PRINTER environment variable.
_default destination in $HOME/.printers.
_default destination in /etc/printers.conf.
_default destination in FNS.
The lpr, lpq, and lprm commands locate the default destination in the following order:
lpr command's -P destination option.
PRINTER environment variable.
LPDEST environment variable.
_default destination in $HOME/.printers.
_default destination in /etc/printers.conf.
_default destination in FNS.
Locating the Interest List for lpget, lpstat, and cancel
The lpget, lpstat, and cancel commands locate the interest list in the following order:
_all list in $HOME/.printers.
_all list in /etc/printers.conf.
_all list in FNS.
The following entry sets the interest list to destinations ps, secure, and dog at server west and finance_ps at site bldg2:
_all ps,secure,west:dog,site/bldg2/service/printer/finance_ps |
The following entry sets the aliases ps, lp, and lw to sparc_printer:
ps|lp|lw sparc_printer |
The following entry sets the alias pcl to hplj and sets it as the default destination:
pcl|_default hplj |
The following entry sets the alias secure to destination catalpa at server tabloid:
secure tabloid:catalpa |
The following entry sets the alias insecure to destination legal_ps at site bldg2:
insecure site/bldg2/service/printer/legal_ps |
User-configurable printer database.
System printer configuration database.
NIS version of /etc/printers.conf.
NIS+ version of /etc/printers.conf.
FNS version of /etc/printers.conf.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Availability | SUNWpcu |
Stability Level | Stable |
cancel(1), lp(1), lpq(1B), lpr(1B), lprm(1B), lpstat(1), lpadmin(1M), lpget(1M), nsswitch.conf(4), printers.conf(4), attributes(5), fns(5), standards(5)
$HOME/.printers is referenced by the printing commands before further name resolution is made in /etc/printers.conf or the name service. If the alias references a destination defined in /etc/printers.conf, it is possible that the destination is defined differently on different systems. This could cause output to be sent to an unintended destination if the user is logged in to a different system.
NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | FILES | ATTRIBUTES | SEE ALSO | NOTES