1LPD(8)                      System Manager's Manual                     LPD(8)
2
3
4

NAME

6       lpd - line printer daemon
7

SYNOPSIS

9       /usr/sbin/lpd [ -l ] [ port # ]
10

DESCRIPTION

12       Lpd  is  the  line  printer daemon (spool area handler) and is normally
13       invoked at boot time from the rc(8)  file.   It  makes  a  single  pass
14       through  the  printcap(5)  file to find out about the existing printers
15       and prints any files left after a crash. It then uses the system  calls
16       listen(2)  and  accept(2)  to  receive  requests  to print files in the
17       queue, transfer files to the  spooling  area,  display  the  queue,  or
18       remove  jobs  from the queue.  In each case, it forks a child to handle
19       the request so the parent can continue to  listen  for  more  requests.
20       The  Internet  port  number  used to rendezvous with other processes is
21       normally obtained with getservbyname(3) but can  be  changed  with  the
22       port#  argument.  The -l flag causes lpd to log valid requests received
23       from the network. This can be useful for debugging purposes.
24
25       Access control is provided by two means. First, All requests must  come
26       from  one  of  the  machines  listed  in  the  file /etc/hosts.equiv or
27       /etc/hosts.lpd.  Second, if the ``rs'' capability is specified  in  the
28       printcap  entry  for the printer being accessed, lpr requests will only
29       be honored for those users  with  accounts  on  the  machine  with  the
30       printer.
31
32       The  file  minfree  in each spool directory contains the number of disk
33       blocks to leave free so that the line printer  queue  won't  completely
34       fill  the disk.  The minfree file can be edited with your favorite text
35       editor.
36
37       The file lock in each spool directory is used to prevent multiple  dae‐
38       mons  from  becoming  active  simultaneously,  and to store information
39       about the daemon process for lpr(1), lpq(1), and  lprm(1).   After  the
40       daemon  has successfully set the lock, it scans the directory for files
41       beginning with cf.  Lines in each cf file specify files to  be  printed
42       or  non-printing actions to be performed.  Each such line begins with a
43       key character to specify what to do with the remainder of the line.
44
45       J      Job Name.  String to be used for the job name on the burst page.
46
47       C      Classification.  String to be used for the  classification  line
48              on the burst page.
49
50       L      Literal.   The  line contains identification info from the pass‐
51              word file and causes the banner page to be printed.
52
53       T      Title.  String to be used as the title for pr(1).
54
55       H      Host Name.  Name of the machine where lpr was invoked.
56
57       P      Person.  Login name of the person who invoked lpr.  This is used
58              to verify ownership by lprm.
59
60       M      Send  mail to the specified user when the current print job com‐
61              pletes.
62
63       f      Formatted File.  Name of a file to print which is  already  for‐
64              matted.
65
66       l      Like  ``f'' but passes control characters and does not make page
67              breaks.
68
69       p      Name of a file to print using pr(1) as a filter.
70
71       t      Troff File.  The file contains troff(1) output  (cat  phototype‐
72              setter commands).
73
74       n      Ditroff  File.   The file contains device independent troff out‐
75              put.
76
77       d      DVI File.  The file contains  Tex(l)  output  (DVI  format  from
78              Standford).
79
80       g      Graph File.  The file contains data produced by plot(3X).
81
82       c      Cifplot File. The file contains data produced by cifplot.
83
84       v      The file contains a raster image.
85
86       r      The  file contains text data with FORTRAN carriage control char‐
87              acters.
88
89       1      Troff Font R. Name of the  font  file  to  use  instead  of  the
90              default.
91
92       2      Troff  Font  I.  Name  of  the  font  file to use instead of the
93              default.
94
95       3      Troff Font B. Name of the  font  file  to  use  instead  of  the
96              default.
97
98       4      Troff  Font  S.  Name  of  the  font  file to use instead of the
99              default.
100
101       W      Width. Changes the page width (in characters) used by pr(1)  and
102              the text filters.
103
104       I      Indent.   The  number  of characters to indent the output by (in
105              ascii).
106
107       U      Unlink.  Name of file to remove upon completion of printing.
108
109       N      File name.  The name of the file which is being  printed,  or  a
110              blank  for  the  standard  input (when lpr is invoked in a pipe‐
111              line).
112
113       If a file can not be opened, a message will  be  logged  via  syslog(3)
114       using  the  LOG_LPR  facility.  Lpd will try up to 20 times to reopen a
115       file it expects to be there, after which it will skip the  file  to  be
116       printed.
117
118       Lpd  uses  flock(2) to provide exclusive access to the lock file and to
119       prevent multiple deamons from becoming active simultaneously.   If  the
120       daemon  should be killed or die unexpectedly, the lock file need not be
121       removed.  The lock file is kept in a readable ASCII form  and  contains
122       two lines.  The first is the process id of the daemon and the second is
123       the control file name of the current job  being  printed.   The  second
124       line  is  updated to reflect the current status of lpd for the programs
125       lpq(1) and lprm(1).
126

FILES

128       /etc/printcap           printer description file
129       /usr/spool/*            spool directories
130       /usr/spool/*/minfree    minimum free space to leave
131       /dev/lp*                line printer devices
132       /dev/printer            socket for local requests
133       /etc/hosts.equiv        lists machine names allowed printer access
134       /etc/hosts.lpd          lists machine names allowed printer access,
135                               but not under same administrative control.
136

SEE ALSO

138       lpc(8), pac(1), lpr(1), lpq(1), lprm(1), syslog(3), printcap(5)
139       4.2BSD Line Printer Spooler Manual
140
141
142
1434.2 Berkeley Distribution      October 23, 1996                         LPD(8)
Impressum