1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Simple Server Printcap Example</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="UP" title="Printcap Database " href= 12 "printcapref.htm"> 13 <link rel="PREVIOUS" title="Simple Client Printcap Entry " 14 href="simple.htm"> 15 <link rel="NEXT" title= 16 "Using :oh To Select Printcap Information" href="x5732.htm"> 17 </head> 18 19 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 20 "#0000FF" vlink="#840084" alink="#0000FF"> 21 <div class="NAVHEADER"> 22 <table summary="Header navigation table" width="100%" border= 23 "0" cellpadding="0" cellspacing="0"> 24 <tr> 25 <th colspan="3" align="center">LPRng Reference Manual: 5 26 Sep 2003 (For LPRng-3.8.22)</th> 27 </tr> 28 29 <tr> 30 <td width="10%" align="left" valign="bottom"><a href= 31 "simple.htm" accesskey="P">Prev</a></td> 32 33 <td width="80%" align="center" valign="bottom">Chapter 34 12. Printcap Database</td> 35 36 <td width="10%" align="right" valign="bottom"><a href= 37 "x5732.htm" accesskey="N">Next</a></td> 38 </tr> 39 </table> 40 <hr align="LEFT" width="100%"> 41 </div> 42 43 <div class="SECT1"> 44 <h1 class="SECT1"><a name="CM">12.3. Simple Server Printcap 45 Example</a></h1> 46 47 <p>Options used:</p> 48 49 <ul> 50 <li> 51 <p><var class="LITERAL">cm=</var><span class= 52 "emphasis"><i class="EMPHASIS">comment for 53 status</i></span></p> 54 </li> 55 56 <li> 57 <p><var class="LITERAL">filter=</var><span class= 58 "emphasis"><i class="EMPHASIS">job filter</i></span></p> 59 </li> 60 61 <li> 62 <p><var class="LITERAL">lf=</var><span class= 63 "emphasis"><i class="EMPHASIS">log file</i></span></p> 64 </li> 65 66 <li> 67 <p><var class="LITERAL">af=</var><span class= 68 "emphasis"><i class="EMPHASIS">accounting 69 file</i></span></p> 70 </li> 71 72 <li> 73 <p><var class="LITERAL">lp=</var><span class= 74 "emphasis"><i class="EMPHASIS">output 75 device</i></span></p> 76 </li> 77 78 <li> 79 <p><var class="LITERAL">mx=</var><span class= 80 "emphasis"><i class="EMPHASIS">maximum job 81 size</i></span></p> 82 </li> 83 84 <li> 85 <p><var class="LITERAL">sd=</var><span class= 86 "emphasis"><i class="EMPHASIS">spool directory 87 file</i></span></p> 88 </li> 89 </ul> 90 <br> 91 <br> 92 93 <p>The previous section discussed printcap entries for use by 94 the client programs. Now we will discuss printcap entries for 95 use by the <b class="APPLICATION">lpd</b> server. In simple 96 configurations or when we have the <var class= 97 "LITERAL">force_localhost</var> option enabled we can use the 98 same printcap for both <b class="APPLICATION">LPRng</b> 99 clients and the <b class="APPLICATION">lpd</b> server.</p> 100 101 <div class="INFORMALEXAMPLE"> 102 <a name="AEN5687"></a> 103<pre class="SCREEN"> 104 # Local ASCII printer 105 lp1|printer 106 :server 107 :cm=Dumb printer 108 :lp=/dev/lp1 109 :sd=/var/spool/lpd/lp1 110 :lf=log:af=acct 111 :filter=/usr/local/libexec/filters/ifhp 112 :mx=0 113</pre> 114 </div> 115 <br> 116 <br> 117 118 <ol type="1"> 119 <li> 120 <p>The printcap entry name is <var class= 121 "LITERAL">lp1</var>. This information will be displayed 122 when requesting status information using the <b class= 123 "APPLICATION">lpq</b> program.</p> 124 </li> 125 126 <li> 127 <p>The <var class="LITERAL">printer</var> alias. This 128 allows a single spool queue to have multiple names.</p> 129 </li> 130 131 <li> 132 <p>The <var class="LITERAL">:server</var> option 133 specifies this printcap entry is only used by <b class= 134 "APPLICATION">lpd</b> server.</p> 135 </li> 136 137 <li> 138 <p>The <var class="LITERAL">:cm</var> field supplies a 139 information field for <b class="APPLICATION">lpq</b> 140 (printer status) output.</p> 141 </li> 142 143 <li> 144 <p>The <var class="LITERAL">:lp</var> value specifies the 145 destination file, device or remote spool queue to which 146 data is sent. In this example it is the device <tt class= 147 "FILENAME">/dev/lp1</tt>. By default, IO devices are 148 opened for <span class="emphasis"><i class= 149 "EMPHASIS">write-only</i></span> operation.</p> 150 </li> 151 152 <li> 153 <p>The <var class="LITERAL">:sd=/path</var> specifies the 154 <span class="emphasis"><i class="EMPHASIS">spool 155 directory</i></span> where print job files are stored 156 until they are printed.</p> 157 </li> 158 159 <li> 160 <p>The <var class="LITERAL">:lf</var> and <var class= 161 "LITERAL">:af</var> options specify the names of the log 162 and accounting files, respectively. These have the 163 default values <var class="LITERAL">log</var> and <var 164 class="LITERAL">acct</var> respectively. If not an 165 absolute path, the file is relative to the spool queue 166 directory. If these files don't exist, they will not be 167 created, and no logging or accounting will be done. You 168 will need to create them manually (e.g., by using <var 169 class="LITERAL">touch</var>) or by using the <span class= 170 "emphasis"><i class="EMPHASIS"><a href= 171 "checkpc.htm">checkpc</a></i></span> program. If you do 172 not want a log or accounting file, then use <var class= 173 "LITERAL">:lf=</var>, i.e. - no value.</p> 174 </li> 175 176 <li> 177 <p>The <var class="LITERAL">:filter=/path</var> option 178 specifies a filter program to be used to process job 179 files. Filters and print formats are discussed in <a 180 href="filters.htm">Filters</a>.</p> 181 </li> 182 183 <li> 184 <p><var class="LITERAL">mx</var> indicates the maximum 185 file size for a print job. Specifying 0 means that there 186 is no limit.</p> 187 </li> 188 </ol> 189 <br> 190 <br> 191 </div> 192 193 <div class="NAVFOOTER"> 194 <hr align="LEFT" width="100%"> 195 196 <table summary="Footer navigation table" width="100%" border= 197 "0" cellpadding="0" cellspacing="0"> 198 <tr> 199 <td width="33%" align="left" valign="top"><a href= 200 "simple.htm" accesskey="P">Prev</a></td> 201 202 <td width="34%" align="center" valign="top"><a href= 203 "index.htm" accesskey="H">Home</a></td> 204 205 <td width="33%" align="right" valign="top"><a href= 206 "x5732.htm" accesskey="N">Next</a></td> 207 </tr> 208 209 <tr> 210 <td width="33%" align="left" valign="top">Simple Client 211 Printcap Entry</td> 212 213 <td width="34%" align="center" valign="top"><a href= 214 "printcapref.htm" accesskey="U">Up</a></td> 215 216 <td width="33%" align="right" valign="top">Using :oh To 217 Select Printcap Information</td> 218 </tr> 219 </table> 220 </div> 221 </body> 222</html> 223 224