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