]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/smm/07.lpd/4.t
Update to Zstandard 1.4.2
[FreeBSD/FreeBSD.git] / share / doc / smm / 07.lpd / 4.t
1 .\" Copyright (c) 1983, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
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. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)4.t 8.1 (Berkeley) 6/8/93
29 .\"
30 .NH 1
31 Setting up
32 .PP
33 The 4.3BSD release comes with the necessary programs 
34 installed and with the default line printer queue
35 created.  If the system must be modified, the
36 makefile in the directory /usr/src/usr.lib/lpr
37 should be used in recompiling and reinstalling
38 the necessary programs.
39 .PP
40 The real work in setting up is to create the
41 .I printcap
42 file and any printer filters for printers not supported
43 in the distribution system.
44 .NH 2
45 Creating a printcap file
46 .PP
47 The 
48 .I printcap
49 database contains one or more entries per printer.
50 A printer should have a separate spooling directory;
51 otherwise, jobs will be printed on
52 different printers depending on which printer daemon starts first.
53 This section describes how to create entries for printers that do not
54 conform to the default printer description (an LP-11 style interface to a
55 standard, band printer).
56 .NH 3
57 Printers on serial lines
58 .PP
59 When a printer is connected via a serial communication line
60 it must have the proper baud rate and terminal modes set.
61 The following example is for a DecWriter III printer connected
62 locally via a 1200 baud serial line.
63 .DS
64 .DT
65 lp|LA-180 DecWriter III:\e
66         :lp=/dev/lp:br#1200:fs#06320:\e
67         :tr=\ef:of=/usr/lib/lpf:lf=/usr/adm/lpd-errs:
68 .DE
69 The
70 .B lp
71 entry specifies the file name to open for output. Here it could
72 be left out since ``/dev/lp'' is the default.
73 The
74 .B br
75 entry sets the baud rate for the tty line and the
76 .B fs
77 entry sets CRMOD, no parity, and XTABS (see \fItty\fP\|(4)).
78 The
79 .B tr
80 entry indicates that a form-feed should be printed when the queue
81 empties so the paper can be torn off without turning the printer off-line and
82 pressing form feed.
83 The
84 .B of
85 entry specifies the filter program
86 .I lpf
87 should be used for printing the files;
88 more will be said about filters later.
89 The last entry causes errors
90 to be written to the file ``/usr/adm/lpd-errs''
91 instead of the console.  Most errors from \fIlpd\fP are logged using
92 \fIsyslogd\fP\|(8) and will not be logged in the specified file.  The
93 filters should use \fIsyslogd\fP to report errors; only those that
94 write to standard error output will end up with errors in the \fBlf\fP file.
95 (Occasionally errors sent to standard error output have not appeared
96 in the log file; the use of \fIsyslogd\fP is highly recommended.)
97 .NH 3
98 Remote printers
99 .PP
100 Printers that reside on remote hosts should have an empty
101 .B lp
102 entry.
103 For example, the following printcap entry would send output to the printer
104 named ``lp'' on the machine ``ucbvax''.
105 .DS
106 .DT
107 lp|default line printer:\e
108         :lp=:rm=ucbvax:rp=lp:sd=/usr/spool/vaxlpd:
109 .DE
110 The
111 .B rm
112 entry is the name of the remote machine to connect to; this name must
113 be a known host name for a machine on the network.
114 The
115 .B rp
116 capability indicates
117 the name of the printer on the remote machine is ``lp'';
118 here it could be left out since this is the default value.
119 The
120 .B sd
121 entry specifies ``/usr/spool/vaxlpd''
122 as the spooling directory instead of the
123 default value of ``/usr/spool/lpd''.
124 .NH 2
125 Output filters
126 .PP
127 Filters are used to handle device dependencies and to
128 do accounting functions.  The output filtering of
129 .B of
130 is used when accounting is
131 not being done or when all text data must be passed through a filter.
132 It is not intended to do accounting since it is started only once,
133 all text files are filtered through it, and no provision is made for passing
134 owners' login name, identifying the beginning and ending of jobs, etc.
135 The other filters (if specified) are started for each file
136 printed and do accounting if there is an
137 .B af
138 entry.
139 If entries for both
140 .B of
141 and other filters are specified,
142 the output filter is used only to print the banner page;
143 it is then stopped to allow other filters access to the printer.
144 An example of a printer that requires output filters
145 is the Benson-Varian.
146 .DS
147 .DT
148 va|varian|Benson-Varian:\e
149         :lp=/dev/va0:sd=/usr/spool/vad:of=/usr/lib/vpf:\e
150         :tf=/usr/lib/rvcat:mx#2000:pl#58:px=2112:py=1700:tr=\ef:
151 .DE
152 The
153 .B tf
154 entry specifies ``/usr/lib/rvcat'' as the filter to be
155 used in printing \fItroff\fP\|(1) output.
156 This filter is needed to set the device into print mode
157 for text, and plot mode for printing
158 .I troff
159 files and raster images (see \fIva\fP\|(4V)).
160 Note that the page length is set to 58 lines by the
161 .B pl
162 entry for 8.5" by 11" fan-fold paper.
163 To enable accounting, the varian entry would be
164 augmented with an
165 .B af
166 filter as shown below.
167 .DS
168 .DT
169 va|varian|Benson-Varian:\e
170         :lp=/dev/va0:sd=/usr/spool/vad:of=/usr/lib/vpf:\e
171         :if=/usr/lib/vpf:tf=/usr/lib/rvcat:af=/usr/adm/vaacct:\e
172         :mx#2000:pl#58:px=2112:py=1700:tr=\ef:
173 .DE
174 .NH 2
175 Access Control
176 .PP
177 Local access to printer queues is controlled with the
178 .B rg
179 printcap entry.
180 .DS
181         :rg=lprgroup:
182 .DE
183 Users must be in the group
184 .I lprgroup
185 to submit jobs to the specified printer.
186 The default is to allow all users access.
187 Note that once the files are in the local queue, they can be printed
188 locally or forwarded to another host depending on the configuration.
189 .PP
190 Remote access is controlled by listing the hosts in either the file
191 /etc/hosts.equiv or /etc/hosts.lpd, one host per line. Note that
192 .IR rsh (1)
193 and
194 .IR rlogin (1)
195 use /etc/hosts.equiv to determine which hosts are equivalent for allowing logins
196 without passwords. The file /etc/hosts.lpd is only used to control
197 which hosts have line printer access.
198 Remote access can be further restricted to only allow remote users with accounts
199 on the local host to print jobs by using the \fBrs\fP printcap entry.
200 .DS
201         :rs:
202 .DE