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>AIX</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="System Specific Notes " href= 12 "systemspecific.htm"> 13 <link rel="PREVIOUS" title="Linux" href="linux.htm"> 14 <link rel="NEXT" title="AppleTalk Support " href= 15 "appletalk.htm"> 16 </head> 17 18 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 19 "#0000FF" vlink="#840084" alink="#0000FF"> 20 <div class="NAVHEADER"> 21 <table summary="Header navigation table" width="100%" border= 22 "0" cellpadding="0" cellspacing="0"> 23 <tr> 24 <th colspan="3" align="center">LPRng Reference Manual: 5 25 Sep 2003 (For LPRng-3.8.22)</th> 26 </tr> 27 28 <tr> 29 <td width="10%" align="left" valign="bottom"><a href= 30 "linux.htm" accesskey="P">Prev</a></td> 31 32 <td width="80%" align="center" valign="bottom">Chapter 3. 33 System Specific Notes</td> 34 35 <td width="10%" align="right" valign="bottom"><a href= 36 "appletalk.htm" accesskey="N">Next</a></td> 37 </tr> 38 </table> 39 <hr align="LEFT" width="100%"> 40 </div> 41 42 <div class="SECT1"> 43 <h1 class="SECT1"><a name="AIX">3.3. AIX</a></h1> 44 45 <p>This information was supplied by <a href= 46 "mailto:nitschke@math.unihamburg.de" target="_top">Dirk 47 Nitschke</a>, as of August 1997, and describes how to install 48 the <b class="APPLICATION">LPRng</b> package on a workstation 49 running AIX 4.1.x and possibly 3.x.x as well. Dirk would be 50 interested in any comments or corrections.</p> 51 52 <p>Printing on AIX systems is different. AIX provides a 53 general queueing facility and printing is only one way to use 54 it. You submit a print job to a print queue using one of the 55 commands <tt class="COMMAND">qprt</tt> or <tt class= 56 "COMMAND">enq</tt>. You can use the BSD or System V printing 57 commands <b class="APPLICATION">lpr</b> or <b class= 58 "APPLICATION">lp</b>, too. The <tt class= 59 "COMMAND">qdaemon</tt> watches all (general) queues and knows 60 how to handle your job. A (general) queue is defined in the 61 file <tt class="FILENAME">/etc/qconfig</tt>. The format of 62 this file is different from the <tt class= 63 "FILENAME">printcap</tt> format.</p> 64 65 <p>OK, how to replace the AIX printing system? There is no 66 group <var class="LITERAL">daemon</var> on AIX. Therefore you 67 have to change the default group for file ownership and 68 process permissions or create a <var class= 69 "LITERAL">daemon</var> user and group. We decided to use the 70 <var class="LITERAL">printq</var> group; on reflection it 71 would have been easier to have created a <var class= 72 "LITERAL">daemon</var> group. The user <var class= 73 "LITERAL">daemon</var> exists on AIX but we have chosen <b 74 class="APPLICATION">lpd</b> as the user who runs <b class= 75 "APPLICATION">lpd</b> and all filters and owns the spooling 76 directories. You can change the values for <var class= 77 "LITERAL">group</var> and <var class="LITERAL">user</var> in 78 your <tt class="FILENAME">lpd.conf</tt> file or in the 79 sources <tt class="FILENAME">src/common/vars.c</tt>. This is 80 an example for <tt class="FILENAME">lpd.conf</tt>:</p> 81 82 <div class="INFORMALEXAMPLE"> 83 <a name="AEN1576"></a> 84<pre class="SCREEN"> 85 # Purpose: group to run SUID ROOT programs 86 # default group=daemon 87 group=printq 88 # Purpose: server user for SUID purposes 89 # default user=daemon 90 user=lpd 91</pre> 92 </div> 93 Compile and install the <b class="APPLICATION">LPRng</b> 94 package. Create your <tt class="FILENAME">printcap</tt>, 95 spooling directories, accounting and logfiles and so on. 96 Don't forget to use <a href="checkpc.htm">checkpc</a> to make 97 sure that all the permissions are set correctly and the 98 necessary files are created.<br> 99 <br> 100 101 <p>Then stop all print queues defined on your workstation. 102 Use</p> 103 104 <div class="INFORMALEXAMPLE"> 105 <a name="AEN1582"></a> 106<pre class="SCREEN"> 107 # chque -q queuename -a "up = FALSE" 108</pre> 109 </div> 110 for this (yes, blanks around <var class="LITERAL">=</var> are 111 needed).<br> 112 <br> 113 114 <p>If you have local printers attached to your system you 115 will have an <b class="APPLICATION">lpd</b> running. Stop 116 this daemon using SMIT (Print Spooling, Manage Print Server, 117 Stop the Print Server Subsystem). Choosing <span class= 118 "emphasis"><i class="EMPHASIS">both</i></span> also removes 119 <b class="APPLICATION">lpd</b> from <tt class= 120 "FILENAME">/etc/inittab</tt>. Maybe it's faster to do this by 121 hand:</p> 122 123 <div class="INFORMALEXAMPLE"> 124 <a name="AEN1590"></a> 125<pre class="SCREEN"> 126 <samp class="PROMPT">h4: {75} #</samp> <kbd class= 127"USERINPUT">topsrc -p'pid of /usr/sbin/lpd'</kbd> 128 <samp class="PROMPT">h4: {76} #</samp> <kbd class= 129"USERINPUT">rmitab "lpd"</kbd> 130</pre> 131 </div> 132 <br> 133 <br> 134 135 <p>Now delete all print queues managed by <var class= 136 "LITERAL">qdaemon</var> defined on your system. You can use 137 <tt class="COMMAND">SMIT</tt> for this or the commands <tt 138 class="COMMAND">{mk,ch,rm}que</tt>, <tt class= 139 "COMMAND">{mk,ch,rm}quedev</tt>, <tt class= 140 "COMMAND">{mk,ch,rm}virprt</tt>. The <tt class= 141 "COMMAND">SMIT</tt> fast path is <tt class="COMMAND">smit 142 rmpq</tt>.</p> 143 144 <p>To start the new <b class="APPLICATION">lpd</b> at system 145 startup you have to add an entry to <tt class= 146 "FILENAME">/etc/inittab</tt>:</p> 147 148 <div class="INFORMALEXAMPLE"> 149 <a name="AEN1607"></a> 150<pre class="SCREEN"> 151 <samp class="PROMPT">h4: {77} #</samp> <kbd class= 152"USERINPUT">mkitab "lpd:2:once:/full/path/lpd"</kbd> 153</pre> 154 </div> 155 <br> 156 <br> 157 158 <p>Some work has to be done if have have a local printer 159 attached to your workstation. You have to create a device 160 file like <tt class="FILENAME">/dev/lp0</tt>. The <tt class= 161 "COMMAND">SMIT</tt> fast path for this is <tt class= 162 "COMMAND">smit mkdev</tt>. Choose <var class= 163 "LITERAL">Printer/Plotter</var>, then <var class= 164 "LITERAL">Printer/Plotter Devices</var>, then <var class= 165 "LITERAL">Add a Printer/Plotter</var>. To create a parallel 166 printer device select the following:</p> 167 168 <div class="INFORMALEXAMPLE"> 169 <a name="AEN1618"></a> 170<pre class="SCREEN"> 171 Plotter type: opp Other parallel printer 172 Printer/Plotter Interface: parallel 173 Parent Adapter: ppa0 Available 174</pre> 175 </div> 176 Now define the characteristics of the device: 177 178 <div class="INFORMALEXAMPLE"> 179 <a name="AEN1620"></a> 180<pre class="SCREEN"> 181 Port Number: p 182</pre> 183 </div> 184 Option <var class="LITERAL">p</var> is for parallel. Go to 185 the field: 186 187 <div class="INFORMALEXAMPLE"> 188 <a name="AEN1623"></a> 189<pre class="SCREEN"> 190 Send all characters to printer UNMODIFIED no 191</pre> 192 </div> 193 <br> 194 <br> 195 196 <p>and select <var class="LITERAL">yes</var>! We have had a 197 lot of trouble with <var class="LITERAL">no</var>. This is 198 very important! Expect erroneous output if you choose <var 199 class="LITERAL">no</var>. If you have already created a 200 device file, change the characteristics! SMIT's fast path is 201 <tt class="COMMAND">smit chdev</tt>.</p> 202 203 <p>Finally remove all AIX printing commands like <b class= 204 "APPLICATION">qprt</b>, <b class="APPLICATION">lp</b>, <b 205 class="APPLICATION">cancel</b>, <b class= 206 "APPLICATION">lpq</b>, and <b class="APPLICATION">lprm</b>. 207 You will find a lot of them in <tt class= 208 "FILENAME">/usr/bin</tt>. Do not remove <b class= 209 "APPLICATION">enq</b> and friends if you want to use the 210 general queueing facility.</p> 211 212 <p>Now you can start your new <b class= 213 "APPLICATION">lpd</b>.</p> 214 </div> 215 216 <div class="NAVFOOTER"> 217 <hr align="LEFT" width="100%"> 218 219 <table summary="Footer navigation table" width="100%" border= 220 "0" cellpadding="0" cellspacing="0"> 221 <tr> 222 <td width="33%" align="left" valign="top"><a href= 223 "linux.htm" accesskey="P">Prev</a></td> 224 225 <td width="34%" align="center" valign="top"><a href= 226 "index.htm" accesskey="H">Home</a></td> 227 228 <td width="33%" align="right" valign="top"><a href= 229 "appletalk.htm" accesskey="N">Next</a></td> 230 </tr> 231 232 <tr> 233 <td width="33%" align="left" valign="top">Linux</td> 234 235 <td width="34%" align="center" valign="top"><a href= 236 "systemspecific.htm" accesskey="U">Up</a></td> 237 238 <td width="33%" align="right" valign="top">AppleTalk 239 Support</td> 240 </tr> 241 </table> 242 </div> 243 </body> 244</html> 245 246