View | Details | Raw Unified | Return to bug 29729
Collapse All | Expand All

(-)chapter.patched (-36 / +37 lines)
Lines 1116-1123 Link Here
1116
	    <literal>lp</literal> capability.</para>
1116
	    <literal>lp</literal> capability.</para>
1117
1117
1118
	  <para>In our running example, let us assume that
1118
	  <para>In our running example, let us assume that
1119
	    <hostid>rattan</hostid> is on the first parallel port, and
1119
	    <literal>rattan</literal> is on the first parallel port, and
1120
	    <hostid>bamboo</hostid> is on a sixth serial port; here are
1120
	    <literal>bamboo</literal> is on a sixth serial port; here are
1121
	    the additions to <filename>/etc/printcap</filename>:</para>
1121
	    the additions to <filename>/etc/printcap</filename>:</para>
1122
1122
1123
	  <programlisting>#
1123
	  <programlisting>#
Lines 1563-1569 Link Here
1563
                  <term><option>-c</option></term>
1563
                  <term><option>-c</option></term>
1564
1564
1565
                  <listitem>
1565
                  <listitem>
1566
                    <para>appears if the job's submitted with <command>lpr
1566
                    <para>appears if the job is submitted with <command>lpr
1567
                        -l</command></para>
1567
                        -l</command></para>
1568
                  </listitem>
1568
                  </listitem>
1569
                </varlistentry>
1569
                </varlistentry>
Lines 1884-1890 Link Here
1884
        &amp;&amp; exit 0
1884
        &amp;&amp; exit 0
1885
else
1885
else
1886
    #
1886
    #
1887
    #  Plain text or HP/PCL, so just print it directly; print a form
1887
    #  Plain text or HP/PCL, so just print it directly; print a form feed
1888
    #  at the end to eject the last page.
1888
    #  at the end to eject the last page.
1889
    #
1889
    #
1890
    echo $first_line &amp;&amp; cat &amp;&amp; printf "\033&amp;l0H" &amp;&amp; 
1890
    echo $first_line &amp;&amp; cat &amp;&amp; printf "\033&amp;l0H" &amp;&amp; 
Lines 2538-2544 Link Here
2538
        <para>By enabling header pages, LPD will produce a <emphasis>long
2538
        <para>By enabling header pages, LPD will produce a <emphasis>long
2539
            header</emphasis>, a full page of large letters identifying the
2539
            header</emphasis>, a full page of large letters identifying the
2540
          user, host, and job.  Here is an example (kelly printed the job
2540
          user, host, and job.  Here is an example (kelly printed the job
2541
          named outline from host rose):</para>
2541
          named outline from host <hostid>rose</hostid>):</para>
2542
            
2542
            
2543
        <programlisting>      k                   ll       ll
2543
        <programlisting>      k                   ll       ll
2544
      k                    l        l
2544
      k                    l        l
Lines 2972-2984 Link Here
2972
2972
2973
        <para>Here is an example.  The host <hostid>rose</hostid> has two
2973
        <para>Here is an example.  The host <hostid>rose</hostid> has two
2974
          printers, <literal>bamboo</literal> and <literal>rattan</literal>.
2974
          printers, <literal>bamboo</literal> and <literal>rattan</literal>.
2975
          We will enable users on the host orchid to print to those printers.
2975
          We will enable users on the host <hostid>orchid</hostid> to print
2976
          to those printers.
2976
          Here is the <filename>/etc/printcap</filename> file for
2977
          Here is the <filename>/etc/printcap</filename> file for
2977
          <hostid>orchid</hostid> (back from section <link
2978
          <hostid>orchid</hostid> (back from section <link
2978
            linkend="printing-advanced-header-pages-enabling">Enabling Header
2979
            linkend="printing-advanced-header-pages-enabling">Enabling Header
2979
            Pages</link>).  It already had the entry for the printer
2980
            Pages</link>).  It already had the entry for the printer
2980
          <literal>teak</literal>; we have added entries for the two printers
2981
          <literal>teak</literal>; we have added entries for the two printers
2981
          on the host rose:</para>
2982
          on the host <hostid>rose</hostid>:</para>
