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