Back to CUPS 1.7 Documents

printers.conf

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 stop the scheduler first, make your changes, and then start the scheduler to make them active.

Accepting

Examples

<Printer name>
  ...
  Accepting yes
</Printer>

Description

The Accepting directive defines the initial state of the printer-is-accepting-jobs attribute. This state is also set by the cupsaccept(8) and cupsreject(8) commands:

/usr/sbin/cupsaccept printername
/usr/sbin/cupsreject printername

This directive must appear inside a Printer or DefaultPrinter section.

AllowUser

Examples

<Printer name>
  ...
  AllowUser foo_user
  AllowUser @bar_group
</Printer>

Description

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

Examples

<DefaultPrinter name>
  ...
</Printer>

Description

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.

DenyUser

Examples

<Printer name>
  ...
  DenyUser foo_user
  DenyUser @bar_group
</Printer>

Description

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

DeviceURI

Examples

<Printer name>
  ...
  DeviceURI socket://foo.bar.com:9100
</Printer>

Description

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.

CUPS 1.2ErrorPolicy

Examples

<Printer name>
  ...
  ErrorPolicy abort-job
</Printer>

Description

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:

This directive must appear inside a Printer or DefaultPrinter section.

CUPS 1.4Filter

Examples

<Printer name>
  ...
  Filter mime/type 100 program
</Printer>

Description

The Filter directive lists a single filter program as defined in the printer's PPD file.

This directive must appear inside a Printer or DefaultPrinter section.

Info

Examples

<Printer name>
  ...
  Info My Printer
</Printer>

Description

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.

JobSheets

Examples

<Printer name>
  ...
  JobSheets none,standard
</Printer>

Description

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:

This directive must appear inside a Printer or DefaultPrinter section.

KLimit

Examples

<Printer name>
  ...
  KLimit 1234
</Printer>

Description

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.

Location

Examples

<Printer name>
  ...
  Location Building 3321
</Printer>

Description

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.

CUPS 1.2OpPolicy

Examples

<Printer name>
  ...
  OpPolicy default
</Printer>

Description

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.

CUPS 1.2Option

Examples

<Printer name>
  ...
  Option name value
  Option scaling 100
  Option page-left 72
</Printer>

Description

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.

PageLimit

Examples

<Printer name>
  ...
  PageLimit 1234
</Printer>

Description

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.

CUPS 1.2PortMonitor

Examples

<Printer name>
  ...
  PortMonitor bcp
</Printer>

Description

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:

This directive must appear inside a Printer or DefaultPrinter section.

CUPS 1.4PreFilter

Examples

<Printer name>
  ...
  PreFilter mime/type 100 program
</Printer>

Description

The PreFilter directive lists a single pre-filter program as defined in the printer's PPD file.

This directive must appear inside a Printer or DefaultPrinter section.

Printer

Examples

<Printer name>
  ...
</Printer>

Description

The Printer directive begins a printer definition. Printers are added using the lpadmin(8) command:

/usr/sbin/lpadmin -p printername ...

CUPS 1.4Product

Examples

<Printer name>
  ...
  Product Acme PaperWriter
</Printer>

Description

The Product directive defines the main product string from the printer's PPD file and is used when advertising the queue via DNS-SD.

This directive must appear inside a Printer or DefaultPrinter section.

QuotaPeriod

Examples

<Printer name>
  ...
  QuotaPeriod 604800
</Printer>

Description

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.

CUPS 1.2Shared

Examples

<Printer name>
  ...
  Shared yes
</Printer>

Description

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.

State

Examples

<Printer name>
  ...
  State idle
</Printer>

Description

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.

StateMessage

Examples

<Printer name>
  ...
  StateMessage Printer is lonely.
</Printer>

Description

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 Waiting for job to complete

This directive must appear inside a Printer or DefaultPrinter section.

CUPS 1.2StateTime

Examples

<Printer name>
  ...
  StateTime 1133542425
</Printer>

Description

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.