1 .\" Copyright (c) 1983, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
28 .\" @(#)4.t 8.1 (Berkeley) 6/8/93
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.
40 The real work in setting up is to create the
42 file and any printer filters for printers not supported
43 in the distribution system.
45 Creating a printcap file
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).
57 Printers on serial lines
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.
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:
71 entry specifies the file name to open for output. Here it could
72 be left out since ``/dev/lp'' is the default.
75 entry sets the baud rate for the tty line and the
77 entry sets CRMOD, no parity, and XTABS (see \fItty\fP\|(4)).
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
85 entry specifies the filter program
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.)
100 Printers that reside on remote hosts should have an empty
103 For example, the following printcap entry would send output to the printer
104 named ``lp'' on the machine ``ucbvax''.
107 lp|default line printer:\e
108 :lp=:rm=ucbvax:rp=lp:sd=/usr/spool/vaxlpd:
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.
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.
121 entry specifies ``/usr/spool/vaxlpd''
122 as the spooling directory instead of the
123 default value of ``/usr/spool/lpd''.
127 Filters are used to handle device dependencies and to
128 do accounting functions. The output filtering 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
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.
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:
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
159 files and raster images (see \fIva\fP\|(4V)).
160 Note that the page length is set to 58 lines by the
162 entry for 8.5" by 11" fan-fold paper.
163 To enable accounting, the varian entry would be
166 filter as shown below.
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:
177 Local access to printer queues is controlled with the
183 Users must be in the group
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.
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
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.