1 .\" $NetBSD: 4.t,v 1.5 2006/01/04 15:32:50 garbled Exp $
2 .\" Copyright (c) 1983, 1993
3 .\" The Regents of the University of California. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. Neither the name of the University nor the names of its contributors
14 .\" may be used to endorse or promote products derived from this software
15 .\" without specific prior written permission.
17 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" @(#)4.t 8.1 (Berkeley) 6/8/93
34 The 4.3BSD release comes with the necessary programs
35 installed and with the default line printer queue
37 If the system must be modified, the
38 makefile in the directory /usr/src/usr.lib/lpr
39 should be used in recompiling and reinstalling
40 the necessary programs.
42 The real work in setting up is to create the
44 file and any printer filters for printers not supported
45 in the distribution system.
47 Creating a printcap file
51 database contains one or more entries per printer.
52 A printer should have a separate spooling directory;
53 otherwise, jobs will be printed on
54 different printers depending on which printer daemon starts first.
55 This section describes how to create entries for printers that do not
56 conform to the default printer description (an LP-11 style interface to a
57 standard, band printer).
59 Printers on serial lines
61 When a printer is connected via a serial communication line
62 it must have the proper baud rate and terminal modes set.
63 The following example is for a DecWriter III printer connected
64 locally via a 1200 baud serial line.
67 lp|LA-180 DecWriter III:\e
68 :lp=/dev/lp:br#1200:fs#06320:\e
69 :tr=\ef:of=/usr/lib/lpf:lf=/usr/adm/lpd-errs:
73 entry specifies the file name to open for output.
74 Here it could be left out since ``/dev/lp'' is the default.
77 entry sets the baud rate for the tty line and the
79 entry sets CRMOD, no parity, and XTABS (see \fItty\fP\|(4)).
82 entry indicates that a form-feed should be printed when the queue
83 empties so the paper can be torn off without turning the printer off-line and
87 entry specifies the filter program
89 should be used for printing the files;
90 more will be said about filters later.
91 The last entry causes errors
92 to be written to the file ``/usr/adm/lpd-errs''
93 instead of the console.
94 Most errors from \fIlpd\fP are logged using
95 \fIsyslogd\fP\|(8) and will not be logged in the specified file.
96 The filters should use \fIsyslogd\fP to report errors; only those that
97 write to standard error output will end up with errors in the \fBlf\fP file.
98 (Occasionally errors sent to standard error output have not appeared
99 in the log file; the use of \fIsyslogd\fP is highly recommended.)
103 Printers that reside on remote hosts should have an empty
106 For example, the following printcap entry would send output to the printer
107 named ``lp'' on the machine ``ucbvax''.
110 lp|default line printer:\e
111 :lp=:rm=ucbvax:rp=lp:sd=/var/spool/output/vaxlpd:
115 entry is the name of the remote machine to connect to; this name must
116 be a known host name for a machine on the network.
119 entry can also specify the port number of the \fIlpd\fP
120 server on the remote host with the form ``port@host''.
124 the name of the printer on the remote machine is ``lp'';
125 here it could be left out since this is the default value.
128 entry specifies ``/var/spool/output/vaxlpd''
129 as the spooling directory instead of the
130 default value of ``/var/spool/output/lpd''.
134 Filters are used to handle device dependencies and to
135 do accounting functions.
136 The output filtering of
138 is used when accounting is
139 not being done or when all text data must be passed through a filter.
140 It is not intended to do accounting since it is started only once,
141 all text files are filtered through it, and no provision is made for passing
142 owners' login name, identifying the beginning and ending of jobs, etc.
143 The other filters (if specified) are started for each file
144 printed and do accounting if there is an
149 and other filters are specified,
150 the output filter is used only to print the banner page;
151 it is then stopped to allow other filters access to the printer.
152 An example of a printer that requires output filters
153 is the Benson-Varian.
156 va|varian|Benson-Varian:\e
157 :lp=/dev/va0:sd=/var/spool/output/vad:of=/usr/lib/vpf:\e
158 :tf=/usr/lib/rvcat:mx#2000:pl#58:px=2112:py=1700:tr=\ef:
162 entry specifies ``/usr/lib/rvcat'' as the filter to be
163 used in printing \fItroff\fP\|(1) output.
164 This filter is needed to set the device into print mode
165 for text, and plot mode for printing
167 files and raster images (see \fIva\fP\|(4V)).
168 Note that the page length is set to 58 lines by the
170 entry for 8.5" by 11" fan-fold paper.
171 To enable accounting, the varian entry would be
174 filter as shown below.
177 va|varian|Benson-Varian:\e
178 :lp=/dev/va0:sd=/var/spool/output/vad:of=/usr/lib/vpf:\e
179 :if=/usr/lib/vpf:tf=/usr/lib/rvcat:af=/usr/adm/vaacct:\e
180 :mx#2000:pl#58:px=2112:py=1700:tr=\ef:
185 Local access to printer queues is controlled with the
191 Users must be in the group
193 to submit jobs to the specified printer.
194 The default is to allow all users access.
195 Note that once the files are in the local queue, they can be printed
196 locally or forwarded to another host depending on the configuration.
198 Remote access is controlled by listing the hosts in either the file
199 /etc/hosts.equiv or /etc/hosts.lpd, one host per line.
204 use /etc/hosts.equiv to determine which hosts are equivalent for allowing logins
206 The file /etc/hosts.lpd is only used to control
207 which hosts have line printer access.
208 Remote access can be further restricted to only allow remote users with accounts
209 on the local host to print jobs by using the \fBrs\fP printcap entry.