]> git.ipfire.org Git - thirdparty/cups.git/blob - doc/help/classes-conf-reference.html
Load cups into easysw/current.
[thirdparty/cups.git] / doc / help / classes-conf-reference.html
1 <HTML>
2 <!-- SECTION: References -->
3 <HEAD>
4 <TITLE>classes.conf</TITLE>
5 </HEAD>
6 <BODY>
7
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>
15
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>
22
23
24 <H3 CLASS="title"><A NAME="Accepting">Accepting</A></H3>
25
26 <H4>Examples</H4>
27
28 <PRE CLASS="command">
29 Accepting yes
30 Accepting no
31 </PRE>
32
33 <H4>Description</H4>
34
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>
39
40 <PRE CLASS="command">
41 <KBD>/usr/sbin/accept classname
42 /usr/sbin/reject classname</KBD>
43 </PRE>
44
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>
48 directive.</P>
49
50
51 <H3 CLASS="title"><A NAME="AllowUser">AllowUser</A></H3>
52
53 <H4>Examples</H4>
54
55 <PRE CLASS="command">
56 AllowUser foo_user
57 AllowUser @bar_group
58 </PRE>
59
60 <H4>Description</H4>
61
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>
65
66 <PRE CLASS="command">
67 <KBD>/usr/sbin/lpadmin -p classname -u allow:foo_user,@bar_group</KBD>
68 </PRE>
69
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>
75
76
77 <H3 CLASS="title"><A NAME="Class">Class</A></H3>
78
79 <H4>Examples</H4>
80
81 <PRE CLASS="command">
82 &lt;Class name&gt;
83 ...
84 &lt;/Class&gt;
85 </PRE>
86
87 <H4>Description</H4>
88
89 <P>The <CODE>Class</CODE> directive begins a class definition.
90 Classes are added using the <CODE>lpadmin(8)</CODE> command:
91
92 <PRE CLASS="command">
93 <KBD>/usr/sbin/lpadmin -p printername -c classname</KBD>
94 </PRE>
95
96
97 <H3 CLASS="title"><A NAME="DefaultClass">DefaultClass</A></H3>
98
99 <H4>Examples</H4>
100
101 <PRE CLASS="command">
102 &lt;DefaultClass name&gt;
103 ...
104 &lt;/Class&gt;
105 </PRE>
106
107 <H4>Description</H4>
108
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>
112 command:</P>
113
114 <PRE CLASS="command">
115 <KBD>/usr/sbin/lpadmin -d classname</KBD>
116 </PRE>
117
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>
121
122
123 <H3 CLASS="title"><A NAME="DenyUser">DenyUser</A></H3>
124
125 <H4>Examples</H4>
126
127 <PRE CLASS="command">
128 DenyUser foo_user
129 DenyUser @bar_group
130 </PRE>
131
132 <H4>Description</H4>
133
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>
137
138 <PRE CLASS="command">
139 <KBD>/usr/sbin/lpadmin -p classname -u deny:foo_user,@bar_group</KBD>
140 </PRE>
141
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>
147
148
149 <H3 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="ErrorPolicy">ErrorPolicy</A></H3>
150
151 <H4>Examples</H4>
152
153 <PRE CLASS="command">
154 ErrorPolicy cancel-job
155 ErrorPolicy retry-job
156 ErrorPolicy stop-printer
157 </PRE>
158
159 <H4>Description</H4>
160
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
164 error policy:</P>
165
166 <PRE CLASS="command">
167 <KBD>/usr/sbin/lpadmin -p classname -o printer-error-policy=stop-printer</KBD>
168 </PRE>
169
170 <P>The following values are supported:</P>
171
172 <UL>
173
174 <LI><CODE>cancel-job</CODE> - Cancel the job and proceed
175 with the next job in the queue</LI>
176
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>
181
182 <LI><CODE>stop-printer</CODE> - Stop the printer and keep
183 the job for future printing; this is the default
184 value</LI>
185
186 </UL>
187
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>
191 directive.</P>
192
193
194 <H3 CLASS="title"><A NAME="Info">Info</A></H3>
195
196 <H4>Examples</H4>
197
198 <PRE CLASS="command">
199 Info My Class
200 </PRE>
201
202 <H4>Description</H4>
203
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>
207
208 <PRE CLASS="command">
209 <KBD>/usr/sbin/lpadmin -p classname -D "My Class"</KBD>
210 </PRE>
211
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>
215 directive.</P>
216
217
218 <H3 CLASS="title"><A NAME="JobSheets">JobSheets</A></H3>
219
220 <H4>Examples</H4>
221
222 <PRE CLASS="command">
223 JobSheets none,standard
224 </PRE>
225
226 <H4>Description</H4>
227
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
232 the default banners:
233
234 <PRE CLASS="command">
235 <KBD>/usr/sbin/lpadmin -p classname -o job-sheets-default=none,standard</KBD>
236 </PRE>
237
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>
241
242 <P>The available banner pages depend on the local system
243 configuration; CUPS includes the following standard banner
244 files:</P>
245
246 <UL>
247
248 <LI><CODE>none</CODE> - Do not produce a banner
249 page.</LI>
250
251 <LI><CODE>classified</CODE> - A banner page with a
252 &quot;classified&quot; label at the top and bottom.</LI>
253
254 <LI><CODE>confidential</CODE> - A banner page with a
255 &quot;confidential&quot; label at the top and bottom.</LI>
256
257 <LI><CODE>secret</CODE> - A banner page with a
258 &quot;secret&quot; label at the top and bottom.</LI>
259
260 <LI><CODE>standard</CODE> - A banner page with no label
261 at the top and bottom.</LI>
262
263 <LI><CODE>topsecret</CODE> - A banner page with a
264 &quot;top secret&quot; label at the top and bottom.</LI>
265
266 <LI><CODE>unclassified</CODE> - A banner page with an
267 &quot;unclassified&quot; label at the top and bottom.</LI>
268
269 </UL>
270
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>
274 directive.</P>
275
276
277 <H3 CLASS="title"><A NAME="KLimit">KLimit</A></H3>
278
279 <H4>Examples</H4>
280
281 <PRE CLASS="command">
282 KLimit 1234
283 </PRE>
284
285 <H4>Description</H4>
286
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>
290
291 <PRE CLASS="command">
292 <KBD>/usr/sbin/lpadmin -p classname -o job-k-limit=1234</KBD>
293 </PRE>
294
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>
298 directive.</P>
299
300
301 <H3 CLASS="title"><A NAME="Location">Location</A></H3>
302
303 <H4>Examples</H4>
304
305 <PRE CLASS="command">
306 Location Building 3321
307 </PRE>
308
309 <H4>Description</H4>
310
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>
314
315 <PRE CLASS="command">
316 <KBD>/usr/sbin/lpadmin -p classname -L "Building 3321"</KBD>
317 </PRE>
318
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>
322 directive.</P>
323
324
325 <H3 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="OpPolicy">OpPolicy</A></H3>
326
327 <H4>Examples</H4>
328
329 <PRE CLASS="command">
330 OpPolicy default
331 OpPolicy mypolicy
332 </PRE>
333
334 <H4>Description</H4>
335
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>
339
340 <PRE CLASS="command">
341 <KBD>/usr/sbin/lpadmin -p classname -o printer-op-policy=default</KBD>
342 </PRE>
343
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>
347 directive.</P>
348
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>
352 directive.</P>
353
354
355 <H3 CLASS="title"><A NAME="PageLimit">PageLimit</A></H3>
356
357 <H4>Examples</H4>
358
359 <PRE CLASS="command">
360 PageLimit 1234
361 </PRE>
362
363 <H4>Description</H4>
364
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>
368
369 <PRE CLASS="command">
370 <KBD>/usr/sbin/lpadmin -p classname -o job-page-limit=1234</KBD>
371 </PRE>
372
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>
376 directive.</P>
377
378
379 <H3 CLASS="title"><A NAME="Printer">Printer</A></H3>
380
381 <H4>Examples</H4>
382
383 <PRE CLASS="command">
384 Printer bcp
385 Printer none
386 Printer tbcp
387 </PRE>
388
389 <H4>Description</H4>
390
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>
393 command:</P>
394
395 <PRE CLASS="command">
396 <KBD>/usr/sbin/lpadmin -p printername -c classname</KBD>
397 </PRE>
398
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>
402 directive.</P>
403
404
405 <H3 CLASS="title"><A NAME="QuotaPeriod">QuotaPeriod</A></H3>
406
407 <H4>Examples</H4>
408
409 <PRE CLASS="command">
410 QuotaPeriod 604800
411 </PRE>
412
413 <H4>Description</H4>
414
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>
419 command:</P>
420
421 <PRE CLASS="command">
422 <KBD>/usr/sbin/lpadmin -p classname -o job-quota-period=604800</KBD>
423 </PRE>
424
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>
428 directive.</P>
429
430
431 <H3 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="Shared">Shared</A></H3>
432
433 <H4>Examples</H4>
434
435 <PRE CLASS="command">
436 Shared yes
437 Shared no
438 </PRE>
439
440 <H4>Description</H4>
441
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>
447
448 <PRE CLASS="command">
449 <KBD>/usr/sbin/lpadmin -p classname -o printer-is-shared=true</KBD>
450 </PRE>
451
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>
455 directive.</P>
456
457
458 <H3 CLASS="title"><A NAME="State">State</A></H3>
459
460 <H4>Examples</H4>
461
462 <PRE CLASS="command">
463 State idle
464 State stopped
465 </PRE>
466
467 <H4>Description</H4>
468
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>
475
476 <PRE CLASS="command">
477 <KBD>/usr/sbin/cupsenable classname</KBD>
478 <KBD>/usr/sbin/cupsdisable classname</KBD>
479 </PRE>
480
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>
484 directive.</P>
485
486
487 <H3 CLASS="title"><A NAME="StateMessage">StateMessage</A></H3>
488
489 <H4>Examples</H4>
490
491 <PRE CLASS="command">
492 StateMessage Ready to print.
493 </PRE>
494
495 <H4>Description</H4>
496
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>
500
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
510 </PRE>
511
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>
515 directive.</P>
516
517
518 <H3 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="StateTime">StateTime</A></H3>
519
520 <H4>Examples</H4>
521
522 <PRE CLASS="command">
523 StateTime 1133542425
524 </PRE>
525
526 <H4>Description</H4>
527
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>
531 attribute.</P>
532
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>
536 directive.</P>
537
538
539 </BODY>
540 </HTML>