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