2982
2983
2983
        <programlisting>#
2984
        <programlisting>#
2984
#  /etc/printcap for host orchid - added (remote) printers on rose
2985
#  /etc/printcap for host orchid - added (remote) printers on rose
Lines 3014-3030 Link Here
3014
              
3015
              
3015
        <para>Now, users on <hostid>orchid</hostid> can print to
3016
        <para>Now, users on <hostid>orchid</hostid> can print to
3016
          <literal>rattan</literal> and <literal>bamboo</literal>.  If, for
3017
          <literal>rattan</literal> and <literal>bamboo</literal>.  If, for
3017
          example, a user on orchid typed
3018
          example, a user on <hostid>orchid</hostid> typed
3018
              
3019
              
3019
          <screen>&prompt.user; <userinput>lpr -P bamboo -d sushi-review.dvi</userinput></screen>
3020
          <screen>&prompt.user; <userinput>lpr -P bamboo -d sushi-review.dvi</userinput></screen>
3020
3021
3021
          the LPD system on orchid would copy the job to the spooling
3022
          the LPD system on <hostid>orchid</hostid> would copy the job to the spooling
3022
          directory <filename>/var/spool/lpd/bamboo</filename> and note that
3023
          directory <filename>/var/spool/lpd/bamboo</filename> and note that it was a
3023
          it was a DVI job.  As soon as the host rose has room in its
3024
          DVI job.  As soon as the host <hostid>rose</hostid> has room in its
3024
          <hostid>bamboo</hostid> spooling directory, the two LPDs would
3025
          <literal>bamboo</literal> spooling directory, the two LPDs would transfer the
3025
          transfer the file to rose.  The file would wait in rose's queue
3026
          file to <hostid>rose</hostid>.  The file would wait in <hostid>rose</hostid>'s
3026
          until it was finally printed.  It would be converted from DVI to
3027
          queue until it was finally printed.  It would be converted from DVI to
3027
          PostScript (since bamboo is a PostScript printer) on rose.</para>
3028
          PostScript (since <literal>bamboo</literal> is a PostScript printer) on
3029
          <hostid>rose</hostid>.</para>
3028
      </sect3>
3030
      </sect3>
3029
      
3031
      
3030
      <sect3 id="printing-advanced-network-net-if">
3032
      <sect3 id="printing-advanced-network-net-if">
Lines 3138-3144 Link Here
3138
          <filename>/etc/printcap</filename> file for the host
3140
          <filename>/etc/printcap</filename> file for the host
3139
          <hostid>rose</hostid>.  The printer <literal>rattan</literal> is
3141
          <hostid>rose</hostid>.  The printer <literal>rattan</literal> is
3140
          quite hearty, so we will allow multiple copies, but the laser
3142
          quite hearty, so we will allow multiple copies, but the laser
3141
          printer <literal>bamboo</literal>'s a bit more delicate, so we will
3143
          printer <literal>bamboo</literal> is a bit more delicate, so we will
3142
          disable multiple copies by adding the <literal>sc</literal>
3144
          disable multiple copies by adding the <literal>sc</literal>
3143
          capability:</para>
3145
          capability:</para>
3144
3146
Lines 3376-3384 Link Here
3376
                <filename>minfree</filename> file.</para>
3378
                <filename>minfree</filename> file.</para>
3377
                    
3379
                    
3378
              <para>For example, let us add a <filename>minfree</filename>
3380
              <para>For example, let us add a <filename>minfree</filename>
3379
                file for the printer <hostid>bamboo</hostid>.  We examine
3381
                file for the printer <literal>bamboo</literal>.  We examine
3380
                <filename>/etc/printcap</filename> to find the spooling
3382
                <filename>/etc/printcap</filename> to find the spooling
3381
                directory for this printer; here is <hostid>bamboo</hostid>'s
3383
                directory for this printer; here is <literal>bamboo</literal>'s
3382
                entry:</para>
3384
                entry:</para>
3383
                  
3385
                  
3384
              <programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
3386
              <programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
Lines 3387-3400 Link Here
3387
        :if=/usr/local/libexec/psif:\
