The CUPS scheduler (cupsd) uses the /etc/cups/printers.conf file to store the list of available printers. This file contains only locally defined printers, not remote printers that are created automatically via browsing. Each directive is listed on a line by itself followed by its value. Comments are introduced using the number sign ("#") character at the beginning of a line.
While the printer configuration file consists of plain text and can be modified using your favorite text editor, you should normally use the lpadmin(8) command, web interface, or any of the available GUIs to manage your printers instead. If you do choose to edit this file manually, you will need to restart the scheduler to make them active.
<Printer name> ... Accepting yes </Printer>
The Accepting
directive defines the initial state
of the printer-is-accepting-jobs attribute. This state
is also set by the accept(8)
and
reject(8)
commands:
/usr/sbin/accept printername /usr/sbin/reject printername
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... AllowUser foo_user AllowUser @bar_group </Printer>
The AllowUser
directive adds a username or group
name to the requesting-user-name-allowed attribute
which can be set by the lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -u allow:foo_user,@bar_group
This directive must appear inside a Printer
or DefaultPrinter
directive.
This directive cannot be used with DenyUser
.
<DefaultPrinter name> ... </Printer>
The DefaultPrinter
directive begins a printer
definition as the default server destination. The default server
destination can be set using the lpadmin(8)
command:
/usr/sbin/lpadmin -d printername
Note that the server default destination settings can be
overridden by the user's default destination settings which are
normally set using the lpoptions(1)
command.
<Printer name> ... DenyUser foo_user DenyUser @bar_group </Printer>
The DenyUser
directive adds a username or group
name to the requesting-user-name-denied attribute
which can be set by the lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -u deny:foo_user,@bar_group
This directive must appear inside a Printer
or DefaultPrinter
directive.
This directive cannot be used with AllowUser
<Printer name> ... DeviceURI socket://foo.bar.com:9100 </Printer>
The DeviceURI
directive defines the value of the
device-uri-attribute attribute. It is normally set
using the lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -v device-uri
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... ErrorPolicy abort-job </Printer>
The ErrorPolicy
directive defines the policy that
is used when a backend is unable to send a print job to the
printer. The lpadmin(8)
command sets the current
error policy:
/usr/sbin/lpadmin -p printername -o printer-error-policy=stop-printer
The following values are supported:
abort-job
- Abort the job and proceed
with the next job in the queueretry-job
- Retry the job after waiting
for N seconds; the cupsd.conf JobRetryInterval
directive controls the value of Nstop-printer
- Stop the printer and keep
the job for future printing; this is the default
valueThis directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... Info My Printer </Printer>
The Info
directive defines the string for the
printer-info attribute. It is normally set using the
lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -D "My Printer"
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... JobSheets none,standard </Printer>
The JobSheets
directive specifies the default
banner pages to print before and after a print job. In the above
example, only a standard banner will print after each
job. The lpadmin(8)
command is normally used to set
the default banners:
/usr/sbin/lpadmin -p printername -o job-sheets-default=none,standard
If only one banner file is specified, it will be printed before the files in the job. If a second banner file is specified, it is printed after the files in the job.
The available banner pages depend on the local system configuration; CUPS includes the following standard banner files:
none
- Do not produce a banner
page.classified
- A banner page with a
"classified" label at the top and bottom.confidential
- A banner page with a
"confidential" label at the top and bottom.secret
- A banner page with a
"secret" label at the top and bottom.standard
- A banner page with no label
at the top and bottom.topsecret
- A banner page with a
"top secret" label at the top and bottom.unclassified
- A banner page with an
"unclassified" label at the top and bottom.This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... KLimit 1234 </Printer>
The KLimit
directive defines the value of the
job-k-limit attribute. It is normally set using the
lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -o job-k-limit=1234
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... Location Building 3321 </Printer>
The Location
directive defines the string for the
printer-location attribute. It is normally set using the
lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -L "Building 3321"
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... OpPolicy default </Printer>
The OpPolicy
directive sets the operation policy
that is used for the printer. The lpadmin(8)
command
sets the current operation policy:
/usr/sbin/lpadmin -p printername -o printer-op-policy=default
The default policy is named "default". All policies correspond
to those defined using the cupsd.conf Policy
section.
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... Option name value Option scaling 100 Option page-left 72 </Printer>
The Option
directive specifies a default job
template attribute value. It is mapped to
name-default
in the printer attributes and applied
to jobs as name
.
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... PageLimit 1234 </Printer>
The PageLimit
directive defines the value of the
job-page-limit attribute. It can be set using the
lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -o job-page-limit=1234
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... PortMonitor bcp </Printer>
The PortMonitor
directive sets the filter program that
is used for every print job, typically to encode or package the print
data in a format acceptable for a particular printer interface. It is
set using the lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -o port-monitor=tbcp
The following standard port monitors are included with CUPS:
bcp
- Encode PostScript print data using
the Adobe Binary Control Protocol (BCP)none
- Do not use a port monitortbcp
- Encode PostScript print data
using the Adobe Tagged Binary Control Protocol
(TBCP)This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... </Printer>
The Printer
directive begins a printer
definition. Printers are added using the lpadmin(8)
command:
/usr/sbin/lpadmin -p printername ...
<Printer name> ... QuotaPeriod 604800 </Printer>
The QuotaPeriod
directive defines the value of
the job-quota-period attribute. Typical values are
86400 (1 day), 604800 (1 week), 2592000 (1 month), and 31536000
(1 year). It is set using the lpadmin(8)
command:
/usr/sbin/lpadmin -p printername -o job-quota-period=604800
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... Shared yes </Printer>
The Shared
directive defines the initial value of
the printer-is-shared attribute. The strings
yes and no correspond to the true and false
values, respectively. The lpadmin(8)
command sets
the current state:
/usr/sbin/lpadmin -p printername -o printer-is-shared=true
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... State idle </Printer>
The State
directive defines the initial value of
the printer-state attribute. The strings
idle and stopped correspond to the IPP
enumeration values 3 and 5, respectively. The
cupsenable(8)
and cupsdisable(8)
commands set the current state:
/usr/sbin/cupsenable printername /usr/sbin/cupsdisable printername
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... StateMessage Ready to print. </Printer>
The StateMessage
directive defines the initial
string for the printer-state-message attribute. The
following are some example messages:
StateMessage Connected to host_name... StateMessage Connecting to printer_queue on port port_number... StateMessage Network host host_name is busy; will retry in 30 seconds... StateMessage Printer busy; will retry in 10 seconds... StateMessage Printer is busy; retrying print job... StateMessage Print file accepted - job ID id_number. StateMessage Ready to print. StateMessage Waiting for job to complete
This directive must appear inside a Printer
or DefaultPrinter
section.
<Printer name> ... StateTime 1133542425 </Printer>
The StateTime
directive defines the UNIX time
(seconds since Jan 1, 1970) for the last state change of the
queue. It is mapped to the printer-state-change-time
attribute.
This directive must appear inside a Printer
or DefaultPrinter
section.