2 <!-- SECTION: References -->
4 <TITLE>classes.conf
</TITLE>
8 <P>The CUPS scheduler (cupsd) uses the
9 <VAR>/etc/cups/classes.conf
</VAR> file to store the list of
10 available classes. This file contains only locally defined
11 classes, not remote classes that are created automatically via
12 browsing. Each directive is listed on a line by itself followed
13 by its value. Comments are introduced using the number sign (
"#")
14 character at the beginning of a line.
</P>
16 <P>While the class configuration file consists of plain text and
17 can be modified using your favorite text editor, you should
18 normally use the
<CODE>lpadmin(
8)
</CODE> command, web interface,
19 or any of the available GUIs to manage your classes instead. If
20 you do choose to edit this file manually, you will need to
21 restart the scheduler to make them active.
</P>
24 <H3 CLASS=
"title"><A NAME=
"Accepting">Accepting
</A></H3>
35 <P>The
<CODE>Accepting
</CODE> directive defines the initial state
36 of the
<VAR>printer-is-accepting-jobs
</VAR> attribute. This state
37 is also set by the
<CODE>accept(
8)
</CODE> and
38 <CODE>reject(
8)
</CODE> commands:
</P>
41 <KBD>/usr/sbin/accept classname
42 /usr/sbin/reject classname
</KBD>
45 <P>This directive must appear inside a
<A
46 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
47 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
51 <H3 CLASS=
"title"><A NAME=
"AllowUser">AllowUser
</A></H3>
62 <P>The
<CODE>AllowUser
</CODE> directive adds a username or group
63 name to the
<VAR>requesting-user-name-allowed
</VAR> attribute
64 which can be set by the
<CODE>lpadmin(
8)
</CODE> command:
</P>
67 <KBD>/usr/sbin/lpadmin -p classname -u allow:foo_user,@bar_group
</KBD>
70 <P>This directive must appear inside a
<A
71 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
72 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A> directive.
73 This directive cannot be used with
<A
74 HREF=
"#DenyUser"><CODE>DenyUser
</CODE></A>.
</P>
77 <H3 CLASS=
"title"><A NAME=
"Class">Class
</A></H3>
89 <P>The
<CODE>Class
</CODE> directive begins a class definition.
90 Classes are added using the
<CODE>lpadmin(
8)
</CODE> command:
93 <KBD>/usr/sbin/lpadmin -p printername -c classname
</KBD>
97 <H3 CLASS=
"title"><A NAME=
"DefaultClass">DefaultClass
</A></H3>
101 <PRE CLASS=
"command">
102 <DefaultClass name
>
109 <P>The
<CODE>DefaultClass
</CODE> directive begins a class
110 definition as the default server destination. The default server
111 destination can be set using the
<CODE>lpadmin(
8)
</CODE>
114 <PRE CLASS=
"command">
115 <KBD>/usr/sbin/lpadmin -d classname
</KBD>
118 <P>Note that the server default destination settings can be
119 overridden by the user's default destination settings which are
120 normally set using the
<CODE>lpoptions(
1)
</CODE> command.
</P>
123 <H3 CLASS=
"title"><A NAME=
"DenyUser">DenyUser
</A></H3>
127 <PRE CLASS=
"command">
134 <P>The
<CODE>DenyUser
</CODE> directive adds a username or group
135 name to the
<VAR>requesting-user-name-denied
</VAR> attribute
136 which can be set by the
<CODE>lpadmin(
8)
</CODE> command:
</P>
138 <PRE CLASS=
"command">
139 <KBD>/usr/sbin/lpadmin -p classname -u deny:foo_user,@bar_group
</KBD>
142 <P>This directive must appear inside a
<A
143 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
144 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A> directive.
145 This directive cannot be used with
<A
146 HREF=
"#AllowUser"><CODE>AllowUser
</CODE></A></P>
149 <H3 CLASS=
"title"><SPAN CLASS=
"info">CUPS
1.2</SPAN><A NAME=
"ErrorPolicy">ErrorPolicy
</A></H3>
153 <PRE CLASS=
"command">
154 ErrorPolicy cancel-job
155 ErrorPolicy retry-job
156 ErrorPolicy stop-printer
161 <P>The
<CODE>ErrorPolicy
</CODE> directive defines the policy that
162 is used when a backend is unable to send a print job to the
163 printer. The
<CODE>lpadmin(
8)
</CODE> command sets the current
166 <PRE CLASS=
"command">
167 <KBD>/usr/sbin/lpadmin -p classname -o printer-error-policy=stop-printer
</KBD>
170 <P>The following values are supported:
</P>
174 <LI><CODE>cancel-job
</CODE> - Cancel the job and proceed
175 with the next job in the queue
</LI>
177 <LI><CODE>retry-job
</CODE> - Retry the job after waiting
178 for N seconds; the
<VAR>cupsd.conf
</VAR> <A
179 HREF=
"cupsd-conf-reference.html#JobRetryInterval"><CODE>JobRetryInterval
</CODE></A>
180 directive controls the value of N
</LI>
182 <LI><CODE>stop-printer
</CODE> - Stop the printer and keep
183 the job for future printing; this is the default
188 <P>This directive must appear inside a
<A
189 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
190 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
194 <H3 CLASS=
"title"><A NAME=
"Info">Info
</A></H3>
198 <PRE CLASS=
"command">
204 <P>The
<CODE>Info
</CODE> directive defines the string for the
205 <VAR>printer-info
</VAR> attribute. It is normally set using the
206 <CODE>lpadmin(
8)
</CODE> command:
</P>
208 <PRE CLASS=
"command">
209 <KBD>/usr/sbin/lpadmin -p classname -D
"My Class"</KBD>
212 <P>This directive must appear inside a
<A
213 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
214 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
218 <H3 CLASS=
"title"><A NAME=
"JobSheets">JobSheets
</A></H3>
222 <PRE CLASS=
"command">
223 JobSheets none,standard
228 <P>The
<CODE>JobSheets
</CODE> directive specifies the default
229 banner pages to print before and after a print job. In the above
230 example, only a
<VAR>standard
</VAR> banner will print after each
231 job. The
<CODE>lpadmin(
8)
</CODE> command is normally used to set
234 <PRE CLASS=
"command">
235 <KBD>/usr/sbin/lpadmin -p classname -o job-sheets-default=none,standard
</KBD>
238 <P>If only one banner file is specified, it will be printed
239 before the files in the job. If a second banner file is
240 specified, it is printed after the files in the job.
</P>
242 <P>The available banner pages depend on the local system
243 configuration; CUPS includes the following standard banner
248 <LI><CODE>none
</CODE> - Do not produce a banner
251 <LI><CODE>classified
</CODE> - A banner page with a
252 "classified
" label at the top and bottom.
</LI>
254 <LI><CODE>confidential
</CODE> - A banner page with a
255 "confidential
" label at the top and bottom.
</LI>
257 <LI><CODE>secret
</CODE> - A banner page with a
258 "secret
" label at the top and bottom.
</LI>
260 <LI><CODE>standard
</CODE> - A banner page with no label
261 at the top and bottom.
</LI>
263 <LI><CODE>topsecret
</CODE> - A banner page with a
264 "top secret
" label at the top and bottom.
</LI>
266 <LI><CODE>unclassified
</CODE> - A banner page with an
267 "unclassified
" label at the top and bottom.
</LI>
271 <P>This directive must appear inside a
<A
272 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
273 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
277 <H3 CLASS=
"title"><A NAME=
"KLimit">KLimit
</A></H3>
281 <PRE CLASS=
"command">
287 <P>The
<CODE>KLimit
</CODE> directive defines the value of the
288 <VAR>job-k-limit
</VAR> attribute. It is normally set using the
289 <CODE>lpadmin(
8)
</CODE> command:
</P>
291 <PRE CLASS=
"command">
292 <KBD>/usr/sbin/lpadmin -p classname -o job-k-limit=
1234</KBD>
295 <P>This directive must appear inside a
<A
296 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
297 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
301 <H3 CLASS=
"title"><A NAME=
"Location">Location
</A></H3>
305 <PRE CLASS=
"command">
306 Location Building
3321
311 <P>The
<CODE>Location
</CODE> directive defines the string for the
312 <VAR>printer-location
</VAR> attribute. It is normally set using the
313 <CODE>lpadmin(
8)
</CODE> command:
</P>
315 <PRE CLASS=
"command">
316 <KBD>/usr/sbin/lpadmin -p classname -L
"Building 3321"</KBD>
319 <P>This directive must appear inside a
<A
320 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
321 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
325 <H3 CLASS=
"title"><SPAN CLASS=
"info">CUPS
1.2</SPAN><A NAME=
"OpPolicy">OpPolicy
</A></H3>
329 <PRE CLASS=
"command">
336 <P>The
<CODE>OpPolicy
</CODE> directive sets the operation policy
337 that is used for the printer. The
<CODE>lpadmin(
8)
</CODE> command
338 sets the current operation policy:
</P>
340 <PRE CLASS=
"command">
341 <KBD>/usr/sbin/lpadmin -p classname -o printer-op-policy=default
</KBD>
344 <P>The default policy is named
"default". All policies correspond
345 to those defined using the
<VAR>cupsd.conf
</VAR> <A
346 HREF=
"cupsd-conf-reference.html#Policy"><CODE>Policy
</CODE></A>
349 <P>This directive must appear inside a
<A
350 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
351 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
355 <H3 CLASS=
"title"><A NAME=
"PageLimit">PageLimit
</A></H3>
359 <PRE CLASS=
"command">
365 <P>The
<CODE>PageLimit
</CODE> directive defines the value of the
366 <VAR>job-page-limit
</VAR> attribute. It can be set using the
367 <CODE>lpadmin(
8)
</CODE> command:
</P>
369 <PRE CLASS=
"command">
370 <KBD>/usr/sbin/lpadmin -p classname -o job-page-limit=
1234</KBD>
373 <P>This directive must appear inside a
<A
374 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
375 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
379 <H3 CLASS=
"title"><A NAME=
"Printer">Printer
</A></H3>
383 <PRE CLASS=
"command">
391 <P>The
<CODE>Printer
</CODE> directive adds a printer to a class.
392 Printers are added to a class using the
<CODE>lpadmin(
8)
</CODE>
395 <PRE CLASS=
"command">
396 <KBD>/usr/sbin/lpadmin -p printername -c classname
</KBD>
399 <P>This directive must appear inside a
<A
400 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
401 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
405 <H3 CLASS=
"title"><A NAME=
"QuotaPeriod">QuotaPeriod
</A></H3>
409 <PRE CLASS=
"command">
415 <P>The
<CODE>QuotaPeriod
</CODE> directive defines the value of
416 the
<VAR>job-quota-period
</VAR> attribute. Typical values are
417 86400 (
1 day),
604800 (
1 week),
2592000 (
1 month), and
31536000
418 (
1 year). It is set using the
<CODE>lpadmin(
8)
</CODE>
421 <PRE CLASS=
"command">
422 <KBD>/usr/sbin/lpadmin -p classname -o job-quota-period=
604800</KBD>
425 <P>This directive must appear inside a
<A
426 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
427 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
431 <H3 CLASS=
"title"><SPAN CLASS=
"info">CUPS
1.2</SPAN><A NAME=
"Shared">Shared
</A></H3>
435 <PRE CLASS=
"command">
442 <P>The
<CODE>Shared
</CODE> directive defines the initial value of
443 the
<VAR>printer-is-shared
</VAR> attribute. The strings
444 <VAR>yes
</VAR> and
<VAR>no
</VAR> correspond to the true and false
445 values, respectively. The
<CODE>lpadmin(
8)
</CODE> command sets
446 the current state:
</P>
448 <PRE CLASS=
"command">
449 <KBD>/usr/sbin/lpadmin -p classname -o printer-is-shared=true
</KBD>
452 <P>This directive must appear inside a
<A
453 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
454 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
458 <H3 CLASS=
"title"><A NAME=
"State">State
</A></H3>
462 <PRE CLASS=
"command">
469 <P>The
<CODE>State
</CODE> directive defines the initial value of
470 the
<VAR>printer-state
</VAR> attribute. The strings
471 <VAR>idle
</VAR> and
<VAR>stopped
</VAR> correspond to the IPP
472 enumeration values
3 and
5, respectively. The
473 <CODE>cupsenable(
8)
</CODE> and
<CODE>cupsdisable(
8)
</CODE>
474 commands set the current state:
</P>
476 <PRE CLASS=
"command">
477 <KBD>/usr/sbin/cupsenable classname
</KBD>
478 <KBD>/usr/sbin/cupsdisable classname
</KBD>
481 <P>This directive must appear inside a
<A
482 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
483 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
487 <H3 CLASS=
"title"><A NAME=
"StateMessage">StateMessage
</A></H3>
491 <PRE CLASS=
"command">
492 StateMessage Ready to print.
497 <P>The
<CODE>StateMessage
</CODE> directive defines the initial
498 string for the
<VAR>printer-state-message
</VAR> attribute. The
499 following are some example messages:
</P>
501 <PRE CLASS=
"command">
502 StateMessage Connected to host_name...
503 StateMessage Connecting to printer_queue on port port_number...
504 StateMessage Network host host_name is busy; will retry in
30 seconds...
505 StateMessage Class busy; will retry in
10 seconds...
506 StateMessage Class is busy; retrying print job...
507 StateMessage Print file accepted - job ID id_number.
508 StateMessage Ready to print.
509 StateMessage Waiting for job to complete
512 <P>This directive must appear inside a
<A
513 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
514 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>
518 <H3 CLASS=
"title"><SPAN CLASS=
"info">CUPS
1.2</SPAN><A NAME=
"StateTime">StateTime
</A></H3>
522 <PRE CLASS=
"command">
528 <P>The
<CODE>StateTime
</CODE> directive defines the UNIX time
529 (seconds since Jan
1,
1970) for the last state change of the
530 queue. It is mapped to the
<VAR>printer-state-change-time
</VAR>
533 <P>This directive must appear inside a
<A
534 HREF=
"#Class"><CODE>Class
</CODE></A> or
<A
535 HREF=
"#DefaultClass"><CODE>DefaultClass
</CODE></A>