3389
        :if=/usr/local/libexec/psif:\
3388
        :df=/usr/local/libexec/psdf:</programlisting>
3390
        :df=/usr/local/libexec/psdf:</programlisting>
3389
3391
3390
              <para>The spooling directory is the given in the
3392
              <para>The spooling directory is given in the <literal>sd</literal>
3391
                <literal>sd</literal> capability.  We will make three
3393
                capability.  We will make three megabytes (which is 6144 disk blocks)
3392
                megabytes (which is 6144 disk blocks) the amount of free disk
3394
                the amount of free disk space that must exist on the filesystem for
3393
                space that must exist on the filesystem for LPD to accept
3395
                LPD to accept remote jobs:</para>
3394
                remote jobs:</para>
3395
                  
3396
                  
3396
              <screen>&prompt.root; <userinput>echo 6144 &gt; /var/spool/lpd/bam
3397
              <screen>&prompt.root; <userinput>echo 6144 &gt; /var/spool/lpd/bamboo/minfree
3397
boo/minfree</userinput></screen>
3398
              </userinput></screen>
3398
            </listitem>
3399
            </listitem>
3399
          </varlistentry>
3400
          </varlistentry>
3400
          
3401
          
Lines 3417-3423 Link Here
3417
                giving them accounts on your systems, they can use your
3418
                giving them accounts on your systems, they can use your
3418
                printers from their own departmental systems.  If you would
3419
                printers from their own departmental systems.  If you would
3419
                rather allow them to use <emphasis>only</emphasis> your
3420
                rather allow them to use <emphasis>only</emphasis> your
3420
                printers and not your compute resources, you can give them
3421
                printers and not your computer resources, you can give them
3421
                <quote>token</quote> accounts, with no home directory and a
3422
                <quote>token</quote> accounts, with no home directory and a
3422
                useless shell like <filename>/usr/bin/false</filename>.</para>
3423
                useless shell like <filename>/usr/bin/false</filename>.</para>
3423
            </listitem>
3424
            </listitem>
Lines 3524-3531 Link Here
3524
        <para>You should use a separate accounting file for each printer, as
3525
        <para>You should use a separate accounting file for each printer, as
3525
          <command>lpf</command> has no file locking logic built into it, and
3526
          <command>lpf</command> has no file locking logic built into it, and
3526
          two <command>lpf</command>s might corrupt each other's entries if
3527
          two <command>lpf</command>s might corrupt each other's entries if
3527
          they were to write to the same file at the same time.  A easy way to
3528
          they were to write to the same file at the same time.  An easy way
3528
          insure a separate accounting file for each printer is to use
3529
          to insure a separate accounting file for each printer is to use
3529
          <literal>af=acct</literal> in <filename>/etc/printcap</filename>.
3530
          <literal>af=acct</literal> in <filename>/etc/printcap</filename>.
3530
          Then, each accounting file will be in the spooling directory for a
3531
          Then, each accounting file will be in the spooling directory for a
3531
          printer, in a file named <filename>acct</filename>.</para>
3532
          printer, in a file named <filename>acct</filename>.</para>
Lines 3821-3827 Link Here
3821
3822
3822
	<screen>&prompt.user; <userinput>lpq -P bamboo</userinput></screen>
3823
	<screen>&prompt.user; <userinput>lpq -P bamboo</userinput></screen>
3823
3824
3824
	shows the queue for the printer named <hostid>bamboo</hostid>.  Here
3825
	shows the queue for the printer named <literal>bamboo</literal>.  Here
3825
	is an example of the output of the <command>lpq</command>
3826
	is an example of the output of the <command>lpq</command>
3826
	command:</para>
3827
	command:</para>
3827
	    
3828
	    
Lines 3845-3851 Link Here
3845
	be currently printing that job.  The second job consists of data
3846
	be currently printing that job.  The second job consists of data
3846
	passed as the standard input to the &man.lpr.1; command.  The third
3847
	passed as the standard input to the &man.lpr.1; command.  The third
3847
	  job came from user <username>mary</username>; it is a much larger
3848
	  job came from user <username>mary</username>; it is a much larger
