OSDN Git Service

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