]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/ref-classes-conf.html
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / doc / help / ref-classes-conf.html
CommitLineData
ef416fc2 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
10available classes. This file contains only locally defined
11classes, not remote classes that are created automatically via
12browsing. Each directive is listed on a line by itself followed
13by its value. Comments are introduced using the number sign ("#")
14character at the beginning of a line.</P>
15
16<P>While the class configuration file consists of plain text and
17can be modified using your favorite text editor, you should
480ef0fe 18normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
19command, web interface, or any of the available GUIs to manage
20your classes instead. If you do choose to edit this file
21manually, you will need to restart the scheduler to make them
22active.</P>
ef416fc2 23
24
480ef0fe 25<H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
ef416fc2 26
480ef0fe 27<H3>Examples</H3>
ef416fc2 28
29<PRE CLASS="command">
480ef0fe 30&lt;Class name&gt;
31 ...
32 Accepting yes
33&lt;/Class&gt;
ef416fc2 34</PRE>
35
480ef0fe 36<H3>Description</H3>
ef416fc2 37
38<P>The <CODE>Accepting</CODE> directive defines the initial state
39of the <VAR>printer-is-accepting-jobs</VAR> attribute. This state
40is also set by the <CODE>accept(8)</CODE> and
41<CODE>reject(8)</CODE> commands:</P>
42
43<PRE CLASS="command">
44<KBD>/usr/sbin/accept classname
45/usr/sbin/reject classname</KBD>
46</PRE>
47
48<P>This directive must appear inside a <A
49HREF="#Class"><CODE>Class</CODE></A> or <A
50HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 51section.</P>
ef416fc2 52
53
480ef0fe 54<H2 CLASS="title"><A NAME="AllowUser">AllowUser</A></H2>
ef416fc2 55
480ef0fe 56<H3>Examples</H3>
ef416fc2 57
58<PRE CLASS="command">
480ef0fe 59&lt;Class name&gt;
60 ...
61 AllowUser foo_user
62 AllowUser @bar_group
63&lt;/Class&gt;
ef416fc2 64</PRE>
65
480ef0fe 66<H3>Description</H3>
ef416fc2 67
68<P>The <CODE>AllowUser</CODE> directive adds a username or group
69name to the <VAR>requesting-user-name-allowed</VAR> attribute
70which can be set by the <CODE>lpadmin(8)</CODE> command:</P>
71
72<PRE CLASS="command">
73<KBD>/usr/sbin/lpadmin -p classname -u allow:foo_user,@bar_group</KBD>
74</PRE>
75
76<P>This directive must appear inside a <A
77HREF="#Class"><CODE>Class</CODE></A> or <A
78HREF="#DefaultClass"><CODE>DefaultClass</CODE></A> directive.
79This directive cannot be used with <A
80HREF="#DenyUser"><CODE>DenyUser</CODE></A>.</P>
81
82
480ef0fe 83<H2 CLASS="title"><A NAME="Class">Class</A></H2>
ef416fc2 84
480ef0fe 85<H3>Examples</H3>
ef416fc2 86
87<PRE CLASS="command">
88&lt;Class name&gt;
480ef0fe 89 ...
ef416fc2 90&lt;/Class&gt;
91</PRE>
92
480ef0fe 93<H3>Description</H3>
ef416fc2 94
95<P>The <CODE>Class</CODE> directive begins a class definition.
96Classes are added using the <CODE>lpadmin(8)</CODE> command:
97
98<PRE CLASS="command">
99<KBD>/usr/sbin/lpadmin -p printername -c classname</KBD>
100</PRE>
101
102
480ef0fe 103<H2 CLASS="title"><A NAME="DefaultClass">DefaultClass</A></H2>
ef416fc2 104
480ef0fe 105<H3>Examples</H3>
ef416fc2 106
107<PRE CLASS="command">
108&lt;DefaultClass name&gt;
480ef0fe 109 ...
ef416fc2 110&lt;/Class&gt;
111</PRE>
112
480ef0fe 113<H3>Description</H3>
ef416fc2 114
115<P>The <CODE>DefaultClass</CODE> directive begins a class
116definition as the default server destination. The default server
117destination can be set using the <CODE>lpadmin(8)</CODE>
118command:</P>
119
120<PRE CLASS="command">
121<KBD>/usr/sbin/lpadmin -d classname</KBD>
122</PRE>
123
124<P>Note that the server default destination settings can be
125overridden by the user's default destination settings which are
126normally set using the <CODE>lpoptions(1)</CODE> command.</P>
127
128
480ef0fe 129<H2 CLASS="title"><A NAME="DenyUser">DenyUser</A></H2>
ef416fc2 130
480ef0fe 131<H3>Examples</H3>
ef416fc2 132
133<PRE CLASS="command">
480ef0fe 134&lt;Class name&gt;
135 ...
136 DenyUser foo_user
137 DenyUser @bar_group
138&lt;/Class&gt;
ef416fc2 139</PRE>
140
480ef0fe 141<H3>Description</H3>
ef416fc2 142
143<P>The <CODE>DenyUser</CODE> directive adds a username or group
144name to the <VAR>requesting-user-name-denied</VAR> attribute
145which can be set by the <CODE>lpadmin(8)</CODE> command:</P>
146
147<PRE CLASS="command">
148<KBD>/usr/sbin/lpadmin -p classname -u deny:foo_user,@bar_group</KBD>
149</PRE>
150
151<P>This directive must appear inside a <A
152HREF="#Class"><CODE>Class</CODE></A> or <A
153HREF="#DefaultClass"><CODE>DefaultClass</CODE></A> directive.
154This directive cannot be used with <A
155HREF="#AllowUser"><CODE>AllowUser</CODE></A></P>
156
157
480ef0fe 158<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="ErrorPolicy">ErrorPolicy</A></H2>
ef416fc2 159
480ef0fe 160<H3>Examples</H3>
ef416fc2 161
162<PRE CLASS="command">
480ef0fe 163&lt;Class name&gt;
164 ...
07725fee 165 ErrorPolicy abort-job
480ef0fe 166&lt;/Class&gt;
ef416fc2 167</PRE>
168
480ef0fe 169<H3>Description</H3>
ef416fc2 170
171<P>The <CODE>ErrorPolicy</CODE> directive defines the policy that
172is used when a backend is unable to send a print job to the
173printer. The <CODE>lpadmin(8)</CODE> command sets the current
174error policy:</P>
175
176<PRE CLASS="command">
177<KBD>/usr/sbin/lpadmin -p classname -o printer-error-policy=stop-printer</KBD>
178</PRE>
179
180<P>The following values are supported:</P>
181
182<UL>
183
07725fee 184 <LI><CODE>abort-job</CODE> - Abort the job and proceed
ef416fc2 185 with the next job in the queue</LI>
186
187 <LI><CODE>retry-job</CODE> - Retry the job after waiting
188 for N seconds; the <VAR>cupsd.conf</VAR> <A
4744bd90 189 HREF="ref-cupsd-conf.html#JobRetryInterval"><CODE>JobRetryInterval</CODE></A>
ef416fc2 190 directive controls the value of N</LI>
191
192 <LI><CODE>stop-printer</CODE> - Stop the printer and keep
193 the job for future printing; this is the default
194 value</LI>
195
196</UL>
197
198<P>This directive must appear inside a <A
199HREF="#Class"><CODE>Class</CODE></A> or <A
200HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 201section.</P>
ef416fc2 202
203
480ef0fe 204<H2 CLASS="title"><A NAME="Info">Info</A></H2>
ef416fc2 205
480ef0fe 206<H3>Examples</H3>
ef416fc2 207
208<PRE CLASS="command">
480ef0fe 209&lt;Class name&gt;
210 ...
211 Info My Class
212&lt;/Class&gt;
ef416fc2 213</PRE>
214
480ef0fe 215<H3>Description</H3>
ef416fc2 216
217<P>The <CODE>Info</CODE> directive defines the string for the
218<VAR>printer-info</VAR> attribute. It is normally set using the
219<CODE>lpadmin(8)</CODE> command:</P>
220
221<PRE CLASS="command">
222<KBD>/usr/sbin/lpadmin -p classname -D "My Class"</KBD>
223</PRE>
224
225<P>This directive must appear inside a <A
226HREF="#Class"><CODE>Class</CODE></A> or <A
227HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 228section.</P>
ef416fc2 229
230
480ef0fe 231<H2 CLASS="title"><A NAME="JobSheets">JobSheets</A></H2>
ef416fc2 232
480ef0fe 233<H3>Examples</H3>
ef416fc2 234
235<PRE CLASS="command">
480ef0fe 236&lt;Class name&gt;
237 ...
238 JobSheets none,standard
239&lt;/Class&gt;
ef416fc2 240</PRE>
241
480ef0fe 242<H3>Description</H3>
ef416fc2 243
244<P>The <CODE>JobSheets</CODE> directive specifies the default
245banner pages to print before and after a print job. In the above
246example, only a <VAR>standard</VAR> banner will print after each
247job. The <CODE>lpadmin(8)</CODE> command is normally used to set
248the default banners:
249
250<PRE CLASS="command">
251<KBD>/usr/sbin/lpadmin -p classname -o job-sheets-default=none,standard</KBD>
252</PRE>
253
254<P>If only one banner file is specified, it will be printed
255before the files in the job. If a second banner file is
256specified, it is printed after the files in the job.</P>
257
258<P>The available banner pages depend on the local system
259configuration; CUPS includes the following standard banner
260files:</P>
261
262<UL>
263
264 <LI><CODE>none</CODE> - Do not produce a banner
265 page.</LI>
266
267 <LI><CODE>classified</CODE> - A banner page with a
268 &quot;classified&quot; label at the top and bottom.</LI>
269
270 <LI><CODE>confidential</CODE> - A banner page with a
271 &quot;confidential&quot; label at the top and bottom.</LI>
272
273 <LI><CODE>secret</CODE> - A banner page with a
274 &quot;secret&quot; label at the top and bottom.</LI>
275
276 <LI><CODE>standard</CODE> - A banner page with no label
277 at the top and bottom.</LI>
278
279 <LI><CODE>topsecret</CODE> - A banner page with a
280 &quot;top secret&quot; label at the top and bottom.</LI>
281
282 <LI><CODE>unclassified</CODE> - A banner page with an
283 &quot;unclassified&quot; label at the top and bottom.</LI>
284
285</UL>
286
287<P>This directive must appear inside a <A
288HREF="#Class"><CODE>Class</CODE></A> or <A
289HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 290section.</P>
ef416fc2 291
292
480ef0fe 293<H2 CLASS="title"><A NAME="KLimit">KLimit</A></H2>
ef416fc2 294
480ef0fe 295<H3>Examples</H3>
ef416fc2 296
297<PRE CLASS="command">
480ef0fe 298&lt;Class name&gt;
299 ...
300 KLimit 1234
301&lt;/Class&gt;
ef416fc2 302</PRE>
303
480ef0fe 304<H3>Description</H3>
ef416fc2 305
306<P>The <CODE>KLimit</CODE> directive defines the value of the
307<VAR>job-k-limit</VAR> attribute. It is normally set using the
308<CODE>lpadmin(8)</CODE> command:</P>
309
310<PRE CLASS="command">
311<KBD>/usr/sbin/lpadmin -p classname -o job-k-limit=1234</KBD>
312</PRE>
313
314<P>This directive must appear inside a <A
315HREF="#Class"><CODE>Class</CODE></A> or <A
316HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 317section.</P>
ef416fc2 318
319
480ef0fe 320<H2 CLASS="title"><A NAME="Location">Location</A></H2>
ef416fc2 321
480ef0fe 322<H3>Examples</H3>
ef416fc2 323
324<PRE CLASS="command">
480ef0fe 325&lt;Class name&gt;
326 ...
327 Location Building 3321
328&lt;/Class&gt;
ef416fc2 329</PRE>
330
480ef0fe 331<H3>Description</H3>
ef416fc2 332
333<P>The <CODE>Location</CODE> directive defines the string for the
334<VAR>printer-location</VAR> attribute. It is normally set using the
335<CODE>lpadmin(8)</CODE> command:</P>
336
337<PRE CLASS="command">
338<KBD>/usr/sbin/lpadmin -p classname -L "Building 3321"</KBD>
339</PRE>
340
341<P>This directive must appear inside a <A
342HREF="#Class"><CODE>Class</CODE></A> or <A
343HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 344section.</P>
ef416fc2 345
346
480ef0fe 347<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="OpPolicy">OpPolicy</A></H2>
ef416fc2 348
480ef0fe 349<H3>Examples</H3>
ef416fc2 350
351<PRE CLASS="command">
480ef0fe 352&lt;Class name&gt;
353 ...
354 OpPolicy default
355&lt;/Class&gt;
ef416fc2 356</PRE>
357
480ef0fe 358<H3>Description</H3>
ef416fc2 359
360<P>The <CODE>OpPolicy</CODE> directive sets the operation policy
361that is used for the printer. The <CODE>lpadmin(8)</CODE> command
362sets the current operation policy:</P>
363
364<PRE CLASS="command">
365<KBD>/usr/sbin/lpadmin -p classname -o printer-op-policy=default</KBD>
366</PRE>
367
368<P>The default policy is named "default". All policies correspond
369to those defined using the <VAR>cupsd.conf</VAR> <A
4744bd90 370HREF="ref-cupsd-conf.html#Policy"><CODE>Policy</CODE></A>
480ef0fe 371section.</P>
ef416fc2 372
373<P>This directive must appear inside a <A
374HREF="#Class"><CODE>Class</CODE></A> or <A
375HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 376section.</P>
ef416fc2 377
378
480ef0fe 379<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="Option">Option</A></H2>
ef416fc2 380
480ef0fe 381<H3>Examples</H3>
ef416fc2 382
383<PRE CLASS="command">
480ef0fe 384&lt;Class name&gt;
385 ...
386 Option name value
387 Option scaling 100
388 Option page-left 72
389&lt;/Class&gt;
ef416fc2 390</PRE>
391
480ef0fe 392<H3>Description</H3>
393
394<P>The <CODE>Option</CODE> directive specifies a default job
395template attribute value. It is mapped to
396<CODE>name-default</CODE> in the printer attributes and applied
397to jobs as <CODE>name</CODE>.</P>
398
399<P>This directive must appear inside a <A
400HREF="#Class"><CODE>Class</CODE></A> or <A
401HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
402section.</P>
403
404
405<H2 CLASS="title"><A NAME="PageLimit">PageLimit</A></H2>
406
407<H3>Examples</H3>
408
409<PRE CLASS="command">
410&lt;Class name&gt;
411 ...
412 PageLimit 1234
413&lt;/Class&gt;
414</PRE>
415
416<H3>Description</H3>
ef416fc2 417
418<P>The <CODE>PageLimit</CODE> directive defines the value of the
419<VAR>job-page-limit</VAR> attribute. It can be set using the
420<CODE>lpadmin(8)</CODE> command:</P>
421
422<PRE CLASS="command">
423<KBD>/usr/sbin/lpadmin -p classname -o job-page-limit=1234</KBD>
424</PRE>
425
426<P>This directive must appear inside a <A
427HREF="#Class"><CODE>Class</CODE></A> or <A
428HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 429section.</P>
ef416fc2 430
431
480ef0fe 432<H2 CLASS="title"><A NAME="Printer">Printer</A></H2>
ef416fc2 433
480ef0fe 434<H3>Examples</H3>
ef416fc2 435
436<PRE CLASS="command">
480ef0fe 437&lt;Class name&gt;
438 ...
439 Printer foo
440 Printer bar
441 Printer bleep
442&lt;/Class&gt;
ef416fc2 443</PRE>
444
480ef0fe 445<H3>Description</H3>
ef416fc2 446
447<P>The <CODE>Printer</CODE> directive adds a printer to a class.
448Printers are added to a class using the <CODE>lpadmin(8)</CODE>
449command:</P>
450
451<PRE CLASS="command">
452<KBD>/usr/sbin/lpadmin -p printername -c classname</KBD>
453</PRE>
454
455<P>This directive must appear inside a <A
456HREF="#Class"><CODE>Class</CODE></A> or <A
457HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 458section.</P>
ef416fc2 459
460
480ef0fe 461<H2 CLASS="title"><A NAME="QuotaPeriod">QuotaPeriod</A></H2>
ef416fc2 462
480ef0fe 463<H3>Examples</H3>
ef416fc2 464
465<PRE CLASS="command">
480ef0fe 466&lt;Class name&gt;
467 ...
468 QuotaPeriod 604800
469&lt;/Class&gt;
ef416fc2 470</PRE>
471
480ef0fe 472<H3>Description</H3>
ef416fc2 473
474<P>The <CODE>QuotaPeriod</CODE> directive defines the value of
475the <VAR>job-quota-period</VAR> attribute. Typical values are
47686400 (1 day), 604800 (1 week), 2592000 (1 month), and 31536000
477(1 year). It is set using the <CODE>lpadmin(8)</CODE>
478command:</P>
479
480<PRE CLASS="command">
481<KBD>/usr/sbin/lpadmin -p classname -o job-quota-period=604800</KBD>
482</PRE>
483
484<P>This directive must appear inside a <A
485HREF="#Class"><CODE>Class</CODE></A> or <A
486HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 487section.</P>
ef416fc2 488
489
480ef0fe 490<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="Shared">Shared</A></H2>
ef416fc2 491
480ef0fe 492<H3>Examples</H3>
ef416fc2 493
494<PRE CLASS="command">
480ef0fe 495&lt;Class name&gt;
496 ...
497 Shared yes
498&lt;/Class&gt;
ef416fc2 499</PRE>
500
480ef0fe 501<H3>Description</H3>
ef416fc2 502
503<P>The <CODE>Shared</CODE> directive defines the initial value of
504the <VAR>printer-is-shared</VAR> attribute. The strings
505<VAR>yes</VAR> and <VAR>no</VAR> correspond to the true and false
506values, respectively. The <CODE>lpadmin(8)</CODE> command sets
507the current state:</P>
508
509<PRE CLASS="command">
510<KBD>/usr/sbin/lpadmin -p classname -o printer-is-shared=true</KBD>
511</PRE>
512
513<P>This directive must appear inside a <A
514HREF="#Class"><CODE>Class</CODE></A> or <A
515HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 516section.</P>
ef416fc2 517
518
480ef0fe 519<H2 CLASS="title"><A NAME="State">State</A></H2>
ef416fc2 520
480ef0fe 521<H3>Examples</H3>
ef416fc2 522
523<PRE CLASS="command">
480ef0fe 524&lt;Class name&gt;
525 ...
526 State idle
527&lt;/Class&gt;
ef416fc2 528</PRE>
529
480ef0fe 530<H3>Description</H3>
ef416fc2 531
532<P>The <CODE>State</CODE> directive defines the initial value of
533the <VAR>printer-state</VAR> attribute. The strings
534<VAR>idle</VAR> and <VAR>stopped</VAR> correspond to the IPP
535enumeration values 3 and 5, respectively. The
536<CODE>cupsenable(8)</CODE> and <CODE>cupsdisable(8)</CODE>
537commands set the current state:</P>
538
539<PRE CLASS="command">
540<KBD>/usr/sbin/cupsenable classname</KBD>
541<KBD>/usr/sbin/cupsdisable classname</KBD>
542</PRE>
543
544<P>This directive must appear inside a <A
545HREF="#Class"><CODE>Class</CODE></A> or <A
546HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 547section.</P>
ef416fc2 548
549
480ef0fe 550<H2 CLASS="title"><A NAME="StateMessage">StateMessage</A></H2>
ef416fc2 551
480ef0fe 552<H3>Examples</H3>
ef416fc2 553
554<PRE CLASS="command">
480ef0fe 555&lt;Class name&gt;
556 ...
557 StateMessage Ready to print.
558&lt;/Class&gt;
ef416fc2 559</PRE>
560
480ef0fe 561<H3>Description</H3>
ef416fc2 562
563<P>The <CODE>StateMessage</CODE> directive defines the initial
564string for the <VAR>printer-state-message</VAR> attribute. The
565following are some example messages:</P>
566
567<PRE CLASS="command">
568StateMessage Connected to host_name...
569StateMessage Connecting to printer_queue on port port_number...
570StateMessage Network host host_name is busy; will retry in 30 seconds...
571StateMessage Class busy; will retry in 10 seconds...
572StateMessage Class is busy; retrying print job...
573StateMessage Print file accepted - job ID id_number.
574StateMessage Ready to print.
575StateMessage Waiting for job to complete
576</PRE>
577
578<P>This directive must appear inside a <A
579HREF="#Class"><CODE>Class</CODE></A> or <A
580HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 581section.</P>
ef416fc2 582
583
480ef0fe 584<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="StateTime">StateTime</A></H2>
ef416fc2 585
480ef0fe 586<H3>Examples</H3>
ef416fc2 587
588<PRE CLASS="command">
480ef0fe 589&lt;Class name&gt;
590 ...
591 StateTime 1133542425
592&lt;/Class&gt;
ef416fc2 593</PRE>
594
480ef0fe 595<H3>Description</H3>
ef416fc2 596
597<P>The <CODE>StateTime</CODE> directive defines the UNIX time
598(seconds since Jan 1, 1970) for the last state change of the
599queue. It is mapped to the <VAR>printer-state-change-time</VAR>
600attribute.</P>
601
602<P>This directive must appear inside a <A
603HREF="#Class"><CODE>Class</CODE></A> or <A
604HREF="#DefaultClass"><CODE>DefaultClass</CODE></A>
480ef0fe 605section.</P>
ef416fc2 606
607
608</BODY>
609</HTML>