PRINTERS.CONF(5) | File Formats and Configurations | PRINTERS.CONF(5) |
printers.conf - system printing configuration database
/etc/printers.conf
ou=printers
printers.conf.byname
The printers.conf file is the system printing configuration database. System administrators use printers.conf to describe destinations for the print client commands and the print protocol adaptor. A destination names a printer or class of printers. See lpadmin(8). The LP print spooler uses private LP configuration data for represented in the printers.conf database.
Each entry in printers.conf describes one destination. Entries are one line consisting of any number of fields separated by colons (`:') and terminated by a NEWLINE. The first field of each entry specifies the name of the destination and aliases to which the entry describes. Specify one or more names or aliases of the destination in this first field. Specify the destination using atomic names. URI-style and POSIX-style names are not acceptable. See standards(7). Separate destination names by pipe signs (`|').
Two destination names are reserved for special use in the first entry. Use _all to specify the interest list for lpget, lpstat, and cancel. Use _default to specify the default destination.
The remaining fields in an entry are key=value pairs. See Specifying Configuration Options for details regarding key=value pairs.
Empty lines can be included for readability. Entries can continue on to multiple lines by adding a backslash (`\') as the last character in the line. printers.conf can include comments. Comments have a pound sign (`#') as the first character in the line, and are terminated by a NEWLINE. Use the lpset command to create or modify printers.conf. See lpset(8). Do not make changes in printers.conf by using an editor.
key=value pairs are configuration options defined by the system administrator. key and value can be of arbitrary length. Separate key and value by the equal (`=') character.
The following client/server configuration options (represented as key=value pairs) are supported:
printer-uri-supported=scheme://endpoint
lpsched://localhost/printers/queue
ipp://server[:port]/printers/queue
http://server:631/printers/queue
ipp://server[:port]/...
lpd://server/printers/queue[#Solaris]
If an entry does not contain a printer-uri-supported key/value pair, the bsdaddr value is converted to its equivalent uri form and a printer-uri-supported key/value pair is added to the resulting data returned to applications requesting printer configuration data.
bsdaddr=server,destination[,Solaris]
use=destination
all=destination_list
The following LP configuration options (represented as key=value pairs) are supported:
user-equivalence=true|false
Applications needing to resolve print queue names (destinations) to the associated print service and communications endpoint make use of a specific name resolution ordering. Destination names in URI and POSIX form are complete unto themselves and require no further resolution. Names in atomic form are resolved based on the printers database entry in the /etc/nsswitch.conf file. See nsswitch.conf(5)
The default destination is located differently depending on the command.
The lp command locates the default destination in the following order:
The lpr, lpq, and lprm commands locate the default destination in the following order:
The lpget, lpstat, and cancel commands locate the interest list in the following order:
Example 1 Setting the Interest List
The following entry sets the interest list for the lpget, lpstat and cancel commands to printer1, printer2 and printer3:
_all:all=printer1,printer2,printer3
Example 2 Setting the Server Name
The following entry sets the server name to server and printer name to ps_printer for destinations printer1 and ps. It does not generate BSD protocol extensions.
printer1|ps:bsdaddr=server,ps_printer
Example 3 Setting Server Name and Destination Name
The following entry sets the server name to server and destination name to pcl_printer, for destination printer2. It also generates Solaris protocol extensions.
printer2:printer-uri-supported=lpd//server/printers/pcl_printer#Solaris
Example 4 Setting Server Name and Destination Name with Continuous Search
The following entry sets the server name to server and destination name to new_printer, for destination printer3. It also sets the printer3 to continue searching for configuration information to printer another_printer.
printer3:bsdaddr=server,new_printer:use=another_printer
Example 5 Setting Default Destination
The following entry sets the default destination to continue searching for configuration information to destination printer1.
_default:use=printer1
Example 6 Using IPP as the URI
The following example uses IPP as the URI:
printer4:printer-uri-supported=ipp\://server/printers/queue
/etc/printers.conf
$HOME/.printers
ou=printers
printers.conf.byname (NIS)
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Stability Level | Stable |
cancel(1), enable(1), lp(1), lpstat(1), lpq(1B), lpr(1B), lprm(1B), nsswitch.conf(5), printers(5), attributes(7), standards(7), accept(8), in.lpd(8), lpadmin(8), lpget(8), lpmove(8), lpset(8)
System Administration Guide: Basic Administration
February 21, 2023 | OmniOS |