3848
	  job. The pathname of the files she's trying to print is too long to
3849
	  job. The pathname of the file she is trying to print is too long to
3849
	  fit, so the &man.lpq.1; command just shows three dots.</para>
3850
	  fit, so the &man.lpq.1; command just shows three dots.</para>
3850
3851
3851
      <para>The very first line of the output from &man.lpq.1; is also useful:
3852
      <para>The very first line of the output from &man.lpq.1; is also useful:
Lines 3883-3889 Link Here
3883
	    
3884
	    
3884
      <para>To remove the job from a specific printer, add the
3885
      <para>To remove the job from a specific printer, add the
3885
	<option>-P</option> option.  The following command removes job number
3886
	<option>-P</option> option.  The following command removes job number
3886
	10 from the queue for the printer <hostid>bamboo</hostid>:</para>
3887
	10 from the queue for the printer <literal>bamboo</literal>:</para>
3887
	    
3888
	    
3888
      <screen>&prompt.user; <userinput>lprm -P bamboo 10</userinput></screen>
3889
      <screen>&prompt.user; <userinput>lprm -P bamboo 10</userinput></screen>
3889
      
3890
      
Lines 4277-4283 Link Here
4277
	to get printer status and to restart a hung printer only.</para>
4278
	to get printer status and to restart a hung printer only.</para>
4278
4279
4279
      <para>Here is a summary of the &man.lpc.8; commands.  Most of the
4280
      <para>Here is a summary of the &man.lpc.8; commands.  Most of the
4280
	commands takes a <replaceable>printer-name</replaceable> argument to
4281
	commands take a <replaceable>printer-name</replaceable> argument to
4281
	tell on which printer to operate.  You can use <literal>all</literal>
4282
	tell on which printer to operate.  You can use <literal>all</literal>
4282
	for the <replaceable>printer-name</replaceable> to mean all printers
4283
	for the <replaceable>printer-name</replaceable> to mean all printers
4283
	listed in <filename>/etc/printcap</filename>.</para>
4284
	listed in <filename>/etc/printcap</filename>.</para>
Lines 4289-4295 Link Here
4289
4290
4290
	  <listitem>
4291
	  <listitem>
4291
	    <para>Cancel the current job and stop the printer.  Users can
4292
	    <para>Cancel the current job and stop the printer.  Users can
4292
	      still submit jobs if the queue's enabled.</para>
4293
	      still submit jobs if the queue is enabled.</para>
4293
	  </listitem>
4294
	  </listitem>
4294
	</varlistentry>
4295
	</varlistentry>
4295
4296
Lines 4312-4318 Link Here
4312
	      <replaceable>printer-name</replaceable></command></term>
4313
	      <replaceable>printer-name</replaceable></command></term>
4313
	  
4314
	  
4314
	  <listitem>
4315
	  <listitem>
4315
	    <para>Disable queuing of new jobs.  If the printer's started, it
4316
	    <para>Disable queuing of new jobs.  If the printer is running, it
4316
	      will continue to print any jobs remaining in the queue.  The
4317
	      will continue to print any jobs remaining in the queue.  The
4317
	      superuser (root) can always submit jobs, even to a disabled
4318
	      superuser (root) can always submit jobs, even to a disabled
4318
	      queue.</para>
4319
	      queue.</para>
Lines 4608-4616 Link Here
4608
exit 2</programlisting>
4609
exit 2</programlisting>
4609
4610
4610
	      <para>Here is an example <filename>/etc/printcap</filename>
4611
	      <para>Here is an example <filename>/etc/printcap</filename>
4611
		from a host called orchid.  It has a single printer
4612
		from a host called <hostid>orchid</hostid>.  It has a single printer
4612
		attached to its first parallel port, a Hewlett Packard
4613
		attached to its first parallel port, a Hewlett Packard
4613
		LaserJet 3Si named <hostid>teak</hostid>.  It is using the
4614
		LaserJet 3Si named <literal>teak</literal>.  It is using the
4614
		above script as its text filter:</para>
4615
		above script as its text filter:</para>
4615
4616
4616
	      <programlisting>#
4617
	      <programlisting>#

Return to bug 29729