Commit | Line | Data |
---|---|---|
ad787160 C |
1 | .\" Copyright (c) 1983, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
c6216a8d | 3 | .\" |
ad787160 C |
4 | .\" Redistribution and use in source and binary forms, with or without |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
929f44b0 | 19 | .\" |
ad787160 C |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
c6216a8d | 31 | .\" |
ed554bc5 | 32 | .\" @(#)lpd.8 8.3 (Berkeley) 4/19/94 |
ad787160 | 33 | .\" |
ed554bc5 | 34 | .Dd April 19, 1994 |
b42074ab CL |
35 | .Dt LPD 8 |
36 | .Os BSD 4.2 | |
37 | .Sh NAME | |
38 | .Nm lpd | |
39 | .Nd line printer spooler daemon | |
40 | .Sh SYNOPSIS | |
41 | .Nm lpd | |
42 | .Op Fl l | |
43 | .Op Ar port# | |
44 | .Sh DESCRIPTION | |
45 | .Nm Lpd | |
c6216a8d KM |
46 | is the line printer daemon (spool area handler) and is normally invoked |
47 | at boot time from the | |
b42074ab | 48 | .Xr rc 8 |
c6216a8d | 49 | file. It makes a single pass through the |
b42074ab | 50 | .Xr printcap 5 |
c6216a8d KM |
51 | file to find out about the existing printers and |
52 | prints any files left after a crash. It then uses the system calls | |
b42074ab | 53 | .Xr listen 2 |
c6216a8d | 54 | and |
b42074ab | 55 | .Xr accept 2 |
c6216a8d KM |
56 | to receive requests to print files in the queue, |
57 | transfer files to the spooling area, display the queue, | |
58 | or remove jobs from the queue. In each case, it forks a child to handle | |
59 | the request so the parent can continue to listen for more requests. | |
b42074ab CL |
60 | .Pp |
61 | Available options: | |
62 | .Bl -tag -width Ds | |
63 | .It Fl l | |
c6216a8d | 64 | The |
b42074ab | 65 | .Fl l |
c6216a8d | 66 | flag causes |
b42074ab | 67 | .Nm lpd |
c6216a8d KM |
68 | to log valid requests received from the network. This can be useful |
69 | for debugging purposes. | |
b42074ab CL |
70 | .It Ar "port#" |
71 | The Internet port number used to rendezvous | |
72 | with other processes is normally obtained with | |
73 | .Xr getservbyname 3 | |
74 | but can be changed with the | |
75 | .Ar port# | |
76 | argument. | |
77 | .El | |
78 | .Pp | |
79 | Access control is provided by two means. First, all requests must come from | |
c6216a8d | 80 | one of the machines listed in the file |
b42074ab | 81 | .Pa /etc/hosts.equiv |
278a48a0 | 82 | or |
b42074ab CL |
83 | .Pa /etc/hosts.lpd . |
84 | Second, if the | |
85 | .Li rs | |
86 | capability is specified in the | |
87 | .Xr printcap | |
c6216a8d | 88 | entry for the printer being accessed, |
b42074ab | 89 | .Em lpr |
c6216a8d KM |
90 | requests will only be honored for those users with accounts on the |
91 | machine with the printer. | |
b42074ab | 92 | .Pp |
c6216a8d | 93 | The file |
b42074ab | 94 | .Em minfree |
278a48a0 KM |
95 | in each spool directory contains the number of disk blocks to leave free |
96 | so that the line printer queue won't completely fill the disk. | |
97 | The | |
b42074ab | 98 | .Em minfree |
278a48a0 | 99 | file can be edited with your favorite text editor. |
b42074ab CL |
100 | .Pp |
101 | The daemon begins processing files | |
102 | after it has successfully set the lock for exclusive | |
ed554bc5 | 103 | access (described a bit later), |
b42074ab | 104 | and scans the spool directory |
c6216a8d | 105 | for files beginning with |
b42074ab | 106 | .Em cf . |
c6216a8d | 107 | Lines in each |
b42074ab | 108 | .Em cf |
c6216a8d KM |
109 | file specify files to be printed or non-printing actions to be |
110 | performed. Each such line begins with a key character | |
111 | to specify what to do with the remainder of the line. | |
b42074ab CL |
112 | .Bl -tag -width Ds |
113 | .It J | |
c6216a8d | 114 | Job Name. String to be used for the job name on the burst page. |
b42074ab | 115 | .It C |
c6216a8d KM |
116 | Classification. String to be used for the classification line |
117 | on the burst page. | |
b42074ab | 118 | .It L |
c6216a8d KM |
119 | Literal. The line contains identification info from |
120 | the password file and causes the banner page to be printed. | |
b42074ab | 121 | .It T |
c6216a8d | 122 | Title. String to be used as the title for |
b42074ab CL |
123 | .Xr pr 1 . |
124 | .It H | |
c6216a8d | 125 | Host Name. Name of the machine where |
b42074ab | 126 | .Xr lpr |
c6216a8d | 127 | was invoked. |
b42074ab | 128 | .It P |
c6216a8d | 129 | Person. Login name of the person who invoked |
b42074ab | 130 | .Xr lpr . |
c6216a8d | 131 | This is used to verify ownership by |
b42074ab CL |
132 | .Xr lprm . |
133 | .It M | |
c6216a8d | 134 | Send mail to the specified user when the current print job completes. |
b42074ab | 135 | .It f |
c6216a8d | 136 | Formatted File. Name of a file to print which is already formatted. |
b42074ab | 137 | .It l |
c6216a8d | 138 | Like ``f'' but passes control characters and does not make page breaks. |
b42074ab | 139 | .It p |
c6216a8d | 140 | Name of a file to print using |
b42074ab | 141 | .Xr pr 1 |
c6216a8d | 142 | as a filter. |
b42074ab | 143 | .It t |
c6216a8d | 144 | Troff File. The file contains |
b42074ab | 145 | .Xr troff 1 |
c6216a8d | 146 | output (cat phototypesetter commands). |
b42074ab | 147 | .It n |
278a48a0 KM |
148 | Ditroff File. The file contains device independent troff |
149 | output. | |
b42074ab | 150 | .It r |
c6216a8d | 151 | DVI File. The file contains |
b42074ab CL |
152 | .Tn Tex l |
153 | output | |
653ba8b6 | 154 | DVI format from Standford. |
b42074ab | 155 | .It g |
c6216a8d | 156 | Graph File. The file contains data produced by |
b42074ab CL |
157 | .Xr plot 3 . |
158 | .It c | |
c6216a8d | 159 | Cifplot File. The file contains data produced by |
b42074ab CL |
160 | .Em cifplot . |
161 | .It v | |
c6216a8d | 162 | The file contains a raster image. |
b42074ab CL |
163 | .It r |
164 | The file contains text data with | |
165 | FORTRAN carriage control characters. | |
166 | .It \&1 | |
c6216a8d | 167 | Troff Font R. Name of the font file to use instead of the default. |
b42074ab | 168 | .It \&2 |
c6216a8d | 169 | Troff Font I. Name of the font file to use instead of the default. |
b42074ab | 170 | .It \&3 |
c6216a8d | 171 | Troff Font B. Name of the font file to use instead of the default. |
b42074ab | 172 | .It \&4 |
c6216a8d | 173 | Troff Font S. Name of the font file to use instead of the default. |
b42074ab | 174 | .It W |
c6216a8d | 175 | Width. Changes the page width (in characters) used by |
b42074ab | 176 | .Xr pr 1 |
c6216a8d | 177 | and the text filters. |
b42074ab | 178 | .It I |
c6216a8d | 179 | Indent. The number of characters to indent the output by (in ascii). |
b42074ab | 180 | .It U |
c6216a8d | 181 | Unlink. Name of file to remove upon completion of printing. |
b42074ab | 182 | .It N |
c6216a8d KM |
183 | File name. The name of the file which is being printed, or a blank |
184 | for the standard input (when | |
b42074ab | 185 | .Xr lpr |
c6216a8d | 186 | is invoked in a pipeline). |
b42074ab CL |
187 | .El |
188 | .Pp | |
653ba8b6 | 189 | If a file cannot be opened, a message will be logged via |
b42074ab | 190 | .Xr syslog 3 |
2c7812a9 | 191 | using the |
b42074ab | 192 | .Em LOG_LPR |
2c7812a9 | 193 | facility. |
b42074ab | 194 | .Nm Lpd |
c6216a8d KM |
195 | will try up to 20 times |
196 | to reopen a file it expects to be there, after which it will | |
197 | skip the file to be printed. | |
b42074ab CL |
198 | .Pp |
199 | .Nm Lpd | |
c6216a8d | 200 | uses |
b42074ab | 201 | .Xr flock 2 |
c6216a8d | 202 | to provide exclusive access to the lock file and to prevent multiple |
653ba8b6 | 203 | daemons from becoming active simultaneously. If the daemon should be killed |
c6216a8d | 204 | or die unexpectedly, the lock file need not be removed. |
b42074ab CL |
205 | The lock file is kept in a readable |
206 | .Tn ASCII | |
207 | form | |
c6216a8d KM |
208 | and contains two lines. |
209 | The first is the process id of the daemon and the second is the control | |
210 | file name of the current job being printed. The second line is updated to | |
211 | reflect the current status of | |
b42074ab | 212 | .Nm lpd |
c6216a8d | 213 | for the programs |
b42074ab | 214 | .Xr lpq 1 |
c6216a8d | 215 | and |
b42074ab CL |
216 | .Xr lprm 1 . |
217 | .Sh FILES | |
218 | .Bl -tag -width "/var/spool/*/minfree" -compact | |
219 | .It Pa /etc/printcap | |
220 | printer description file | |
221 | .It Pa /var/spool/* | |
222 | spool directories | |
223 | .It Pa /var/spool/*/minfree | |
224 | minimum free space to leave | |
225 | .It Pa /dev/lp* | |
226 | line printer devices | |
227 | .It Pa /dev/printer | |
228 | socket for local requests | |
229 | .It Pa /etc/hosts.equiv | |
230 | lists machine names allowed printer access | |
231 | .It Pa /etc/hosts.lpd | |
232 | lists machine names allowed printer access, | |
233 | but not under same administrative control. | |
234 | .El | |
235 | .Sh SEE ALSO | |
236 | .Xr lpc 8 , | |
237 | .Xr pac 1 , | |
238 | .Xr lpr 1 , | |
239 | .Xr lpq 1 , | |
240 | .Xr lprm 1 , | |
241 | .Xr syslog 3 , | |
242 | .Xr printcap 5 | |
243 | .Rs | |
244 | .%T "4.2 BSD Line Printer Spooler Manual" | |
245 | .Re | |
246 | .Sh HISTORY | |
247 | An | |
248 | .Nm | |
249 | daemon appeared in Version 6 AT&T UNIX. |