Commit | Line | Data |
---|---|---|
929f44b0 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
c6216a8d | 3 | .\" |
929f44b0 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)lpd.8 6.4 (Berkeley) %G% | |
c6216a8d | 17 | .\" |
278a48a0 | 18 | .TH LPD 8 "" |
c6216a8d KM |
19 | .UC 5 |
20 | .ad | |
21 | .SH NAME | |
22 | lpd \- line printer daemon | |
23 | .SH SYNOPSIS | |
24 | .B /usr/lib/lpd | |
2c7812a9 EA |
25 | [ |
26 | .B \-l | |
27 | ] [ port # ] | |
c6216a8d KM |
28 | .SH DESCRIPTION |
29 | .I Lpd | |
30 | is the line printer daemon (spool area handler) and is normally invoked | |
31 | at boot time from the | |
32 | .IR rc (8) | |
33 | file. It makes a single pass through the | |
34 | .IR printcap (5) | |
35 | file to find out about the existing printers and | |
36 | prints any files left after a crash. It then uses the system calls | |
37 | .IR listen (2) | |
38 | and | |
39 | .IR accept (2) | |
40 | to receive requests to print files in the queue, | |
41 | transfer files to the spooling area, display the queue, | |
42 | or remove jobs from the queue. In each case, it forks a child to handle | |
43 | the request so the parent can continue to listen for more requests. | |
44 | The Internet port number used to rendezvous | |
45 | with other processes is normally obtained with | |
46 | .IR getservbyname (3) | |
47 | but can be changed with the | |
48 | .IR port # | |
2c7812a9 | 49 | argument. |
c6216a8d KM |
50 | The |
51 | .B \-l | |
52 | flag causes | |
53 | .I lpd | |
54 | to log valid requests received from the network. This can be useful | |
55 | for debugging purposes. | |
56 | .PP | |
57 | Access control is provided by two means. First, All requests must come from | |
58 | one of the machines listed in the file | |
278a48a0 KM |
59 | .I /etc/hosts.equiv |
60 | or | |
61 | .IR /etc/hosts.lpd . | |
c6216a8d KM |
62 | Second, if the ``rs'' capability is specified in the |
63 | .I printcap | |
64 | entry for the printer being accessed, | |
65 | .I lpr | |
66 | requests will only be honored for those users with accounts on the | |
67 | machine with the printer. | |
68 | .PP | |
69 | The file | |
278a48a0 KM |
70 | .I minfree |
71 | in each spool directory contains the number of disk blocks to leave free | |
72 | so that the line printer queue won't completely fill the disk. | |
73 | The | |
74 | .I minfree | |
75 | file can be edited with your favorite text editor. | |
76 | .PP | |
77 | The file | |
c6216a8d KM |
78 | .I lock |
79 | in each spool directory is used to prevent multiple daemons from | |
80 | becoming active simultaneously, and to store information | |
81 | about the daemon process for | |
82 | .IR lpr (1), | |
83 | .IR lpq (1), | |
84 | and | |
85 | .IR lprm (1). | |
86 | After the daemon has successfully set the lock, it scans the directory | |
87 | for files beginning with | |
88 | .IR cf . | |
89 | Lines in each | |
90 | .I cf | |
91 | file specify files to be printed or non-printing actions to be | |
92 | performed. Each such line begins with a key character | |
93 | to specify what to do with the remainder of the line. | |
94 | .in +3 | |
95 | .IP J | |
96 | Job Name. String to be used for the job name on the burst page. | |
97 | .IP C | |
98 | Classification. String to be used for the classification line | |
99 | on the burst page. | |
100 | .IP L | |
101 | Literal. The line contains identification info from | |
102 | the password file and causes the banner page to be printed. | |
103 | .IP T | |
104 | Title. String to be used as the title for | |
105 | .IR pr (1). | |
106 | .IP H | |
107 | Host Name. Name of the machine where | |
108 | .I lpr | |
109 | was invoked. | |
110 | .IP P | |
111 | Person. Login name of the person who invoked | |
112 | .IR lpr . | |
113 | This is used to verify ownership by | |
114 | .IR lprm . | |
115 | .IP M | |
116 | Send mail to the specified user when the current print job completes. | |
117 | .IP f | |
118 | Formatted File. Name of a file to print which is already formatted. | |
119 | .IP l | |
120 | Like ``f'' but passes control characters and does not make page breaks. | |
121 | .IP p | |
122 | Name of a file to print using | |
123 | .IR pr (1) | |
124 | as a filter. | |
125 | .IP t | |
126 | Troff File. The file contains | |
127 | .IR troff (1) | |
128 | output (cat phototypesetter commands). | |
278a48a0 KM |
129 | .IP n |
130 | Ditroff File. The file contains device independent troff | |
131 | output. | |
c6216a8d KM |
132 | .IP d |
133 | DVI File. The file contains | |
134 | .IR Tex (l) | |
135 | output (DVI format from Standford). | |
136 | .IP g | |
137 | Graph File. The file contains data produced by | |
138 | .IR plot (3X). | |
139 | .IP c | |
140 | Cifplot File. The file contains data produced by | |
141 | .IR cifplot . | |
142 | .IP v | |
143 | The file contains a raster image. | |
144 | .IP r | |
145 | The file contains text data with FORTRAN carriage control characters. | |
146 | .IP 1 | |
147 | Troff Font R. Name of the font file to use instead of the default. | |
148 | .IP 2 | |
149 | Troff Font I. Name of the font file to use instead of the default. | |
150 | .IP 3 | |
151 | Troff Font B. Name of the font file to use instead of the default. | |
152 | .IP 4 | |
153 | Troff Font S. Name of the font file to use instead of the default. | |
154 | .IP W | |
155 | Width. Changes the page width (in characters) used by | |
156 | .IR pr (1) | |
157 | and the text filters. | |
158 | .IP I | |
159 | Indent. The number of characters to indent the output by (in ascii). | |
160 | .IP U | |
161 | Unlink. Name of file to remove upon completion of printing. | |
162 | .IP N | |
163 | File name. The name of the file which is being printed, or a blank | |
164 | for the standard input (when | |
165 | .I lpr | |
166 | is invoked in a pipeline). | |
167 | .in -5 | |
168 | .PP | |
2c7812a9 EA |
169 | If a file can not be opened, a message will be logged via |
170 | .IR syslog (3) | |
171 | using the | |
172 | .I LOG_LPR | |
173 | facility. | |
c6216a8d KM |
174 | .I Lpd |
175 | will try up to 20 times | |
176 | to reopen a file it expects to be there, after which it will | |
177 | skip the file to be printed. | |
178 | .PP | |
179 | .I Lpd | |
180 | uses | |
181 | .IR flock (2) | |
182 | to provide exclusive access to the lock file and to prevent multiple | |
183 | deamons from becoming active simultaneously. If the daemon should be killed | |
184 | or die unexpectedly, the lock file need not be removed. | |
185 | The lock file is kept in a readable ASCII form | |
186 | and contains two lines. | |
187 | The first is the process id of the daemon and the second is the control | |
188 | file name of the current job being printed. The second line is updated to | |
189 | reflect the current status of | |
190 | .I lpd | |
191 | for the programs | |
192 | .IR lpq (1) | |
193 | and | |
194 | .IR lprm (1). | |
195 | .SH FILES | |
196 | .nf | |
197 | .ta \w'/etc/printcap 'u | |
198 | /etc/printcap printer description file | |
199 | /usr/spool/* spool directories | |
278a48a0 | 200 | /usr/spool/*/minfree minimum free space to leave |
c6216a8d KM |
201 | /dev/lp* line printer devices |
202 | /dev/printer socket for local requests | |
203 | /etc/hosts.equiv lists machine names allowed printer access | |
31c59742 KM |
204 | /etc/hosts.lpd lists machine names allowed printer access, |
205 | but not under same administrative control. | |
c6216a8d KM |
206 | .fi |
207 | .SH "SEE ALSO" | |
208 | lpc(8), | |
209 | pac(1), | |
210 | lpr(1), | |
211 | lpq(1), | |
212 | lprm(1), | |
2c7812a9 | 213 | syslog(3), |
c6216a8d KM |
214 | printcap(5) |
215 | .br | |
216 | .ul | |
217 | 4.2BSD Line Printer Spooler Manual |