File: cm.htm

package info (click to toggle)
lprng 3.8.10-1.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 13,076 kB
  • ctags: 4,348
  • sloc: ansic: 35,394; sh: 10,756; perl: 2,210; makefile: 1,046
file content (214 lines) | stat: -rw-r--r-- 6,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>Simple Server Printcap Example</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.71 ">
    <link rel="HOME" title=" LPRng-HOWTO" href="index.htm">
    <link rel="UP" title="Printcap Database " href=
    "printcapref.htm">
    <link rel="PREVIOUS" title="Simple Client Printcap Entry "
    href="simple.htm">
    <link rel="NEXT" title=
    "Using :oh To Select Printcap Information" href="x5679.htm">
  </head>

  <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link=
  "#0000FF" vlink="#840084" alink="#0000FF">
    <div class="NAVHEADER">
      <table summary="Header navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <th colspan="3" align="center">LPRng-HOWTO: 1 Apr 2002
          (For LPRng-3.8.10)</th>
        </tr>

        <tr>
          <td width="10%" align="left" valign="bottom"><a href=
          "simple.htm" accesskey="P">Prev</a></td>

          <td width="80%" align="center" valign="bottom">Chapter
          12. Printcap Database</td>

          <td width="10%" align="right" valign="bottom"><a href=
          "x5679.htm" accesskey="N">Next</a></td>
        </tr>
      </table>
      <hr align="LEFT" width="100%">
    </div>

    <div class="SECT1">
      <h1 class="SECT1"><a name="CM">12.3. Simple Server Printcap
      Example</a></h1>

      <p>Options used:</p>

      <ul>
        <li>
          <p><tt class="LITERAL">cm=</tt><i class=
          "EMPHASIS">comment for status</i></p>
        </li>

        <li>
          <p><tt class="LITERAL">filter=</tt><i class=
          "EMPHASIS">job filter</i></p>
        </li>

        <li>
          <p><tt class="LITERAL">lf=</tt><i class="EMPHASIS">log
          file</i></p>
        </li>

        <li>
          <p><tt class="LITERAL">af=</tt><i class=
          "EMPHASIS">accounting file</i></p>
        </li>

        <li>
          <p><tt class="LITERAL">lp=</tt><i class="EMPHASIS">output
          device</i></p>
        </li>

        <li>
          <p><tt class="LITERAL">mx=</tt><i class=
          "EMPHASIS">maximum job size</i></p>
        </li>

        <li>
          <p><tt class="LITERAL">sd=</tt><i class="EMPHASIS">spool
          directory file</i></p>
        </li>
      </ul>
      <br>
      <br>

      <p>The previous section discussed printcap entries for use by
      the client programs. Now we will discuss printcap entries for
      use by the <b class="APPLICATION">lpd</b> server. In simple
      configurations or when we have the <tt class=
      "LITERAL">force_localhost</tt> option enabled we can use the
      same printcap for both <b class="APPLICATION">LPRng</b>
      clients and the <b class="APPLICATION">lpd</b> server.</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN5634"></a>
<pre class="SCREEN">
    # Local ASCII printer
    lp1|printer
      :server
      :cm=Dumb printer
      :lp=/dev/lp1
      :sd=/var/spool/lpd/lp1
      :lf=log:af=acct
      :filter=/usr/local/libexec/filters/ifhp
      :mx=0
</pre>
      </div>
      <br>
      <br>

      <ol type="1">
        <li>
          <p>The printcap entry name is <tt class=
          "LITERAL">lp1</tt>. This information will be displayed
          when requesting status information using the <b class=
          "APPLICATION">lpq</b> program.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">printer</tt> alias. This
          allows a single spool queue to have multiple names.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">:server</tt> option specifies
          this printcap entry is only used by <b class=
          "APPLICATION">lpd</b> server.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">:cm</tt> field supplies a
          information field for <b class="APPLICATION">lpq</b>
          (printer status) output.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">:lp</tt> value specifies the
          destination file, device or remote spool queue to which
          data is sent. In this example it is the device <tt class=
          "FILENAME">/dev/lp1</tt>. By default, IO devices are
          opened for <i class="EMPHASIS">write-only</i>
          operation.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">:sd=/path</tt> specifies the
          <i class="EMPHASIS">spool directory</i> where print job
          files are stored until they are printed.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">:lf</tt> and <tt class=
          "LITERAL">:af</tt> options specify the names of the log
          and accounting files, respectively. These have the
          default values <tt class="LITERAL">log</tt> and <tt
          class="LITERAL">acct</tt> respectively. If not an
          absolute path, the file is relative to the spool queue
          directory. If these files don't exist, they will not be
          created, and no logging or accounting will be done. You
          will need to create them manually (e.g., by using <tt
          class="LITERAL">touch</tt>) or by using the <i class=
          "EMPHASIS"><a href="checkpc.htm">checkpc</a></i> program.
          If you do not want a log or accounting file, then use <tt
          class="LITERAL">:lf=</tt>, i.e. - no value.</p>
        </li>

        <li>
          <p>The <tt class="LITERAL">:filter=/path</tt> option
          specifies a filter program to be used to process job
          files. Filters and print formats are discussed in <a
          href="filters.htm">Filters</a>.</p>
        </li>

        <li>
          <p><tt class="LITERAL">mx</tt> indicates the maximum file
          size for a print job. Specifying 0 means that there is no
          limit.</p>
        </li>
      </ol>
      <br>
      <br>
    </div>

    <div class="NAVFOOTER">
      <hr align="LEFT" width="100%">

      <table summary="Footer navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="33%" align="left" valign="top"><a href=
          "simple.htm" accesskey="P">Prev</a></td>

          <td width="34%" align="center" valign="top"><a href=
          "index.htm" accesskey="H">Home</a></td>

          <td width="33%" align="right" valign="top"><a href=
          "x5679.htm" accesskey="N">Next</a></td>
        </tr>

        <tr>
          <td width="33%" align="left" valign="top">Simple Client
          Printcap Entry</td>

          <td width="34%" align="center" valign="top"><a href=
          "printcapref.htm" accesskey="U">Up</a></td>

          <td width="33%" align="right" valign="top">Using :oh To
          Select Printcap Information</td>
        </tr>
      </table>
    </div>
  </body>
</html>