Debian Codegraph @

upstream/debian-unstable/man1/lpr.1

raw
1 .TH LPR 1 2006-12-09 "LPRng" "lpr command"
2 .SH NAME
3 lpr \- off line print
4 .SH SYNOPSIS
5 .B lpr
6 [
7 .B \-A
8 ]
9 [
10 .B \-B
11 ]
12 [
13 .B \-b,l
14 ]
15 [
16 .BI \-C " class"
17 ]
18 [
19 .BI \-D " debugopt"
20 ]
21 .ti +5n
22 [
23 .BI \-F " filterformat"
24 ]
25 [
26 .B \-G
27 ]
28 [
29 .B \-h
30 ]
31 [
32 .BI \-i " indentcols"
33 ]
34 .ti +5n
35 [
36 .B \-k
37 ]
38 [
39 .BI \-J " job"
40 ]
41 [
42 .BI \-K,# " copies"
43 ]
44 .ti +5n
45 [
46 .BI \-m " mailTo"
47 ]
48 [
49 .BI \-P " printer"
50 ]
51 [
52 .B \-r
53 ]
54 .ti +5n
55 [
56 .BI \-R " remoteAccount"
57 ]
58 [
59 .B \-s
60 ]
61 [
62 .BI \-T " title"
63 ]
64 [
65 .BI \-U " user"
66 ]
67 .ti +5n
68 [
69 .B \-V
70 ]
71 [
72 .BI \-w " width"
73 ]
74 [
75 .BI \-X " userfile"
76 ]
77 [
78 .B \-Y
79 ]
80 [
81 .BI \-Z " options"
82 ]
83 [
84 .BI \-1,2,3,4 " font"
85 ]
86 [
87 .B \-\-
88 ]
89 .ti +5n
90 [
91 .IR filename " \|.\|.\|."
92 ]
93 .SH DESCRIPTION
94 .B Lpr
95 uses a spooling daemon to print the named files when facilities
96 become available. If no names appear, the standard input is assumed.
97 .SH OPTIONS
98 .TP 5
99 .B \-A
100 The authentication type is set by the value of the AUTH environment variable.
101 .TP 5
102 .B \-B
103 Do filtering of job files by the filters specified by the printcap.
104 Combine the output of the filtering operation into a single job file and then
105 send the single file to the lpd print spooler.
106 .TP 5
107 .B "\-b, \-l"
108 either of these flags specifies a
109 binary or literal file,
110 and no (or minimal) processing is to be done by the print spooling system.
111 Printed using the
112 .I f
113 format filter (:if=... or :filter=...).
114 .TP 5
115 .BI \-C " class"
116 Specify the job classification for use on the burst page and to
117 set the priority.
118 Priorities range from A (lowest) to Z (highest);
119 the default priority is A.
120 For example,
121 .br
122 .ti +0.5i
123 lpr \-C B foo.c
124 .br
125 sets the priority/class to B and the file foo.c is printed.
126 .TP 5
127 \fB\-D\fP\ \fIdebugoptions\fP
128 Debugging is controlled using the
129 .B \-D
130 option. This accepts a comma-separated list of debugging
131 settings. These settings take one of two forms:
132 .BI facility =value,
133 or
134 .B value
135 to set an overall default value.
136 .TP 5
137 \fB\-F\fI filterformat\fR
138 Filter or format specification.
139 By default,
140 input is assumed to a standard text file and the
141 .I f
142 format is used;
143 the output device is assumed to be a simple line printer.
144 Other formats available are listed below.
145 Not all formats may be available on all printers;
146 see
147 .BR printcap (5)
148 for details.
149 Formats are single lower case letters;
150 the following are the valid arguments for
151 .B \-F
152 together with the assumed type of data.
153 For compatibility with previous versions of
154 .BR lpr ,
155 the format types can be used as options themselves
156 (i.e. by omitting the
157 .BR F )
158 except where noted below,
159 a warning may be issued in such cases.
160 .\".RS 5
161 .TP 5
162 \fB\-G\fP
163 Similar to the
164 \fB\-B\fP option,
165 but only processes individual files.
166 .TP 5
167 \fB\-h\fP
168 No banner or header for this job.
169 .TP 5
170 .BI \-i " indentcols"
171 Indent input by indentcols.
172 Note that this option is not supported on all printers.
173 .TP 5
174 .BI -J " jobname"
175 Specify the job name to print on the burst page;
176 defaults to the name of files in the job or
177 .I "(STDIN)"
178 if input is from a pipe.
179 .TP 5
180 \fB\-K\fP\fIcopies\fP,\0\fB\-#\fP\fIcopies\fP
181 Specify the number of copies of each file to be printed.
182 You may or may not get the requested number of copies depending on the
183 intelligence of the remote printing system.
184 .TP 5
185 .B \-k
186 .B lpr
187 normally creates a temporary file
188 for the input read from stdin before sending it to the remote
189 printer.
190 The
191 .B \-k
192 (kut-through) option
193 will simply copy from STDIN to the destination print spooling system.
194 If you kill the job in the middle of creation
195 then the partly transferred file will get printed.
196 This option may not work with very large jobs,
197 non-LPRng spoolers,
198 or
199 when you have encryption or authentication enabled.
200 .TP 5
201 .BI \-m " mailTo"
202 Send mail upon unsuccessful completion to user
203 .IR mailTo .
204 The mailTo value has been used to do such things as
205 specify email (user@host), paging (page:user@host),
206 both (user@host,page:user@host)
207 and all sorts of other notifier information.
208 See the LPRng HOWTO for details on how this is implemented.
209 .TP 5
210 .BI \-P " printer"
211 By default,
212 the destination printer
213 is taken from
214 the command line
215 .I "-P printer"
216 value,
217 then
218 the environment variables
219 PRINTER,
220 LPDEST,
221 NPRINTER,
222 NGPRINTER,
223 then first entry in the printcap information,
224 and and finally the default_printer entry from the
225 configuration file,
226 and then the compile time default.
227 .TP 5
228 .BI \-R " remoteAccount"
229 Specify accounting information to be used by a remote system that prints
230 your output.
231 .sp
232 This parameter
233 can be used to specify a billing code to be charged for the
234 printing.
235 .TP 5
236 .B \-r
237 The DREADED
238 .B "REMOVE AFTER PRINTING"
239 option.
240 Beware, for
241 .I lpr
242 will delete the files after spooling them.
243 Present by demand from users for compatibility with other Berkeley lpr
244 implementation,
245 but really should NOT be present.
246 .TP 5
247 .BI \-T " title"
248 Specify the title used by
249 .BR pr (1);
250 defaults to the file name.
251 .TP 5
252 \fB\-U\fP\ \fIusername\fP
253 The
254 .B \-U
255 option is used to specify a user name
256 for the job.
257 This is available only to ROOT or users listed in the
258 .I allow_user_setting
259 configuration option.
260 This is obviously a security loophole,
261 but it is present to allow systems such as SAMBA
262 to submit jobs on behalf of users.
263 See
264 .B "Authenticated Transfers"
265 below.
266 .TP 5
267 .B \-V
268 Verbose mode. Additional -V flags increase verbosity.
269 Use debug flags for extreme verbosity.
270 .TP 5
271 .BI \-w " width"
272 Specify the page width for printing the job.
273 .TP 5
274 .BI \-X " path"
275 User specified filter for job files. Processing is done on
276 the client host.
277 .TP 5
278 .B \-Y
279 Make a direct connection to the printer device and do not spool.
280 .TP 5
281 .BI -Z " options"
282 Pass the specified options to the print spooler.
283 Used when additional or specialized information
284 must be provided to the spooler.
285 .TP 5
286 .B "OBSOLETE OPTIONS Lower case \-c, \-d, \-g, \-n, \-t, \-v"
287 Used to indicate:
288 .B \-c
289 is data produced by
290 .BR cifplot (l),
291 .B \-d
292 is
293 .BR tex (l)
294 (DVI format from Stanford),
295 .B \-g
296 is
297 standard plot data as produced by the
298 .BR plot (3X)
299 routines,
300 .B \-n
301 and
302 .B \-t
303 is output from (device independent)
304 .BR troff ,
305 .B \-v
306 a raster image for devices like the Benson Varian.
307 .B "These are obsolete."
308 These are retained for historical compatibility,
309 but most of their functionality has been replaced by the
310 abilities of the printer support system to determine the
311 file type and do the appropriate conversions.
312 .\".RE
313 .TP 5
314 .B "OBSOLETE OPTION \-p"
315 .B "This is obsolete."
316 This option is retained for historical compatibility,
317 but this functionality should be implemented on the
318 client system before sending the job to the printer.
319 Use
320 .BR pr (1)
321 to format the files,
322 then print using
323 .I f
324 format.
325 This may not be supported on the print system.
326 .TP 5
327 .B "OBSOLETE \-s"
328 This flag is included for compatibility with other versions of
329 .BR lpr .
330 In these versions it will create a symbolic link to the files to be
331 printed.
332 .B Lpr
333 now sends files directly to the server and it is irrelevant.
334 .TP 5
335 .BI "OBSOLETE OPTIONS \-1,2,3,4" "fontname"
336 Specify a font to be mounted on font position \fIi\fR
337 for TROFF printing (Obsolete).
338 .SH FILENAMES
339 .PP
340 By default,
341 if no filenames are specified
342 .B lpr
343 will read stdin and print it.
344 .SH "AUTHENTICATED TRANSFERS"
345 .PP
346 The original LPR network protocol defined in RFC1179 did not
347 provide for user to server authentication.
348 This is now supported by LPRng.
349 See the LPRng support documentation for details on its operation
350 and support.
351 .SH COMPATIBILITY
352 .PP
353 The LPRng version of
354 .B lpr
355 attempts to be functionally compatible with common implementations of
356 .BR lpr .
357 However,
358 there are some commands and functionality that are deliberately missing.
359 .IP "\fB\-s\fP\ Symbolic Links" 5
360 (Berkeley LPR) This option specified that a symbolic link
361 to the original data file
362 rather than a copy of the data file was to be used when spooling jobs.
363 This opens up a variety of security problems,
364 as well as being ineffective when printing to a remote host.
365 .SH "THE -B, -Y, -X filter ULTRA-LIGHTWEIGHT PRINTING OPTIONS"
366 .PP
367 LPRng supports ultra-lightweight printing by eliminating the need
368 for a print spooler.
369 This is quite dangerous, but makes the lpr client very lightweight.
370 The
371 .B \-Y
372 command line option and the
373 .B :direct
374 printcap option enables lpr to connect directly to a specified port
375 or use a program to send a job.
376 This filter also enables client side filtering, so if there are
377 any filters specified in the printcap entry they will be used.
378 For example:
379 .nf
380 lpr -Y -Phost%port file1 file2 ...
381 approximately equivalent to:
382 for i in file1 file2 ...; do
383 ${filter} <$i;
384 # ${filter} is filter from printcap
385 done >host%port (TCP/IP connection)
386
387 lpr -Y -Phost%port -X userfilter file1 file2 ...
388 approximately equivalent to:
389 for i in file1 file2 ...; do
390 userfilter <$i;
391 done >host%port (TCP/IP connection)
392
393 Summary:
394 -P host%port > TCP/IP connection to host%port
395 -P /dev/lp > /dev/lp
396 -P '|/program' | /program
397
398 SPECIAL CASE
399 lpr -Y -Ppr@host -X userfilter file1 file2 ...
400 approximately equivalent to:
401 for i in file1 file2 ...; do
402 userfilter <$i >temp.$i;
403 done
404 lpr -Ppr@host temp.file1 temp.file2
405 .fi
406 .PP
407 The
408 .B \-B
409 option or the :lpr_bounce is used to filter and make a single file out
410 of a set of print files and then forward them.
411 .RS
412 .nf
413 lpr -B -Ppr@host
414 approximately equivalent to:
415 lpr -Y -P/tmp/tempfile file1 file2 ...
416 lpr -Ppr@host /tmp/tempfile
417 .fi
418 .RE
419 .PP
420 You can also use a printcap entry and the
421 .B :direct
422 options.
423 .RS
424 .nf
425 Printcap:
426 lp:direct:lp=h14%9100:remote_support=R
427 lpr -Plp file1 file2
428 Same as:
429 lpr -Plp -Y -Ph14%9100 file1 file2
430 .fi
431 .RE
432 .PP
433 The
434 .B :remote_support
435 option is used to prevent the
436 .B lpq
437 and
438 .B lpc
439 program from attempting to send jobs to the device.
440
441 .SH ENVIRONMENT
442 .PP
443 By default,
444 the destination printer
445 is taken from
446 the command line
447 .I "-P printer"
448 value,
449 then
450 the environment variables
451 PRINTER,
452 LPDEST,
453 NPRINTER,
454 NGPRINTER,
455 then first entry in the printcap information,
456 and and finally the default_printer entry from the
457 configuration file,
458 and then the compile time default.
459 .SH "EXIT STATUS"
460 .PP
461 The following exit values are returned:
462 .TP 15
463 .B "zero (0)"
464 Successful completion.
465 .TP
466 .B "non-zero (!=0)"
467 An error occurred.
468 .SH "PRINTCAP INFORMATION"
469 .LP
470 The printer names and other information is obtained by using a printcap
471 file or some other database.
472 The ${HOME}/.printcap
473 file can be used to specify user level options and configuration
474 information.
475 See
476 printcap(5)
477 for more information.
478 .SH FILES
479 .PP
480 The files used by LPRng are set by values in the
481 printer configuration file.
482 The following are a commonly used set of default values.
483 .nf
484 .ta \w'/var/spool/lpd/printcap.<hostname> 'u
485 /etc/lprng/lpd.conf LPRng configuration file
486 ${HOME}/.printcap user printer description file
487 /etc/printcap printer description file
488 /etc/lprng/lpd.perms permissions
489 /var/run/lprng/lpd lock file for queue control
490 /var/spool/lpd spool directories
491 /var/spool/lpd/QUEUE/control queue control
492 /var/spool/lpd/QUEUE/log trace or debug log file
493 /var/spool/lpd/QUEUE/acct accounting file
494 /var/spool/lpd/QUEUE/status status file
495 .fi
496 .SH "SEE ALSO"
497 .BR lpd.conf (5),
498 .BR lpc (8),
499 .BR lpd (8),
500 .BR checkpc (8),
501 .BR lpq (1),
502 .BR lprm (1),
503 .BR checkpc (8),
504 .BR printcap (5),
505 .BR lpd.perms (5),
506 .BR pr (1).
507 .SH "AUTHOR"
508 Patrick Powell <[email protected]>.
509 .SH DIAGNOSTICS
510 Most of the diagnostics are self explanatory.
511 If you are puzzled over the exact cause of failure,
512 set the debugging level on (-D5) and run again.
513 The debugging information will
514 help you to pinpoint the exact cause of failure.
515 .SH "HISTORY"
516 LPRng is a enhanced printer spooler system
517 with functionality similar to the Berkeley LPR software.
518 The LPRng developer mailing list is [email protected];
519 subscribe by visiting
520 .B https://lists.sourceforge.net/lists/listinfo/lprng-devel
521 or sending mail to
522 .B [email protected]
523 with
524 the word
525 .I subscribe
526 in the body.
527 .br
528 The software is available via
529 .B http://lprng.sourceforge.net