home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / share / doc / smm / 06.lpd / 4.t < prev    next >
Encoding:
Text File  |  1991-04-17  |  7.2 KB  |  207 lines

  1. .\" Copyright (c) 1983 The Regents of the University of California.
  2. .\" 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. 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.
  19. .\"
  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
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)4.t    6.6 (Berkeley) 4/17/91
  33. .\"
  34. .NH 1
  35. Setting up
  36. .PP
  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.
  43. .PP
  44. The real work in setting up is to create the
  45. .I printcap
  46. file and any printer filters for printers not supported
  47. in the distribution system.
  48. .NH 2
  49. Creating a printcap file
  50. .PP
  51. The 
  52. .I printcap
  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).
  60. .NH 3
  61. Printers on serial lines
  62. .PP
  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.
  67. .DS
  68. .DT
  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:
  72. .DE
  73. The
  74. .B lp
  75. entry specifies the file name to open for output. Here it could
  76. be left out since ``/dev/lp'' is the default.
  77. The
  78. .B br
  79. entry sets the baud rate for the tty line and the
  80. .B fs
  81. entry sets CRMOD, no parity, and XTABS (see \fItty\fP\|(4)).
  82. The
  83. .B tr
  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
  86. pressing form feed.
  87. The
  88. .B of
  89. entry specifies the filter program
  90. .I lpf
  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.)
  101. .NH 3
  102. Remote printers
  103. .PP
  104. Printers that reside on remote hosts should have an empty
  105. .B lp
  106. entry.
  107. For example, the following printcap entry would send output to the printer
  108. named ``lp'' on the machine ``ucbvax''.
  109. .DS
  110. .DT
  111. lp|default line printer:\e
  112.     :lp=:rm=ucbvax:rp=lp:sd=/usr/spool/vaxlpd:
  113. .DE
  114. The
  115. .B rm
  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.
  118. The
  119. .B rp
  120. capability indicates
  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.
  123. The
  124. .B sd
  125. entry specifies ``/usr/spool/vaxlpd''
  126. as the spooling directory instead of the
  127. default value of ``/usr/spool/lpd''.
  128. .NH 2
  129. Output filters
  130. .PP
  131. Filters are used to handle device dependencies and to
  132. do accounting functions.  The output filtering of
  133. .B 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
  141. .B af
  142. entry.
  143. If entries for both
  144. .B of
  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.
  150. .DS
  151. .DT
  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:
  155. .DE
  156. The
  157. .B tf
  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
  162. .I troff
  163. files and raster images (see \fIva\fP\|(4V)).
  164. Note that the page length is set to 58 lines by the
  165. .B pl
  166. entry for 8.5" by 11" fan-fold paper.
  167. To enable accounting, the varian entry would be
  168. augmented with an
  169. .B af
  170. filter as shown below.
  171. .DS
  172. .DT
  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:
  177. .DE
  178. .NH 2
  179. Access Control
  180. .PP
  181. Local access to printer queues is controlled with the
  182. .B rg
  183. printcap entry.
  184. .DS
  185.     :rg=lprgroup:
  186. .DE
  187. Users must be in the group
  188. .I lprgroup
  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.
  193. .PP
  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
  196. .IR rsh (1)
  197. and
  198. .IR rlogin (1)
  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.
  204. .DS
  205.     :rs:
  206. .DE
  207.