Debian Codegraph @

upstream/debian-unstable/man5/printcap.5

raw
1 .TH PRINTCAP 5 2006-12-09 "LPRng" "lpd configuration"
2 .SH NAME
3 printcap \- printer capability data base
4 .SH SYNOPSIS
5 printcap database
6 .SH DESCRIPTION
7 The format of the LPRng
8 .I printcap
9 database was based on the
10 .IR termcap (5)
11 data base file format.
12 Entries in the
13 .I printcap
14 Each entry in the data base is used to define various options and
15 values to control the printing and spooling of print jobs.
16 .SH "LPD.CONF, SYSTEM AND USER PRINTCAP FILES"
17 Default configuration values are read from the
18 LPRng configuration file
19 /etc/lprng/lpd.conf,
20 consult the lpd.conf(5) man page for details about them.
21 The system printcap file
22 /etc/printcap
23 contains information common to all users and the LPRng printing
24 system.
25 Finally,
26 the user printcap files is in
27 ${HOME}/.printcap
28 and contain user configurable information for printer information.
29 The values in the user printcap file override values in the
30 printcap file
31 which override the default values in the
32 /etc/lprng/lpd.conf
33 file.
34 .LP
35 The user printcap file is used by client programs such as
36 .I lpr ,
37 .I lprm ,
38 .I lpq ,
39 and
40 .I lpq
41 to allow the user to define either a special set of printers,
42 provide additional configuration information,
43 or to modify default settings in the /etc/printcap,
44 or
45 /etc/lprng/lpd.conf
46 file.
47 .SH CAPABILITIES
48 The printcap database files format is based on the
49 .I termcap (5)
50 database format,
51 modified as follows.
52 Leading whitespace on each line is discarded,
53 and blank lines or lines which then start with a
54 comment character (#) are discarded.
55 A line which does not start with a colon (:) or bar (|) starts
56 a printer entry definition.
57 Lines ending with a backslash (\e) are assumed to continue
58 to the next line; this is for compatibility with other
59 historical printcap file formats.
60 Trailing blanks and tabs (whitespace) for an option value
61 are deleted unless the last one is escaped with a backslash
62 (``\\'').
63 If a colon character value is required then the \e:
64 escape sequence can be used, e.g.: dest=ftp\e://address/file.
65 .LP
66 A printer definition starts with a primary printer name,
67 followed by zero or more alternative printer names,
68 followed by a set of keyword entries and values.
69 For example:
70 .nf
71 .sp
72 .ft CW
73 #comment
74 # primary printer name
75 lp
76 #alternate names
77 |lp2|lp3
78 |Example of a printer
79 :sd=/usr/spool/LPD/lp
80 :rw:lp=/dev/lp:mx#100
81 include /etc/printcap/mainprintcap
82 .sp
83 .fi
84 .LP
85 The special printcap definition
86 .I include
87 will read the named file,
88 which must have an absolute pathname,
89 as the next set of printcap entries.
90 .LP
91 Keywords can be 1 to an indefinite number of characters long,
92 and are case sensitive.
93 Values for keywords can be strings
94 (:st=string:),
95 signed integer values using the C language notation,
96 (:nu#12:max#-2:mask#0x1EF:),
97 or flags
98 (:flag: to set to 1, :flag@: to clear to 0).
99 Integer values must be representable as 32 bit 2's complement numbers;
100 care should be taken with extremely large numbers.
101 .LP
102 If the primary name of a printcap entry starts with a punctuation character,
103 then the entry may be referenced using the
104 .I tc
105 capability, but is ignored otherwise.
106 This allows common printcap information to be placed in a single entry.
107 .LP
108 The special printcap entry
109 .I oh
110 (i.e. - only this host) may be used to select a printcap entry for
111 use by one or more hosts.
112 The oh entry can be a list of one or more host names or glob type of
113 patterns.
114 These patterns are first applied to the host's fully qualified domain name,
115 and then used to to a lookup of an IP address.
116 If either the glob match or the host has a matching IP address then the
117 printcap entry is selected for use.
118 In addition,
119 the
120 .I server
121 flag indicates that only the LPD server is to use this printcap entry.
122 This allows client and server printcap information be to be segregated
123 in a simple manner.
124 .LP
125 The following is a list of the keywords currently used by the LPRng software.
126 Many of these keywords are used only by the
127 .I LPD
128 server,
129 others are used by the client programs
130 .I LPR,
131 .I LPC,
132 .I LPRM,
133 .I PAC,
134 as well as the server.
135 In the Use column in the table below,
136 an
137 .B A
138 stands for all programs,
139 .B D
140 stands for
141 .IR lpd ,
142 and
143 .B R
144 stands for the client programs such as
145 .I LPR.
146 .LP
147 Some of these entries can only appear or have an effect if they are
148 in the lpd.conf initialization file.
149 See lpd.conf(5) for further details.
150 .SH "ENTRIES BY ALPHABETICAL ORDER"
151 .sp
152 .nf
153 .ta \w'\0\0\0\0'u +\w'\0\0\0\0'u +\w'Type 'u +\w'Default 'u +4n +4n +4n +4n +4n +4n 8i
154 \fBFL Use Type Default Description\fR
155 Xf D str NULL output filter for format X (used by lpd).
156 'filter' sets default filter
157 ab D bool false always print banner, ignore lpr -h option
158 achk D bool false
159 If TRUE LPD and the :as specifies a remote host or
160 filter or the :af specifies a remote host or filter
161 then after writing the accounting information to the
162 destination a reply will be read. The value of the
163 reply determines how the job is to be handled.
164 ae D str accounting format for end of job or a program to run
165 to record accounting information (see also af, la, ar
166 and Accounting).
167 af D str NULL
168 accounting file, filter, or remote accounting server
169 (see also la, ar, as, ae, achk). If format is |/path then
170 the program will be started and accounting information
171 will be written to the program STDIN. If the format
172 host%port, a tcp/ip connection will be made to port
173 on host and the accounting information written to the
174 remote host. In both of these cases the write operation
175 must succeed or an error will result. If the format
176 is neither of these cases then the value will be treated
177 as a file and accounting information appended to the file
178 if it exists. The accounting file will not be created,
179 it must exist for LPD to append data to it.
180 The :as and :ae fields have the accounting information.
181 ah D bool false auto-hold - job held until explicitly released
182 all A str NULL a list of all printers; (see ALL PRINTERS)
183 allow_duplicate_flags A bool false
184 allow duplicate command line flags; last overwrites earlier
185 allow_getenv A bool (compile time)
186 allows LPRng software to use the LPD_CONF environment variable
187 to specify the location of a configuration file. This is
188 for testing only.
189 allow_user_logging A bool false
190 if mail is requested using lpr -mhost%port,prot operations,
191 and the allow_user_logging flag is true, then job logging
192 information will be sent to host%port,prot.
193 allow_user_setting A str NULL
194 allow these users to impersonate other users with the
195 lpr -U user@host, lpc -U user@host, etc., options
196 append_z A str
197 append these options to the -Z options for the job
198 ar D bool true write remote transfer accounting (if af, and as/ae set)
199 architecture A str (compile time)
200 architecture the software was compiled for. (Obsolete.)
201 as D str accounting format for start of job or a program to run
202 to record accounting information (see also af, la, ar
203 and Accounting).
204 auth R str NULL
205 client to server authentication type
206 be D str banner printing program for end (overrides bp, hl)
207 bk R bool false Berkeley-compatible: be strictly RFC-compliant
208 or more exactly, BSD LPR compatible when sending jobs.
209 bk_filter_options D str (see source code)
210 when bk flag set, options for non OF print filters
211 bk_of_filter_options D str (see source code)
212 when bk flag set, options for OF print filters
213 bkf R bool false
214 use bk_filter_options and bk_of_filter_options when
215 invoking print filter.
216 bl D str banner line - sent to banner printer program
217 default: $-'C:$-'n Job: $-'J Date: $-'t
218 expands to: Class:User Job: job Date: date
219 This is to force compatibility with vintage print filters
220 that require a non-standard banner string. Usually used with
221 :sb: option.
222 bp D str banner printing program (see hl)
223 (default: configuration variable default_banner_printer)
224 bq_format D str l format of output from bounce queue filters
225 br D num none if lp is a tty, set the baud rate (see ty)
226 break_classname_priority_link A flag false
227 Do not set priority to first letter of class name
228 bs D str banner printing program for start (overrides bp, hl)
229 cf D str NULL cifplot data filter
230 check_for_nonprintable R bool false
231 lpr checks f and p formats for printable files
232 check_for_protocol_violations R bool false
233 check for RFC1179 protocol violations
234 chooser D str load balance queue destination chooser program
235 chooser_interval D num 10
236 load balance queue does checks for a
237 destination queue available at this interval
238 chooser_routine D bool false
239 use the user provided chooser routine for this queue
240 class_in_status A bool true
241 show class name in lpq status rather than priority
242 cm A str NULL comment identifying printer (LPQ)
243 config_file A str /etc/lprng/lpd.conf
244 location of LPRng configuration information. Compile
245 time option only - see allow_getenv.
246 connect_grace A num 0
247 time between jobs to allow printer recovery
248 connect_interval A num 10
249 time between open or connection attempts
250 connect_timeout A num 10
251 timeout value for connection or open
252 control_file_line_order D str NULL
253 Put the control file lines in a specific order
254 control_filter D str NULL
255 Filter for control file. Used when sending job to remote
256 spool queue.
257 create_files D bool false
258 create log, debug, etc., files automatically
259 db A str NULL LPD debug options when serving this queue.
260 See lf (log file) entry as well.
261 default_format R str f
262 default format for printing jobs
263 default_permission D str A
264 default permission for operation
265 default_printer A str lp
266 default printer for printing jobs
267 default_priority R str A
268 default priority for printing jobs
269 default_remote_host A str localhost
270 default remote host for printing operations
271 default_tmp_dir A str /tmp
272 default temporary directory
273 destinations D str NULL
274 names of printers that lpq/lprm should talk to
275 find a job that has been processed by a router
276 script (see README.routing)
277 df D str NULL tex data filter (DVI format)
278 done_jobs D num 1
279 retain status for last N jobs
280 done_jobs_max_age num 0
281 remove status older than N seconds (0 - no removal)
282 exit_linger_timeout A num 10
283 socket SO_LINGER timeout value
284 fd D bool false if true, no forwarded jobs accepted
285 ff D str ``\ef'' string to send for a form feed (see INITIALIZATION)
286 filter D str NULL
287 default filter to use for printing file
288 filter_ld_path D str (see source)
289 the LD_LIBARY_PATH environment variable value for filters
290 filter_options D str (see source code)
291 when bk flag clear, options for non OF print filters
292 filter_path D str (default '/bin:/usr/bin')
293 the PATH environment variable value for filters
294 filter_poll_interval D num 30
295 interval to poll OF filter
296 filter_stderr_to_status_file D bool false
297 set the filter STDERR to the status file and do
298 no report errors in the queue status file.
299 fo D bool false print a form feed when device is opened
300 force_fqdn_hostname A bool FALSE
301 Force a fully qualified host name in control file
302 force_ipadddr_hostname A bool FALSE
303 Force the IP address of the host to be used for the
304 hostname in control file
305 force_localhost A bool TRUE
306 Forces the clients programs (lpr, lpc, etc.)
307 to send all print jobs and requests to the server running
308 on the localhost entry for action. This flag effectively
309 forces BSD LPR behavior.
310 force_lpq_status D str NULL
311 Specifies a list of LPQ formats and hosts which get status
312 returned in this format. For example
313 force_lpq_status=s=pc*;l=mac* will cause hosts whose
314 FQDN matches pc* to get short status and those which
315 match mac* to get long format.
316 force_queuename A str NULL
317 When :qq: flag or use_queuename configuration is enabled,
318 specifies the queuename to be used for control file Q
319 information.
320 ff_separator D bool false
321 need form feeds to separate job files
322 fq D bool false print a form feed when device is closed
323 full_time D bool detailed time format specification in log messages
324 fx A str NULL valid output filter formats
325 i.e. ``flp'' would allow f, l, and p
326 default is to allow all formats
327 gf D str NULL graph data filter (plot (3X) format)
328 generate_banner D bool false
329 generate a banner when forwarding job
330 group D str daemon LPD server group id for execution
331 hl D bool false print banner after job instead of before
332 if D str NULL filter command, run on a per-file basis
333 ignore_requested_user_priority D bool false
334 Ignore the requested user priority when ordering jobs.
335 Prevents students... um... users from queue jumping.
336 ipv6 A bool false Use IPV6
337 keepalive A bool true
338 set socket SO_KEEPALIVE option
339 kerberos_keytab D str /etc/lpd.keytab
340 Kerberos lpd server keytab file
341 kerberos_life D str NULL
342 Kerberos lpd server key lifetime
343 kerberos_renew D str NULL
344 Kerberos lpd server key renewal time
345 kerberos_server_principle D str NULL
346 Kerberos remote lpd server principle
347 kerberos_service D str lpr
348 Kerberos service used in principle requests
349 la D bool true write local printer accounting (if af is set)
350 ld D str NULL leader string printed on printer open (see INITIALIZATION)
351 lf D str ``log'' error and debugging log file (LPD)
352 lk D bool false lock the lp device to force arbitration
353 lockfile D str /var/spool/lpd/lpd
354 lpd lock file (used only in lpd.conf).
355 The lpd_port port value is appended
356 to the lockfile value to provide a unique lockfile
357 even when different versions of LPRng are running
358 on the same system.
359 logger_destination D str NULL
360 destination for logging information. Format is
361 host%port
362 logger_max_size D num 1024
363 logger file maximum size in K
364 logger_path D str NULL
365 logger file pathname
366 logger_timeout D num 0
367 logger connection timeout. 0 is no timeout.
368 longnumber D bool false
369 use 6 digit job numbers
370 lp D str NULL device name or pipe to send output to
371 lpd_bounce A bool FALSE
372 Forces lpd to filter jobs and then forward them
373 as a single file
374 (See Bounce Queues)
375 lpd_force_poll A bool FALSE
376 Forces lpd to periodically poll lpd queues.
377 lpd_poll_time A num 600
378 Check queues for work at this interval; start queues
379 in groups of 'lpd_poll_servers_started' at intervals
380 of 'lpd_poll_start_interval' seconds
381 lpd_poll_start_interval A num 10
382 Start 'lpd_poll_servers_started' queue servers at this
383 interval.
384 lpd_poll_servers_started A num 10
385 Start 'lpd_poll_servers_started' queues at once
386 lpd_port D str printer
387 format is [ipaddr%]port. If the ipaddr is present
388 then the lpd listening socket is bound to the specified
389 ip address and port only, otherwise it is bound to all
390 interfaces. If the port value is not a number then the
391 then the getservbyname() system call is used to get the
392 port number.
393 lpd_printcap_path D str (see source)
394 printcap path for lpd, used instead of printcap path
395 (configuration value only)
396 lpr_bounce R bool true
397 Forces lpr to filter jobs and then send them.
398 (See Bounce Queues)
399 lpr_bsd R bool false
400 when set, LPR -m will not take argument, but will use
401 $USER value for return mail address.
402 mail_from D str NULL
403 specifies the user part of email From: address
404 mail_operator_on_error D str NULL
405 send mail to this user when LPD encounters printing error.
406 max_connect_interval A num 60
407 maximum time between connection attempts
408 max_log_file_size D num 0
409 maximum log file size in K bytes (0 is unlimited)
410 spool queue log file truncated to min_log_file_size
411 when value is nonzero and limited exceeded.
412 max_servers_active D num 0
413 maximum servers that LPD will allow one to be active at one
414 time. 0 selects the system default, which is usually
415 pretty small, perhaps 10. (configuration value only).
416 max_status_line D num 79 maximum number of characters on an LPQ status line
417 max_status_size D num 10 maximum size (Kbytes) of status file
418 mc R num 1 maximum copies allowed
419 min_log_file_size D num 0 minimum size (Kbytes) of log file
420 min_status_size D num 2 minimum size (Kbytes) of status file
421 minfree D str 0
422 minimum space (in K) for spool directory
423 ml R num 32 minimum printable characters for printable check
424 ms_time_resolution D bool false
425 log time in milliseconds
426 mx R num 0 maximum job size in K, 0 = unlimited
427 nb D num 0 if non-zero, do a nonblocking open on lp device
428 nf D str NULL DITROFF data filter
429 network_connect_grace A num 0
430 time between attempts to send jobs to spooler
431 Useful when dealing with network printer using LPD
432 interface to allow a bit of time between jobs.
433 nline_after_file D bool false
434 put the N (filename) after the data file information
435 in the control file. Use to handle systems that want
436 it that way.
437 of D str NULL output filter, run once for all output
438 (used for banner printing, form feeds between files)
439 of_filter_options D str (see source code)
440 when bk flag clear, options for OF print filters
441 oh A str NULL Specific printcap entry for host;
442 (printcap entry ignored unless IP address of host and
443 entry value match. Entry is used first to do glob
444 style match against the host's fully qualified domain name,
445 and then interpreted as a general IP address)
446 order_routine D bool false
447 use a user provided routine to generate queue order
448 information.
449 originate_port A str 512 1023
450 when originating a connection, use ports in this range.
451 pass_env A str LANG,LC_CTYPE,LC_NUMERIC,LC_TIME,LC_COLLATE,LC_MONETARY,LC_MESSAGES,LC_PAPER,LC_NAME,LC_ADDRESS,LC_TELEPHONE,LC_MEASUREMENT,LC_IDENTIFICATION,LC_ALL
452 if not the LPD server, sanitize and put these variables
453 in a filter environment variable list.
454 perms_path A str /etc/lprng/lpd.perms
455 location of perms file (used in lpd.conf)
456 pl D num 66 page length (in lines)
457 pr D str ``/bin/pr'' pr program for p format
458 prefix_o_to_z D bool false
459 prefix the control file O line to the control file
460 Z line.
461 prefix_z D str NULL
462 prefix the specified options to the control file
463 Z line.
464 prefix_z_to_o D bool false
465 prefix the control file Z line to the control file
466 O line.
467 printcap_path A str /etc/printcap
468 location of printcap file (only in lpd.conf)
469 ps A str ''status'' printer status file name
470 pw D num 132 page width (in characters)
471 px D num 0 page width in pixels (horizontal)
472 py D num 0 page length in pixels (vertical)
473 qq A bool false LPR - puts in the queue name (Q entry)
474 in the job control file when spooled or transferred.
475 LPD - when receiving or transferring a job,
476 if the queue name (Q entry) in the job control
477 file is not present, puts in the queue name.
478 queue_control_file D str control.%P
479 name of the queue control file
480 queue_lock_file D str %P
481 name of the queue lock file
482 queue_status_file D str status.%P
483 name of the queue status file
484 queue_unspooler_file D str unspooler.%P
485 name of the queue unspooler status file
486 remote_support A str NULL
487 if non-null, specifies allowed operations to remote queue.
488 R=lpr, M=lprm, Q=lpq, V = lpq -v, C=lpc. For example,
489 remote_support=RM would only allow LPR and LPRM operations.
490 remove_z D str null
491 remove these options from the control file Z line
492 report_server_as A str NULL
493 use the str value as the name of the server when reporting
494 LPQ or LPC status.
495 require_explicit_q Require a queue to be specified, do not use default
496 queue from printcap.
497 retry_econnrefused A bool true
498 if set, retry a connection to a remote system when an
499 ECONNREFUSED error is returned.
500 retry_nolink D bool true
501 if LPD is sending a job or opening a device for
502 printing and the value is true, then the connection or
503 device open is repeated indefinitely.
504 return_short_status D str NULL
505 Some legacy (non-LPRng) LPQ programs expect 'short' status
506 to be returned. This option allows you to specify which hosts
507 will get it. The value is a list of hosts and/or IP addresses
508 and masks to which the LPD server will provide short status.
509 For example: return_short_status=192.8.0.0/16 will make LPD
510 return short status to all requests from hosts in subnet
511 192.8.0.0. (See short_status_length)
512 reuse_addr A bool false
513 if set, use SO_REUSEADDR on outgoing connection ports.
514 This reduces the problems with exhausting port numbers.
515 (usually only in lpd.conf)
516 reverse_lpq_status D str NULL
517 When a lpq status request arrives from one of the specified
518 hosts or IP addresses, then the LPQ status format is inverted.
519 For example, if reverse_lpq_status=host*,127.0.0.0/8,
520 then when a LONG status request arrives from host1 or from
521 IP address 127.0.0.1, the SHORT status will be returned.
522 reverse_priority_order D bool false
523 Make highest priority A, lowest Z
524 rf D str NULL filter for printing FORTRAN style text files
525 rg A str NULL (restrict to group members)
526 Restrict use of queue to users which are members of
527 specified groups.
528 rm A str NULL remote-queue machine (hostname) (with rp)
529 router D str NULL script that dynamically re-routes a job
530 (see README.routing)
531 rp A str NULL remote-queue printer name (with rm)
532 rw D bool false open the printer for reading and writing
533 safe_chars D str NULL
534 additional safe characters for control file contents
535 save_on_error D bool false
536 Save job when an error occurs to allow post-mortem
537 diagnostics or reprinting. This should only be set on
538 print queues. It is also a diagnostic aid.
539 save_when_done D bool false
540 Save job when done (printed, transferred) to allow
541 retry at a later time. This should only be set on
542 print queues. It is also a diagnostic aid.
543 sb D bool false short banner (one line only)
544 sd A str NULL spool directory (only ONE printer per directory!)
545 send_block_format A bool false
546 Use the LPRng extended 'block job' job transmission
547 method to send a job to a remote site.
548 send_data_first A bool false send data files then control files
549 when sending a job to a remote host.
550 send_failure_action D str "remove"
551 Action on print or transmission failure after send_try
552 attempts; use the following codes:
553 'success' (JSUCC) - treat as successful
554 'abort' (JABORT) - abort printer
555 'retry' (JRETRY) - retry job
556 'remove' (JREMOVE)- remove job
557 'hold' (JHOLD) - hold job
558 If the value is "|/filter", the filter will be run and
559 the number of attempts can be read from standard input.
560 The filter should exit with one of the error codes listed
561 above to cause the appropriate action.
562 send_job_rw_timeout A num 6000
563 timeout on read/write operations when sending job to
564 printer or remote host (0 value is no timeout)
565 send_query_rw_timeout A num 6000
566 timeout on read/write operations when performing a status
567 operation (0 value is no timeout)
568 send_try A num 3
569 number of times to try sending
570 or printing a job. 0 is infinite.
571 sendmail D str /usr/sbin/sendmail -oi -t
572 sendmail command to send mail to user. Flags must be set
573 so that address and other information is taken from
574 standard input.
575 server A bool false printcap entry for server only
576 server_auth_command A str NULL
577 authentication command for server program
578 server_tmp_dir D str /tmp
579 temporary directory for server to create files when there
580 is no spool directory.
581 server_user D str daemon server user name used in authentication operations
582 sf D bool true suppress form feed separators between job files
583 sh D bool false suppress headers and/or banner page
584 shell D str /bin/sh
585 SHELL environment variable value for filters
586 short_status_length D num 1
587 If the return_short_status value is used and has a match against
588 a requesting address, this amount of status is set by the
589 short_status_length option. For most legacy systems a 1 is
590 suitable (1 line of status).
591 socket_linger A num 10
592 if nonzero, forces a SO_LINGER operation to be done
593 on all TCP/IP connections. This usually corrects a problem
594 with missing last data transmissions to remote hosts.
595 spool_dir_perms D num 042700 permissions for spool directory
596 spool_file_perms D num 0600 permissions for spool file
597 ss D str NULL name of queue that server serves (with sv)
598 ssl_XXX D str NULL
599 SSL authentication and encryption options.
600 See lprng_certs(1) for details.
601 ssl_ca_file str A /etc/lprng/ssl.ca/ca.crt
602 SSL signing certificate file
603 ssl_ca_path str A NULL
604 SSL signing certificate directory. Default is
605 directory containing ssl_ca_file.
606 ssl_server_cert str A /etc/lprng/ssl.server/server.crt
607 SSL server certificate
608 ssl_server_password str A
609 SSL server certificate password
610 stalled_time D num 120
611 Time after which to report an active job as stalled
612 stop_on_abort D bool true
613 Stop processing queue when print filter aborts.
614 stty D str NULL stty settings for serial connected printer
615 suspend_of_filter D bool true
616 suspend OF filter and restart. If false, close filter
617 and start new one for each activity.
618 sv D str NULL names of servers for queue (with ss)
619 syslog_device D str /dev/console
620 name of syslog device to use if no syslog facility
621 tc A str NULL reference to a printcap entry to include as part of
622 the current entry.
623 tf D str NULL troff data filter (C/A/T phototypesetter)
624 tr D str NULL trailer string to print when queue empties
625 translate_format D str NULL
626 translate job format (similar to tr(1) utility)
627 on outgoing jobs.
628 Example: translate_format=pfml
629 p format changed to f, m format to l
630 translate_incoming_format D str NULL
631 translate job format (similar to tr(1) utility)
632 on incoming jobs. See translate_format.
633 use_date A bool true add date line ('D') to control file
634 use_identifier R bool true
635 add job identifier lines ('A') in the control file
636 use_info_cache D bool true cache printcap information
637 use_shorthost R bool false
638 use only the hostname for job control
639 and data file names. Host information in job file
640 will still be fully qualified domain name.
641 user D str daemon LPD effective user (EUID) for SUID operations
642 wait_for_eof D bool true
643 wait for EOF on input when readable IO device,
644 do not close immediately at job end.
645 vf D str NULL (Versatek) raster image filter
646 .fi
647 .SH "ENTRIES BY FUNCTION"
648 .LP
649 See the alphabetical listing for detailed information.
650 .sp
651 .nf
652 .ta \w'\0\0\0\0'u +\w'\0\0\0\0'u +\w'Type 'u +\w'Default 'u +4n +4n +4n 8i
653 .sp
654 .B "Filters and Page Formats"
655 Xf D str NULL output filter for format X (used by lpd)
656 'filter' sets default filter
657 cf D str NULL cifplot data filter
658 control_filter D str NULL
659 Filter for control file. Used when sending job to remote
660 spool queue.
661 df D str NULL tex data filter (DVI format)
662 direct_read D bool false
663 if true, filters are given direct access to file.
664 This means no progress indication possible.
665 fx A str NULL valid output filter formats
666 i.e. ``flp'' would allow f, l, and p
667 default is to allow all formats
668 gf D str NULL graph data filter (plot (3X) format)
669 if D str NULL filter command, run on a per-file basis
670 lpd_bounce R bool false
671 Forces lpd to filter jobs and then forward them.
672 (See Bounce Queues)
673 lpr_bounce R bool false
674 Forces lpr to filter jobs and then send them.
675 (See Bounce Queues)
676 nf D str NULL DITROFF data filter
677 of D str NULL output filter, run once for all output
678 pl D num 66 page length (in lines)
679 pr D str ``/bin/pr'' pr program for p format
680 pw D num 132 page width (in characters)
681 px D num 0 page width in pixels (horizontal)
682 py D num 0 page length in pixels (vertical)
683 rf D str NULL filter for printing FORTRAN style text files
684 translate_format D str NULL
685 translate job format (similar to tr(1) utility)
686 only valid when transferring to remote spool queue.
687 Example: translate_format=pfml
688 p format changed to f, m format to l
689 tf D str NULL troff data filter (C/A/T phototypesetter)
690 vf D str NULL (Versatek) raster image filter
691
692 .B Banners
693 ab D bool false always print banner, ignore lpr -h option
694 be D str banner printing program for end (overrides bp, hl)
695 bp D str banner printing program (use hl to print banner at end)
696 bs D str banner printing program for start (overrides bp, hl)
697 hl D bool false print banner after job instead of before
698 sb D bool false short banner (one line only)
699 sh D bool false suppress headers and/or banner page, overrides ab
700
701 .B Accounting
702 ae D str accounting format for end of job or a program to run
703 to record accounting information (see also af, la, ar
704 and Accounting).
705 af D str NULL name of accounting file (see also la, ar)
706 ar D bool true write remote transfer accounting (if af, and as/ae set)
707 as D str accounting format for start of job or a program to run
708 to record accounting information (see also af, la, ar
709 and Accounting).
710 la D bool true write local printer accounting (if af is set)
711
712 .B "Queue control"
713 ah D bool false auto-hold - job held until explicitly released
714 bk R bool false backwards-compatible: be strictly RFC-compliant
715 bkf R bool false backwards-compatible filter: use Berkeley filter options
716 bqfilter D bool false if a bounce queue (sends jobs to remote site)
717 then when bqfilter true and a format filter is specified,
718 sends data files through format filter before transfer.
719 See also 'qq'.
720 cd D str NULL control information directory for LPD server
721 cm A str NULL comment identifying printer (LPQ)
722 fd D bool false if true, no forwarded jobs accepted
723 lf D str ``log'' error and debugging log file (LPD)
724 longnumber D bool false
725 use 6 digit job numbers
726 mc R num 1 maximum copies allowed
727 ml R num 32 minimum printable characters for printable check
728 minfree D str 0 minimum space (Kb) to be left in spool filesystem
729 You can also use nnnM for nnn megabytes.
730 mx R num 0 maximum job size (1Kb blocks, 0 = unlimited)
731 ps A str ''status'' printer status file name
732 nw A bool false spool dir is on an NFS file system
733 (take precautions when reading/writing files)
734 qq A bool false place queue information in control file. See
735 alphabetical for details.
736 rm A str NULL remote-queue machine (hostname) (with rp)
737 rp A str NULL remote-queue printer name (with rm)
738 sd A str NULL spool directory (only ONE printer per directory!)
739 ss D str NULL name of queue that server serves (with sv)
740 sv D str NULL names of servers for queue (with ss)
741 sc R bool false suppress multiple copies
742 use_auth A str NULL authentication to use
743 use_date A bool true add date line ('D') to control file
744 use_identifier R bool true
745 add job identifier lines ('A') in the control file
746 use_shorthost R bool false use only the hostname for job control
747 and data file names. Host information in job file
748 will still be fully qualified domain name.
749
750 .B "Connection and Interface to Printer"
751 db A num 0 debug level when using this printer
752 connect_interval A num 10
753 time between open or connection attempts
754 connect_timeout A num 10
755 timeout value for connection or open
756 (0 is infinite number)
757 ff D str ``\ef'' string to send for a form feed (see INITIALIZATION)
758 fo D bool false print a form feed when device is opened
759 fq D bool false print a form feed when device is closed
760 ld D str NULL leader string printed on printer open (see INITIALIZATION)
761
762 lp D str NULL device name or pipe to send output to
763 lk D bool false lock the lp device to force arbitration
764 max_connect_interval A num 60
765 maximum time between connection attempts
766 nb D num 0 if non-zero, do a nonblocking open on lp device
767 retry_econnrefused A bool true
768 if set, retry a connection to a remote system when an
769 ECONNREFUSED error is returned.
770 retry_nolink D bool true
771 if LPD is sending a job or opening a device for
772 printing and the value is true, then the connection or
773 device open is repeated indefinitely.
774 rs D num 300 number of seconds between spool queue status scans
775 rt D num 3 number of times to try printing (0=infinite).
776 rw D bool false open the printer for reading and writing
777 save_on_error D bool false
778 See above.
779 save_when_done D bool false
780 See above.
781 send_failure_action D str remove
782 See above.
783 send_try alias for rt
784 sf D bool true suppress form feed separators between job files
785 socket_linger A num 10
786 if nonzero, forces a SO_LINGER operation to be done
787 on all TCP/IP connections. This usually corrects a problem
788 with missing last data transmissions to remote hosts.
789 tr D str NULL trailer string to print when queue empties
790
791 .B "Serial Line Setup"
792 br D num none if lp is a tty, set the baud rate (see ty)
793 stty D str NULL stty commands to set output line characteristics
794 alias is sy, ms
795 xs D num 0 like `xc' but set bits (see STTY)
796
797 .B Miscellaneous
798 .nf
799 all A str NULL a list of all printers; (see ALL PRINTERS)
800 destinations D str NULL
801 names of printers that lpq/lprm should talk to find
802 a job that has been processed by a router script
803 (see README.routing)
804 forward_auth D str NULL
805 server to server authentication type, e.g. kerberos
806 force_localhost A bool TRUE
807 Forces the clients programs (lpr, lpc, etc.)
808 to send all print jobs and requests to the server running
809 on the localhost entry for action. This flag effectively
810 forces BSD LPR behaviour.
811 force_queuename A str NULL
812 See above.
813 logger_destination D str NULL
814 destination for logging information. Format is
815 host[%port][,(TCP|UDP)]
816 oh D str NULL Specific printcap entry for host. See above.
817 remote_support A str RMQC
818 if non-null, specifies allowed operations to remote queue.
819 R=lpr, M=lprm, Q=lpq, C=lpc
820 router D str NULL script that dynamically re-routes a job
821 (see README.routing)
822 server A bool false printcap entry for server only
823 server_auth_command D str NULL
824 authentication command for server to use.
825 tc A str NULL reference to a printcap entry to include as part of
826 the current entry.
827 use_auth D str NULL
828 client to server authentication type, e.g. kerberos
829 user_auth_command R str NULL
830 authentication command for user (client program)
831
832 .nf
833 .SH "FILTERS"
834 .PP
835 By convention,
836 all output filter names have the form
837 .B Xf,
838 where
839 .B X
840 is the lower case letter corresponding to the lpr formatting option.
841 The
842 .B filter
843 option can specify a default filter for job files.
844 .PP
845 The
846 .B of
847 filter is started for each job and is used to print the
848 banner page and any FF separators between individual files of the job.
849 It is sent a special stop sequence by the lpd server,
850 and must suspend operations until sent a
851 SIGCONT signal.
852 A file or job filter
853 is run separately for each file;
854 at the end of the job the
855 .B of
856 filter is restarted and used to print the trailing banner (if any)
857 and FF separators.
858 .LP
859 Filters are invoked with a standard set of options defined by the
860 bk_filter_options (backwards compatible),
861 bk_of_filter_options (backwards compatible OF filter),
862 and
863 filter_options configuration variables.
864 See the
865 lpd(8)
866 manual page for details.
867 If the first characters of the filter specification are -$,
868 i.e.- Xf=-$ filter,
869 then the command line options are not added.
870 Currently,
871 the options are:
872 .nf
873 bk_filter_options $P $w $l $x $y $F $c $L $i $J $C $0n $0h $-a
874 bk_of_filter_options $w $l $x $y
875 filter_options $C $F $H $J $L $P $Q $R $Z $a $c $d \e
876 $e $f $h $i $j $k $l $n $s $w $x $y $-a
877 .fi
878 .SH "SPOOL QUEUES"
879 .LP
880 Printcap entries which have a spool directory value
881 (sd) are called spool queues.
882 Jobs sent to a printer with a spool queue are place in the
883 spool directory.
884 When checking the spool queue for jobs,
885 the server will check to see if there is a printcap file in the
886 directory with the name
887 .BR printcap. host.
888 If there is,
889 the additional printcap information is processed and used by the
890 server.
891 .LP
892 If the spool directory is NFS exported,
893 then remote hosts can manipulate the spool entries directly;
894 this can have catastrophic effects,
895 especially in systems where the NFS implementation has defects.
896 The printcap information is particularly vulnerable to exploitation,
897 as well as symbolic links,
898 jobs which cannot be removed,
899 etc.
900 .SH "LOCAL PRINTERS"
901 .LP
902 Local printers have an
903 .B lp
904 entry,
905 which is the device that output should be sent
906 to,
907 usually a serial port tty.
908 PLP supplements this by
909 using the lp field to indicate a remote printer,
910 or by allowing communication with the printer using a separate
911 program, known as an
912 .I lp-pipe,
913 instead of a serial line.
914 If the printcap
915 .B lp
916 entry contains a string of the form
917 .B printer@host,
918 jobs are forwarded to the specified remote printer on the host.
919 If the printcap
920 .B lp
921 entry contains a string of the form
922 .B | command args
923 , the command
924 .B command
925 is run, with the arguments
926 .B args .
927 This can be used to communicate with printers connected to
928 network terminal servers, some TCP/IP-capable
929 printers, and just about anything you can hack up a
930 communication program for. Read the LPRng Manual for more
931 details.
932 .SH "STTY OPTIONS"
933 .PP
934 The
935 .B stty
936 printcap parameter recognizes a set of
937 .IR stty (1)
938 options
939 that can be used to set serial line characteristics for the printer.
940 However, due to the differences between implementations of UNIX,
941 there are several sets of
942 .B ty
943 options supported. Invoke
944 .IR lpd (8)
945 with the ``-v'' command-line option to see which set your
946 installation is using.
947 .PP
948 Systems using the
949 .IR sgtty
950 tty manipulation interface may use the following
951 .IR stty (1)
952 options:
953 .nf
954 .PP
955 .ta 16n +16n +16n +16n +16n +16n +16n +16n +16n
956 bs0 bs1 [-]cbreak cooked cr0
957 cr1 cr2 cr3 [-]decctlq [-]echo
958 [-]even ff0 ff1 [-]lcase [-]litout
959 nl0 nl1 nl2 nl3 [-]nl
960 [-]noflsh new [-]nohang old [-]odd
961 [-]raw start stop tab0 tab1
962 tab2 [-]tabs [-]tandem tek ti700
963 [-]tilde tn300 tty33 tty37 vt05
964 [-]evenp [-]oddp [-]pass8
965 .fi
966 .PP
967 Systems using
968 .IR termio
969 may use the following options:
970 .nf
971 .PP
972 [-]ignbrk [-]brkint [-]ignpar [-]parmrk [-]inpck
973 [-]istrip [-]inlcr [-]igncr [-]icrnl [-]iuclc
974 [-]ixon [-]ixany [-]ixoff [-]decctlq [-]tandem
975 [-]imaxbel [-]opost [-]olcuc [-]onlcr [-]ocrnl
976 [-]onocr [-]onlret [-]ofill [-]ofdel [-]cstopb
977 [-]cread [-]parenb [-]parodd [-]hupcl [-]clocal
978 [-]loblk [-]parity [-]evenp [-]oddp [-]stopb
979 [-]hup [-]crtscts [-]isig [-]noisig [-]icanon
980 [-]cbreak [-]xcase [-]echo [-]echoe [-]echok
981 [-]crterase [-]lfkc [-]echonl [-]noflsh [-]tostop
982 [-]echoctl [-]ctlecho [-]echoprt [-]prterase [-]echoke
983 [-]crtkill [-]lcase [-]nl [-]litout [-]pass8
984 [-]raw [-]sane [-]cooked [-]nopost fill
985 nl0 nl1 cr0 cr1 cr2
986 cr3 tab0 tab1 tab2 tab3
987 bs0 bs1 vt0 vt1 ff0
988 ff1 cs5 cs6 cs7 cs8
989 nul-fill del-fill -tabs
990 .fi
991 .PP
992 And systems using
993 .IR termios
994 may use the following options:
995 .nf
996 .PP
997 [-]ignbrk [-]brkint [-]ignpar [-]parmrk [-]inpck
998 [-]istrip [-]inlcr [-]igncr [-]icrnl [-]iuclc
999 [-]ixon [-]ixany [-]ixoff [-]imaxbel [-]pass8
1000 [-]opost [-]olcuc [-]onlcr [-]ocrnl [-]onocr
1001 [-]onlret [-]ofill [-]ofdel [-]tabs nl0
1002 nl1 cr0 cr1 cr2 cr3
1003 tab0 tab1 tab2 tab3 bs0
1004 bs1 vt0 vt1 ff0 ff1
1005 cs5 cs6 cs7 cs8 [-]cstopb
1006 [-]cread [-]parenb [-]parodd [-]hupcl [-]clocal
1007 [-]crtscts [-]evenp [-]parity [-]oddp [-]pass8
1008 [-]isig [-]icanon [-]xcase [-]echo [-]echoe
1009 [-]echok [-]echonl [-]noflsh [-]tostop [-]iexten
1010 [-]echoctl [-]ctlecho [-]echoprt [-]prterase [-]echoke
1011 [-]crtkill [-]flusho [-]pendin
1012 .fi
1013 .PP
1014 The
1015 .B fc
1016 ,
1017 .B fs
1018 ,
1019 .B xc
1020 , and
1021 .B xs
1022 printcap entries are obsolete,
1023 and if present with non-zero values will abort print job processing.
1024 .SH "INITIALIZATION"
1025 .LP
1026 Many printers require an initialization string to be sent to them
1027 in order to configure their operation.
1028 The leader (ld) and trailer (tr) strings are sent at the start and
1029 end of job processing.
1030 These strings are interpreted using the C language conventions for
1031 character representation:
1032 \ennn is replaced with a character with the value nnn,
1033 \en with a new line,
1034 \er with a carriage return,
1035 and so forth.
1036 .SH "ALL PRINTERS"
1037 .LP
1038 The LPRng software has the capability to use a remote database
1039 for obtaining printcap and other information.
1040 One of the difficulties arises when a list of all printers
1041 available is needed.
1042 By convention,
1043 the special printer name
1044 .B all
1045 is reserved for this information;
1046 the
1047 .B all
1048 field is a list of printers separated by spaces or punctuation.
1049 For example:
1050 .sp
1051 .nf
1052 #all printers
1053 all:all=lp1,lp2,lp3,lp4
1054 .fi
1055 .SH ACCOUNTING
1056 .PP
1057 Accounting in the LPRng package has evolved over time
1058 to accommodate new requirements.
1059 The general approach is to use either a simple
1060 .B "log to file"
1061 method in which the accounting information is written
1062 to a log file or a more complex
1063 .B "log to program"
1064 method in which the accounting information is written
1065 to a program.
1066 The information and method and actions taken
1067 are specified by the following entries:
1068 .nf
1069 :as - start of job accounting
1070 :ae - end of job accounting
1071 :af - default job accounting
1072 :achk - used accounting for authorization.
1073 .fi
1074 .PP
1075 The value of the :as and :ae options are either
1076 a string which is used as the accounting information
1077 or a program which is executed to log or save the accounting
1078 information.
1079 If a program is executed then the value of the
1080 :af entry is ignored and the program is run to record
1081 the job accounting information.
1082 For example:
1083 .nf
1084 # string for information logging
1085 :as=jobend $H $n $P $k $b $t
1086 :ae=jobstart $H $n $P $k $b $t
1087
1088 :as=|/usr/local/libexec/logjobstart $H $n $P $k $b $t
1089 :ae=|/usr/local/libexec/logjobend $H $n $P $k $b $t
1090 .fi
1091 .PP
1092 If the
1093 :as or :ae value is a string then the :af information
1094 is used to record the accounting information:
1095 .nf
1096 af=|/path - run program, :as or :ae written to
1097 program STDIN
1098 af=host%port - tcp/ip connection to port on host,
1099 :as or :ae written to connection
1100 af=path - treat path as a file pathname,
1101 if file exists append :as or :ae
1102 to file.
1103 .PP
1104 If the :achk flag is set then this is modified as follows.
1105 If the :as entry specifies a program or :af entry specifies a
1106 program or remote host (i.e. - logging using program) then
1107 after accounting information has been written to the
1108 program or connection a response will be read from the program
1109 STDOUT or the connection.
1110 This response is expected to be an ASCII string.
1111 If the line is blank or starts with ACCEPT then the job will be printed,
1112 HOLD will hold the job, REMOVE will remove the job,
1113 and ABORT or a non-recognizable response will cause printing to be aborted.
1114 .PP
1115 If the output is written to a program then the exit status
1116 of the program can be used as well.
1117 If the program exits with nonzero status then the
1118 exit code controls the disposition:
1119 JHOLD, JREMOVE, and JABORT will hold, remove,
1120 or abort the job respectively.
1121 If the exit status is 0, then
1122 the filter's STDOUT will be read and processed as described above.
1123 .SH "BOUNCE QUEUES AND PRINT FORMATS"
1124 .PP
1125 If the lp option value has the format
1126 .B ":lp=pr@host"
1127 or job forwarding is specified by
1128 .B ":rp=pr:rm=host"
1129 then the normal operation is simple to store and forward
1130 the print jobs.
1131 If filters are specified then the job files are first
1132 filtered and then the output of the filters is sent to the destination.
1133 For historical reasons, a spool queue that does filtering and
1134 forwarding is called a
1135 .IR "bounce queue" .
1136 The
1137 .B bounce_queue_format
1138 (default 'f')
1139 specifies the output for the filtered files.
1140 If this is not desirable the
1141 .B translate_format
1142 option can be used to specify a format.
1143 The option has the form SdSdSdN,
1144 where S is the original format and d is the final format.
1145 If none of the formats match and there is an odd number of formats
1146 then the last one is used.
1147 For example,
1148 .B pfmlf
1149 would convert formats
1150 p to f, m to l, and v to f.
1151 .PP
1152 The
1153 \&:lpd_bounce
1154 flag concatenate the output of the filters
1155 and the result will be sent as a single job file to the destination.
1156 This facility is useful when handling legacy print spooler
1157 applications that do not understand the RFC1179 copy,
1158 etc., options.
1159 The first letter of the
1160 .B bounce_queue_format
1161 (default 'f')
1162 is used as the output file format.
1163 .PP
1164 The
1165 .B lpr_bounce
1166 printcap flag can be used to cause LPR to do bounce queue filtering
1167 in exactly the same manner as the server.
1168 This should be used with caution
1169 as missing filters on the client system can cause unexpected behavior.
1170 .SH "KERBEROS, AND OTHER AUTHENTICATION METHODS"
1171 .PP
1172 LPRng supports built in kerberos authentication.
1173 To enable this, the
1174 LPD protocol has been extended to provide a way to transfer authenticated
1175 and/or encrypted jobs and commands.
1176 The details are covered in the LPRng HOWTO documentation.
1177 .PP
1178 Also, SSL can be used.
1179 See
1180 .BR lprng_certs (1)
1181 for details.
1182 .SH FILES
1183 .PP
1184 The files used by LPRng are set by values in the
1185 printer configuration file.
1186 The following are a commonly used set of default values.
1187 .nf
1188 .ta \w'/var/spool/lpd/printcap.<hostname> 'u
1189 /etc/lprng/lpd.conf LPRng configuration file
1190 ${HOME}/.printcap user printer description file
1191 /etc/printcap printer description file
1192 /etc/lprng/lpd.perms permissions
1193 /var/run/lprng/lpd lock file for queue control
1194 /var/spool/lpd spool directories
1195 /var/spool/lpd/QUEUE/control queue control
1196 /var/spool/lpd/QUEUE/log trace or debug log file
1197 /var/spool/lpd/QUEUE/acct accounting file
1198 /var/spool/lpd/QUEUE/status status file
1199 .fi
1200 .SH "SEE ALSO"
1201 lpd.conf(5),
1202 lpc(8),
1203 lpd(8),
1204 checkpc(8),
1205 lpr(1),
1206 lpq(1),
1207 lprm(1),
1208 lpd.perms(5),
1209 pr(1), lprng_certs(1), lprng_index_certs(1).
1210 .SH "AUTHOR"
1211 Patrick Powell <[email protected]>.
1212 .SH DIAGNOSTICS
1213 Most of the diagnostics are self explanatory.
1214 If you are puzzled over the exact cause of failure,
1215 set the debugging level on (-D5) and run again.
1216 The debugging information will
1217 help you to pinpoint the exact cause of failure.
1218 .SH "HISTORY"
1219 LPRng is a enhanced printer spooler system
1220 with functionality similar to the Berkeley LPR software.
1221 The LPRng developer mailing list is [email protected];
1222 subscribe by visiting
1223 .B https://lists.sourceforge.net/lists/listinfo/lprng-devel
1224 or sending mail to
1225 .B [email protected]
1226 with
1227 the word
1228 .I subscribe
1229 in the body.
1230 .br
1231 The software is available via
1232 .B http://lprng.sourceforge.net