BSD 4_2 development
[unix-history] / usr / man / man8 / lpd.8
CommitLineData
574a5a32
C
1.TH LPD 8 "18 July 1983"
2.UC 4
3.ad
4.SH NAME
5lpd \- line printer daemon
6.SH SYNOPSIS
7.B /usr/lib/lpd
8[ -l ] [ -L logfile ] [ port # ]
9.SH DESCRIPTION
10.I Lpd
11is the line printer daemon (spool area handler) and is normally invoked
12at boot time from the
13.IR rc (8)
14file. It makes a single pass through the
15.IR printcap (5)
16file to find out about the existing printers and
17prints any files left after a crash. It then uses the system calls
18.IR listen (2)
19and
20.IR accept (2)
21to receive requests to print files in the queue,
22transfer files to the spooling area, display the queue,
23or remove jobs from the queue. In each case, it forks a child to handle
24the request so the parent can continue to listen for more requests.
25The Internet port number used to rendezvous
26with other processes is normally obtained with
27.IR getservbyname (3)
28but can be changed with the
29.IR port #
30argument. The
31.B \-L
32option changes the file used for writing error conditions from the
33system console to
34.I logfile.
35The
36.B \-l
37flag causes
38.I lpd
39to log valid requests received from the network. This can be useful
40for debugging purposes.
41.PP
42Access control is provided by two means. First, All requests must come from
43one of the machines listed in the file
44.IR /etc/hosts.equiv .
45Second, if the ``rs'' capability is specified in the
46.I printcap
47entry for the printer being accessed,
48.I lpr
49requests will only be honored for those users with accounts on the
50machine with the printer.
51.PP
52The file
53.I lock
54in each spool directory is used to prevent multiple daemons from
55becoming active simultaneously, and to store information
56about the daemon process for
57.IR lpr (1),
58.IR lpq (1),
59and
60.IR lprm (1).
61After the daemon has successfully set the lock, it scans the directory
62for files beginning with
63.IR cf .
64Lines in each
65.I cf
66file specify files to be printed or non-printing actions to be
67performed. Each such line begins with a key character
68to specify what to do with the remainder of the line.
69.in +3
70.IP J
71Job Name. String to be used for the job name on the burst page.
72.IP C
73Classification. String to be used for the classification line
74on the burst page.
75.IP L
76Literal. The line contains identification info from
77the password file and causes the banner page to be printed.
78.IP T
79Title. String to be used as the title for
80.IR pr (1).
81.IP H
82Host Name. Name of the machine where
83.I lpr
84was invoked.
85.IP P
86Person. Login name of the person who invoked
87.IR lpr .
88This is used to verify ownership by
89.IR lprm .
90.IP M
91Send mail to the specified user when the current print job completes.
92.IP f
93Formatted File. Name of a file to print which is already formatted.
94.IP l
95Like ``f'' but passes control characters and does not make page breaks.
96.IP p
97Name of a file to print using
98.IR pr (1)
99as a filter.
100.IP t
101Troff File. The file contains
102.IR troff (1)
103output (cat phototypesetter commands).
104.IP d
105DVI File. The file contains
106.IR Tex (l)
107output (DVI format from Standford).
108.IP g
109Graph File. The file contains data produced by
110.IR plot (3X).
111.IP c
112Cifplot File. The file contains data produced by
113.IR cifplot .
114.IP v
115The file contains a raster image.
116.IP r
117The file contains text data with FORTRAN carriage control characters.
118.IP 1
119Troff Font R. Name of the font file to use instead of the default.
120.IP 2
121Troff Font I. Name of the font file to use instead of the default.
122.IP 3
123Troff Font B. Name of the font file to use instead of the default.
124.IP 4
125Troff Font S. Name of the font file to use instead of the default.
126.IP W
127Width. Changes the page width (in characters) used by
128.IR pr (1)
129and the text filters.
130.IP I
131Indent. The number of characters to indent the output by (in ascii).
132.IP U
133Unlink. Name of file to remove upon completion of printing.
134.IP N
135File name. The name of the file which is being printed, or a blank
136for the standard input (when
137.I lpr
138is invoked in a pipeline).
139.in -5
140.PP
141If a file can not be opened, a message will be placed
142in the log file (normally the console).
143.I Lpd
144will try up to 20 times
145to reopen a file it expects to be there, after which it will
146skip the file to be printed.
147.PP
148.I Lpd
149uses
150.IR flock (2)
151to provide exclusive access to the lock file and to prevent multiple
152deamons from becoming active simultaneously. If the daemon should be killed
153or die unexpectedly, the lock file need not be removed.
154The lock file is kept in a readable ASCII form
155and contains two lines.
156The first is the process id of the daemon and the second is the control
157file name of the current job being printed. The second line is updated to
158reflect the current status of
159.I lpd
160for the programs
161.IR lpq (1)
162and
163.IR lprm (1).
164.SH FILES
165.nf
166.ta \w'/etc/printcap 'u
167/etc/printcap printer description file
168/usr/spool/* spool directories
169/dev/lp* line printer devices
170/dev/printer socket for local requests
171/etc/hosts.equiv lists machine names allowed printer access
172.fi
173.SH "SEE ALSO"
174lpc(8),
175pac(1),
176lpr(1),
177lpq(1),
178lprm(1),
179printcap(5)
180.br
181.ul
1824.2BSD Line Printer Spooler Manual