<ulink url="...man.cgi?...">...</ulink> -> <citerefentry>...</citerefentry>

This commit is contained in:
Nik Clayton 1998-08-25 09:06:27 +00:00
parent bab9c37eab
commit 775d061074
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3413
4 changed files with 590 additions and 501 deletions

View file

@ -323,3 +323,8 @@ for example,
and near it. Most of the time this consisted of replacing the <emphasis> and near it. Most of the time this consisted of replacing the <emphasis>
with <replaceable> or <userinput>. with <replaceable> or <userinput>.
29. Fixed up more references to manpages that used <ulink> to use
<citerefentry>. These were missed at step 24 because they didn't
include a section number. No references to man.cgi now exist in
handbook.sgml.

View file

@ -6989,8 +6989,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with the <ulink <para>Become root with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink> <refentrytitle>su</refentrytitle></citerefentry>
command. Enter the root password when prompted. command. Enter the root password when prompted.
</para> </para>
</listitem> </listitem>
@ -7066,8 +7066,8 @@
works.</para> works.</para>
<para>You can set the communications mode in two ways: by <para>You can set the communications mode in two ways: by
configuring the kernel or by using the <ulink configuring the kernel or by using the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptcontrol">lptcontrol</ulink></para> <refentrytitle>lptcontrol</refentrytitle></citerefentry></para>
<para>program.</para> <para>program.</para>
@ -7120,8 +7120,8 @@
</para> </para>
<para><emphasis remap=bf>To set the communications mode <para><emphasis remap=bf>To set the communications mode
with</emphasis> <ulink with</emphasis> <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptcontrol">lptcontrol</ulink>: <refentrytitle>lptcontrol</refentrytitle></citerefentry>:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -7159,8 +7159,8 @@
<para>To test the printer, we will send some text to it. For <para>To test the printer, we will send some text to it. For
printers that can immediately print characters sent to them, printers that can immediately print characters sent to them,
the program <ulink the program <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> is perfect: it generates all 96 printable ASCII characters in 96 lines.</para> <refentrytitle>lptest</refentrytitle></citerefentry> is perfect: it generates all 96 printable ASCII characters in 96 lines.</para>
<para>For a PostScript (or other language-based) printer, we <para>For a PostScript (or other language-based) printer, we
will need a more sophisticated test. A small PostScript will need a more sophisticated test. A small PostScript
@ -7195,8 +7195,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with <ulink <para>Become root with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink>.</para> <refentrytitle>su</refentrytitle></citerefentry>.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -7205,8 +7205,8 @@
<listitem> <listitem>
<para>If the printer can print plain text, then <para>If the printer can print plain text, then
use <ulink use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. Type: <refentrytitle>lptest</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen><userinput>lptest &gt; <screen><userinput>lptest &gt;
/dev/lpt<replaceable>N</replaceable></userinput></screen> /dev/lpt<replaceable>N</replaceable></userinput></screen>
@ -7267,8 +7267,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with <ulink <para>Become root with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink>. <refentrytitle>su</refentrytitle></citerefentry>.
</para> </para>
</listitem> </listitem>
@ -7295,8 +7295,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Connect to the printer with <ulink <para>Connect to the printer with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?tip">tip</ulink>. Type: <refentrytitle>tip</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen>tip printer</screen> <screen>tip printer</screen>
</informalexample> If this step does not work, edit </informalexample> If this step does not work, edit
@ -7312,8 +7312,8 @@
<listitem> <listitem>
<para>If the printer can print plain text, then <para>If the printer can print plain text, then
use <ulink use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. Type: <refentrytitle>lptest</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen>~$lptest</screen> <screen>~$lptest</screen>
</informalexample> </informalexample>
@ -7375,8 +7375,8 @@
reads this file each time the spooler is used, so updates to the reads this file each time the spooler is used, so updates to the
file take immediate effect.</para> file take immediate effect.</para>
<para>The format of the <ulink <para>The format of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?printcap">printcap</ulink> file is straightforward. Use your favorite text editor to make changes to <filename>/etc/printcap</filename>. The format is identical to other capability files like <filename>/usr/share/misc/termcap</filename> and <filename>/etc/remote</filename>. For complete information about the format, see the <citerefentry><refentrytitle>cgetent</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> <refentrytitle>printcap</refentrytitle></citerefentry> file is straightforward. Use your favorite text editor to make changes to <filename>/etc/printcap</filename>. The format is identical to other capability files like <filename>/usr/share/misc/termcap</filename> and <filename>/etc/remote</filename>. For complete information about the format, see the <citerefentry><refentrytitle>cgetent</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>The simple spooler configuration consists of the following <para>The simple spooler configuration consists of the following
steps: steps:
@ -7431,8 +7431,9 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Test the setup by printing something with the <ulink <para>Test the setup by printing something with the
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <citerefentry>
<refentrytitle>lpr</refentrytitle></citerefentry>
command; see <xref linkend="printing-trying" remap="Trying command; see <xref linkend="printing-trying" remap="Trying
It Out"> and <xref linkend="printing-troubleshooting" It Out"> and <xref linkend="printing-troubleshooting"
remap="Troubleshooting">.</para> remap="Troubleshooting">.</para>
@ -7557,8 +7558,8 @@
is customary to put these directories under is customary to put these directories under
<filename>/var/spool</filename>. It is not necessary to <filename>/var/spool</filename>. It is not necessary to
backup the contents of spooling directories, either. backup the contents of spooling directories, either.
Recreating them is as simple as running <ulink Recreating them is as simple as running <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?mkdir">mkdir</ulink>.</para> <refentrytitle>mkdir</refentrytitle></citerefentry>.</para>
<para>It is also customary to make the directory with a name <para>It is also customary to make the directory with a name
that is identical to the name of the printer, as shown below: that is identical to the name of the printer, as shown below:
@ -7846,14 +7847,14 @@
Unfortunately, congratulations are not quite yet in order, Unfortunately, congratulations are not quite yet in order,
since we still have to test the setup and correct any since we still have to test the setup and correct any
problems. To test the setup, try printing something. To problems. To test the setup, try printing something. To
print with the LPD system, you use the command <ulink print with the LPD system, you use the command <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <refentrytitle>lpr</refentrytitle></citerefentry>,
which submits a job for printing.</para> which submits a job for printing.</para>
<para>You can combine <ulink <para>You can combine <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
with the <ulink with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> program, introduced in section <xref linkend="printing-testing" <refentrytitle>lptest</refentrytitle></citerefentry> program, introduced in section <xref linkend="printing-testing"
remap="Checking Printer Communications"> to generate some remap="Checking Printer Communications"> to generate some
test text.</para> test text.</para>
@ -7867,16 +7868,16 @@
</informalexample> where <emphasis </informalexample> where <emphasis
remap=it>printer-name</emphasis> is a the name of a printer remap=it>printer-name</emphasis> is a the name of a printer
(or an alias) specified in <filename>/etc/printcap</filename>. (or an alias) specified in <filename>/etc/printcap</filename>.
To test the default printer, type <ulink To test the default printer, type <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
without any <option>-P</option> argument. Again, if you are without any <option>-P</option> argument. Again, if you are
testing a printer that expects PostScript, send a PostScript testing a printer that expects PostScript, send a PostScript
program in that language instead of using <ulink program in that language instead of using <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. You can do so by putting the program in a file and typing <emphasis remap=tt>lpr <replaceable>file</replaceable></emphasis>.</para> <refentrytitle>lptest</refentrytitle></citerefentry>. You can do so by putting the program in a file and typing <emphasis remap=tt>lpr <replaceable>file</replaceable></emphasis>.</para>
<para>For a PostScript printer, you should get the results of <para>For a PostScript printer, you should get the results of
the program. If you are using <ulink the program. If you are using <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>, then your results should look like the following:</para> <refentrytitle>lptest</refentrytitle></citerefentry>, then your results should look like the following:</para>
<para> <para>
<informalexample> <informalexample>
@ -7889,8 +7890,8 @@
<para>To further test the printer, try downloading larger <para>To further test the printer, try downloading larger
programs (for language-based printers) or running</para> programs (for language-based printers) or running</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> with different arguments. For example, <command>lptest 80 60</command> will produce 60 lines of 80 characters each.</para> <refentrytitle>lptest</refentrytitle></citerefentry> with different arguments. For example, <command>lptest 80 60</command> will produce 60 lines of 80 characters each.</para>
<para>If the printer did not work, see the next section, <xref <para>If the printer did not work, see the next section, <xref
linkend="printing-troubleshooting" linkend="printing-troubleshooting"
@ -7902,8 +7903,8 @@
id="printing-troubleshooting"> id="printing-troubleshooting">
<title>Troubleshooting</title> <title>Troubleshooting</title>
<para> After performing the simple test with <ulink <para> After performing the simple test with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>, you might have gotten one of the following results instead of the correct printout: <refentrytitle>lptest</refentrytitle></citerefentry>, you might have gotten one of the following results instead of the correct printout:
<variablelist> <variablelist>
<varlistentry><term>It worked, after awhile; or, it did not <varlistentry><term>It worked, after awhile; or, it did not
eject a full sheet.</term> eject a full sheet.</term>
@ -8198,23 +8199,23 @@
<para> This section tells you how to use printers you have setup with <para> This section tells you how to use printers you have setup with
FreeBSD. Here is an overview of the user-level commands: FreeBSD. Here is an overview of the user-level commands:
<variablelist> <variablelist>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink></term> <refentrytitle>lpr</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Print jobs</para> <para>Print jobs</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink></term> <refentrytitle>lpq</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Check printer queues</para> <para>Check printer queues</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink></term> <refentrytitle>lprm</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Remove jobs from a printer's queue</para> <para>Remove jobs from a printer's queue</para>
@ -8223,16 +8224,17 @@
</variablelist> </variablelist>
</para> </para>
<para>There is also an administrative command, <ulink <para>There is also an administrative command, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink>, <refentrytitle>lpc</refentrytitle></citerefentry>,
described in the section <xref linkend="printing-lpc" described in the section <xref linkend="printing-lpc"
remap="Administrating the remap="Administrating the
LPD Spooler">, used to control printers and their queues.</para> LPD Spooler">, used to control printers and their queues.</para>
<para>All three of the commands <ulink <para>All three of the commands <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <ulink <refentrytitle>lpr</refentrytitle></citerefentry>, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink>, and <refentrytitle>lprm</refentrytitle></citerefentry>, and
<ulink URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry>
accept an option <option>-P</option> <emphasis accept an option <option>-P</option> <emphasis
remap=it>printer-name</emphasis> to specify on which remap=it>printer-name</emphasis> to specify on which
printer/queue to operate, as listed in the printer/queue to operate, as listed in the
@ -8259,8 +8261,8 @@
<screen><userinput>lpr <screen><userinput>lpr
<replaceable>filename...</replaceable></userinput></screen> <replaceable>filename...</replaceable></userinput></screen>
</informalexample> This prints each of the listed files to the </informalexample> This prints each of the listed files to the
default printer. If you list no files, <ulink default printer. If you list no files, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> reads <refentrytitle>lpr</refentrytitle></citerefentry> reads
data to print from standard input. For example, this command data to print from standard input. For example, this command
prints some important system files: prints some important system files:
<informalexample> <informalexample>
@ -8273,14 +8275,15 @@
current directory to the printer named <hostid>rattan</hostid>: current directory to the printer named <hostid>rattan</hostid>:
<informalexample> <informalexample>
<screen>ls -l | lpr -P rattan</screen> <screen>ls -l | lpr -P rattan</screen>
</informalexample> Because no files were listed for the <ulink </informalexample> Because no files were listed for the
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <citerefentry>
<refentrytitle>lpr</refentrytitle></citerefentry>
command, <command>lpr</command> read the data to print command, <command>lpr</command> read the data to print
from standard input, which was the output of the <command>ls from standard input, which was the output of the <command>ls
-l</command> command.</para> -l</command> command.</para>
<para>The <ulink <para>The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
can also accept a wide variety of options to control formatting, can also accept a wide variety of options to control formatting,
apply file conversions, generate multiple copies, and so forth. apply file conversions, generate multiple copies, and so forth.
For more information, see the section <xref For more information, see the section <xref
@ -8293,8 +8296,8 @@
id="printing-lpq"> id="printing-lpq">
<title>Checking Jobs</title> <title>Checking Jobs</title>
<para> When you print with <ulink <para> When you print with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, the <refentrytitle>lpr</refentrytitle></citerefentry>, the
data you wish to print is put together in a package called a data you wish to print is put together in a package called a
<emphasis>print job</emphasis>, which is sent to the LPD spooling <emphasis>print job</emphasis>, which is sent to the LPD spooling
system. Each printer has a queue of jobs, and your job waits in system. Each printer has a queue of jobs, and your job waits in
@ -8302,8 +8305,9 @@
users. The printer prints those jobs in a first-come, first-served users. The printer prints those jobs in a first-come, first-served
order.</para> order.</para>
<para>To display the queue for the default printer, type <ulink <para>To display the queue for the default printer, type
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink>. For a <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry>. For a
specific printer, use the <option>-P</option> option. For specific printer, use the <option>-P</option> option. For
example, the command example, the command
<informalexample> <informalexample>
@ -8326,29 +8330,29 @@
details.</para> details.</para>
<para>Job number nine consists of two files; multiple files given on <para>Job number nine consists of two files; multiple files given on
the <ulink the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
line are treated as part of a single job. It is the currently line are treated as part of a single job. It is the currently
active job (note the word <literal>active</literal> active job (note the word <literal>active</literal>
under the <quote>Rank</quote> column), which means the printer should be under the <quote>Rank</quote> column), which means the printer should be
currently printing that job. The second job consists of data currently printing that job. The second job consists of data
passed as the standard input to the</para> passed as the standard input to the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command. The third job came from user mary; it is a much larger command. The third job came from user mary; it is a much larger
job. The pathname of the files she's trying to print is too long job. The pathname of the files she's trying to print is too long
to fit, so the <ulink to fit, so the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> command <refentrytitle>lpq</refentrytitle></citerefentry> command
just shows three dots.</para> just shows three dots.</para>
<para>The very first line of the output from <ulink <para>The very first line of the output from <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> is also <refentrytitle>lpq</refentrytitle></citerefentry> is also
useful: it tells what the printer is currently doing (or at least useful: it tells what the printer is currently doing (or at least
what LPD thinks the printer is doing).</para> what LPD thinks the printer is doing).</para>
<para>The <ulink <para>The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> command <refentrytitle>lpq</refentrytitle></citerefentry> command
also support a <option>-l</option> option to generate a detailed also support a <option>-l</option> option to generate a detailed
long listing. Here is an example of <command>lpq -l</command>: long listing. Here is an example of <command>lpq -l</command>:
<informalexample> <informalexample>
@ -8370,15 +8374,16 @@
<title>Removing Jobs</title> <title>Removing Jobs</title>
<para> If you change your mind about printing a job, you can remove <para> If you change your mind about printing a job, you can remove
the job from the queue with the <ulink the job from the queue with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
command. Often, you can even use <ulink command. Often, you can even use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> to <refentrytitle>lprm</refentrytitle></citerefentry> to
remove an active job, but some or all of the job might still get remove an active job, but some or all of the job might still get
printed.</para> printed.</para>
<para>To remove a job from the default printer, first use <ulink <para>To remove a job from the default printer, first use
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> to find <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry> to find
the job number. Then type the job number. Then type
<informalexample> <informalexample>
<screen><userinput>lprm <screen><userinput>lprm
@ -8388,8 +8393,8 @@
number 10 from the queue for the printer <hostid>bamboo</hostid>: number 10 from the queue for the printer <hostid>bamboo</hostid>:
<informalexample> <informalexample>
<screen>lprm -P bamboo 10</screen> <screen>lprm -P bamboo 10</screen>
</informalexample> The <ulink </informalexample> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
command has a few shortcuts: command has a few shortcuts:
<variablelist> <variablelist>
<varlistentry><term>lprm -</term> <varlistentry><term>lprm -</term>
@ -8415,8 +8420,8 @@
<listitem> <listitem>
<para>With no job number, user name, or <para>With no job number, user name, or
<option>-</option> appearing on the command line, <option>-</option> appearing on the command line,
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> removes the currently active job on the default printer, if it belongs to you. The superuser can remove any active job.</para> <refentrytitle>lprm</refentrytitle></citerefentry> removes the currently active job on the default printer, if it belongs to you. The superuser can remove any active job.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -8438,8 +8443,8 @@
<para>If you are working in a networked <para>If you are working in a networked
environment,</para> environment,</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
will let you remove jobs only from the host from which the jobs will let you remove jobs only from the host from which the jobs
were submitted, even if the same printer is available from other were submitted, even if the same printer is available from other
hosts. The following command sequence demonstrates this: hosts. The following command sequence demonstrates this:
@ -8460,8 +8465,8 @@
id="printing-lpr-options"> id="printing-lpr-options">
<title>Beyond Plain Text: Printing Options</title> <title>Beyond Plain Text: Printing Options</title>
<para> The <ulink <para> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
supports a number of options that control formatting text, supports a number of options that control formatting text,
converting graphic and other file formats, producing multiple converting graphic and other file formats, producing multiple
copies, handling of the job, and more. This section describes the copies, handling of the job, and more. This section describes the
@ -8472,12 +8477,12 @@
id="printing-lpr-options-format"> id="printing-lpr-options-format">
<title>Formatting and Conversion Options</title> <title>Formatting and Conversion Options</title>
<para> The following <ulink <para> The following <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
options control formatting of the files in the job. Use these options control formatting of the files in the job. Use these
options if the job does not contain plain text or if you want options if the job does not contain plain text or if you want
plain text formatted through the <ulink plain text formatted through the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
utility.</para> utility.</para>
<para>For example, the following command prints a DVI file (from <para>For example, the following command prints a DVI file (from
@ -8565,8 +8570,8 @@
<varlistentry><term>-p</term> <varlistentry><term>-p</term>
<listitem> <listitem>
<para>Format plain text with <ulink <para>Format plain text with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
before printing. See <citerefentry><refentrytitle>pr</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more information.</para> before printing. See <citerefentry><refentrytitle>pr</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more information.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -8576,8 +8581,8 @@
<listitem> <listitem>
<para>Use <emphasis remap=it>title</emphasis> on the <para>Use <emphasis remap=it>title</emphasis> on the
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
header instead of the file name. This option has effect header instead of the file name. This option has effect
only when used with the <option>-p</option> only when used with the <option>-p</option>
option.</para> option.</para>
@ -8601,28 +8606,28 @@
</para> </para>
<para>Here is an example: this command prints a nicely formatted <para>Here is an example: this command prints a nicely formatted
version of the <ulink version of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?ls">ls</ulink> manual <refentrytitle>ls</refentrytitle></citerefentry> manual
page on the default printer: page on the default printer:
<informalexample> <informalexample>
<screen>zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr <screen>zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr
-t</screen> -t</screen>
</informalexample> The <ulink </informalexample> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?zcat">zcat</ulink> <refentrytitle>zcat</refentrytitle></citerefentry>
command uncompresses the source of the</para> command uncompresses the source of the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?ls">ls</ulink> manual <refentrytitle>ls</refentrytitle></citerefentry> manual
page and passes it to the <ulink page and passes it to the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?troff">troff</ulink> <refentrytitle>troff</refentrytitle></citerefentry>
command, which formats that source and makes GNU troff output command, which formats that source and makes GNU troff output
and passes it to <ulink and passes it to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <refentrytitle>lpr</refentrytitle></citerefentry>,
which submits the job to the LPD spooler. Because we used the which submits the job to the LPD spooler. Because we used the
<option>-t</option> option to</para> <option>-t</option> option to</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, the <refentrytitle>lpr</refentrytitle></citerefentry>, the
spooler will convert the GNU troff output into a format the spooler will convert the GNU troff output into a format the
default printer can understand when it prints the job.</para> default printer can understand when it prints the job.</para>
@ -8632,8 +8637,8 @@
id="printing-lpr-options-job-handling"> id="printing-lpr-options-job-handling">
<title>Job Handling Options</title> <title>Job Handling Options</title>
<para> The following options to <ulink <para> The following options to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> tell <refentrytitle>lpr</refentrytitle></citerefentry> tell
LPD to handle the job specially:</para> LPD to handle the job specially:</para>
<para> <para>
@ -8717,8 +8722,8 @@
id="printing-lpr-options-misc"> id="printing-lpr-options-misc">
<title>Header Page Options</title> <title>Header Page Options</title>
<para> These options to <ulink <para> These options to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
adjust the text that normally appears on a job's header page. adjust the text that normally appears on a job's header page.
If header pages are suppressed for the destination printer, If header pages are suppressed for the destination printer,
these options have no effect. See section <xref these options have no effect. See section <xref
@ -8772,13 +8777,13 @@
<title>Administrating Printers</title> <title>Administrating Printers</title>
<para> As an administrator for your printers, you have had to <para> As an administrator for your printers, you have had to
install, set up, and test them. Using the <ulink install, set up, and test them. Using the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
command, you can interact with your printers in yet more ways. command, you can interact with your printers in yet more ways.
With</para> With</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink>, you <refentrytitle>lpc</refentrytitle></citerefentry>, you
can</para> can</para>
<para> <para>
@ -8816,14 +8821,14 @@
<para>In general, you have to have root privileges to use the</para> <para>In general, you have to have root privileges to use the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
command. Ordinary users can use the <ulink command. Ordinary users can use the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> command <refentrytitle>lpc</refentrytitle></citerefentry> command
to get printer status and to restart a hung printer only.</para> to get printer status and to restart a hung printer only.</para>
<para>Here is a summary of the <ulink <para>Here is a summary of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
commands. Most of the commands takes a <emphasis commands. Most of the commands takes a <emphasis
remap=it>printer-name</emphasis> argument to tell on which remap=it>printer-name</emphasis> argument to tell on which
printer to operate. You can use <literal>all</literal> printer to operate. You can use <literal>all</literal>
@ -8879,8 +8884,8 @@
<para>Take a printer down. Equivalent to <command>disable</command> followed by <command>stop</command>. The <emphasis <para>Take a printer down. Equivalent to <command>disable</command> followed by <command>stop</command>. The <emphasis
remap=it>message</emphasis> appears as the printer's remap=it>message</emphasis> appears as the printer's
status whenever a user checks the printer's queue with status whenever a user checks the printer's queue with
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> <refentrytitle>lpq</refentrytitle></citerefentry>
or status with <command>lpc or status with <command>lpc
status</command>.</para> status</command>.</para>
</listitem> </listitem>
@ -8966,11 +8971,11 @@
</variablelist> </variablelist>
</para> </para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> accepts <refentrytitle>lpc</refentrytitle></citerefentry> accepts
the above commands on the command line. If you do not enter any the above commands on the command line. If you do not enter any
commands, <ulink commands, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> enters <refentrytitle>lpc</refentrytitle></citerefentry> enters
an interactive mode, where you can enter commands until you type an interactive mode, where you can enter commands until you type
<command>exit</command>, <command>quit</command>, or end-of-file.</para> <command>exit</command>, <command>quit</command>, or end-of-file.</para>
@ -9118,8 +9123,8 @@
what is listed in the <filename>/etc/printcap</filename> file what is listed in the <filename>/etc/printcap</filename> file
and what arguments the user specified for the job on the</para> and what arguments the user specified for the job on the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command line. For example, if the user typed <command>lpr command line. For example, if the user typed <command>lpr
-t</command>, LPD would start the troff filter, listed in the -t</command>, LPD would start the troff filter, listed in the
<emphasis remap=tt>tf</emphasis> capability for the destination <emphasis remap=tt>tf</emphasis> capability for the destination
@ -9384,8 +9389,8 @@
text-to-PostScript program you wish. The FreeBSD ports text-to-PostScript program you wish. The FreeBSD ports
collection (see <xref linkend="ports" remap="The Ports collection (see <xref linkend="ports" remap="The Ports
Collection">) includes a full featured text-to-PostScript Collection">) includes a full featured text-to-PostScript
program called <ulink program called <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=a2ps">a2ps</ulink> that you might want to investigate.</para> <refentrytitle>a2ps</refentrytitle></citerefentry> that you might want to investigate.</para>
</sect3> </sect3>
@ -9420,8 +9425,8 @@
for Hewlett Packard DeskJet 500 printers. For other printers, for Hewlett Packard DeskJet 500 printers. For other printers,
substitute the <option>-sDEVICE</option> argument to the</para> substitute the <option>-sDEVICE</option> argument to the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=gs">gs</ulink> (Ghostscript) command. (Type <command>gs -h</command> to get a list of devices the current installation of Ghostscript supports.) <refentrytitle>gs</refentrytitle></citerefentry> (Ghostscript) command. (Type <command>gs -h</command> to get a list of devices the current installation of Ghostscript supports.)
<informalexample> <informalexample>
<programlisting>#!/bin/sh # # ifhp - Print <programlisting>#!/bin/sh # # ifhp - Print
Ghostscript-simulated PostScript on a DeskJet 500 # Ghostscript-simulated PostScript on a DeskJet 500 #
@ -9571,8 +9576,8 @@
Invoked by lpd when user runs lpr -d # exec Invoked by lpd when user runs lpr -d # exec
/usr/local/bin/dvips -f | /usr/local/libexec/lprps /usr/local/bin/dvips -f | /usr/local/libexec/lprps
"$@"</programlisting> "$@"</programlisting>
</informalexample> This script runs <ulink </informalexample> This script runs <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvips">dvips</ulink> in filter mode (the <option>-f</option> argument) on standard input, which is the job to print. It then starts the PostScript printer filter <command>lprps</command> (see section <xref linkend="printing-advanced-if-conversion" <refentrytitle>dvips</refentrytitle></citerefentry> in filter mode (the <option>-f</option> argument) on standard input, which is the job to print. It then starts the PostScript printer filter <command>lprps</command> (see section <xref linkend="printing-advanced-if-conversion"
remap="Accommodating Plain Text Jobs on PostScript remap="Accommodating Plain Text Jobs on PostScript
Printers">) with the arguments LPD passed to this script. Printers">) with the arguments LPD passed to this script.
<command>lprps</command> will use those arguments <command>lprps</command> will use those arguments
@ -9664,11 +9669,26 @@
<para>Now, for the hard part: making the filter. For that, we <para>Now, for the hard part: making the filter. For that, we
need a DVI-to-LaserJet/PCL conversion program. The FreeBSD need a DVI-to-LaserJet/PCL conversion program. The FreeBSD
ports collection (see <xref linkend="ports" remap="The ports collection (see <xref linkend="ports" remap="The
Ports Collection">) has one: <ulink Ports Collection">) has one: <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvi2xx">dvi2xx</ulink> is the name of the package. Installing this package gives us the program we need, <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink>, which converts DVI into LaserJet IIp, LaserJet III, and LaserJet 2000 compatible codes.</para> <refentrytitle>dvi2xx</refentrytitle></citerefentry> is the
name of the package. Installing this package gives us the
program we need, <citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry>, which converts DVI into LaserJet IIp, LaserJet III, and LaserJet 2000 compatible codes.</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> makes the filter <command>hpdf</command> quite complex since <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> cannot read from standard input. It wants to work with a filename. What is worse, the filename has to end in <filename>.dvi</filename> so using <filename>/dev/fd/0</filename> for standard input is problematic. We can get around that problem by linking (symbolically) a temporary file name (one that ends in <filename>.dvi</filename>) to <filename>/dev/fd/0</filename>, thereby forcing <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> to read from standard input.</para> <refentrytitle>dvilj2p</refentrytitle></citerefentry> makes
the filter <command>hpdf</command> quite complex since
<citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry> cannot
read from standard input. It wants to work with a filename.
What is worse, the filename has to end in
<filename>.dvi</filename> so using
<filename>/dev/fd/0</filename> for standard input is
problematic. We can get around that problem by linking
(symbolically) a temporary file name (one that ends in
<filename>.dvi</filename>) to <filename>/dev/fd/0</filename>,
thereby forcing <citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry> to read from standard input.</para>
<para>The only other fly in the ointment is the fact that we <para>The only other fly in the ointment is the fact that we
cannot use <filename>/tmp</filename> for the temporary link. cannot use <filename>/tmp</filename> for the temporary link.
@ -9724,8 +9744,8 @@
<para> All these conversion filters accomplish a lot for your <para> All these conversion filters accomplish a lot for your
printing environment, but at the cost forcing the user to printing environment, but at the cost forcing the user to
specify (on the <ulink specify (on the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command line) which one to use. If your users are not command line) which one to use. If your users are not
particularly computer literate, having to specify a filter particularly computer literate, having to specify a filter
option will become annoying. What is worse, though, is that option will become annoying. What is worse, though, is that
@ -9743,8 +9763,8 @@
you can still provide conversion filters just for them.</para> you can still provide conversion filters just for them.</para>
<para>The FreeBSD ports collection has a text filter that <para>The FreeBSD ports collection has a text filter that
performs automatic conversion called <ulink performs automatic conversion called <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=apsfilter">apsfilter</ulink>. It can detect plain text, PostScript, and DVI files, run the proper conversions, and print.</para> <refentrytitle>apsfilter</refentrytitle></citerefentry>. It can detect plain text, PostScript, and DVI files, run the proper conversions, and print.</para>
</sect4> </sect4>
</sect3> </sect3>
@ -9939,8 +9959,8 @@
they can suppress header pages by submitting the job with they can suppress header pages by submitting the job with
<command>lpr -h</command>; see <xref <command>lpr -h</command>; see <xref
linkend="printing-lpr-options-misc" remap="Header Page linkend="printing-lpr-options-misc" remap="Header Page
Options"> for more <ulink Options"> for more <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
options.</para> options.</para>
<note> <note>
@ -10439,8 +10459,8 @@
<para>If you feel multiple copies cause unnecessary wear and tear <para>If you feel multiple copies cause unnecessary wear and tear
on your printers, you can disable the <option>-#</option> option on your printers, you can disable the <option>-#</option> option
to <ulink to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> by <refentrytitle>lpr</refentrytitle></citerefentry> by
adding the <emphasis remap=tt>sc</emphasis> capability to the adding the <emphasis remap=tt>sc</emphasis> capability to the
<filename>/etc/printcap</filename> file. When users submit jobs <filename>/etc/printcap</filename> file. When users submit jobs
with the <option>-#</option> option, they will see with the <option>-#</option> option, they will see
@ -10491,8 +10511,8 @@
:lp=:rm=rose:rp=bamboo:sd=/var/spool/lpd/bamboo:sc:</programlisting> :lp=:rm=rose:rp=bamboo:sd=/var/spool/lpd/bamboo:sc:</programlisting>
</informalexample> By using the <emphasis remap=tt>sc</emphasis> </informalexample> By using the <emphasis remap=tt>sc</emphasis>
capability, we prevent the use of <command>lpr -#</command>, but capability, we prevent the use of <command>lpr -#</command>, but
that still does not prevent users from running <ulink that still does not prevent users from running <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
multiple times, or from submitting the same file multiple times multiple times, or from submitting the same file multiple times
in one job like this: in one job like this:
<informalexample> <informalexample>
@ -10633,7 +10653,11 @@
<para>The format of these files is simple: one host name <para>The format of these files is simple: one host name
per line. Note that the file per line. Note that the file
<filename>/etc/hosts.equiv</filename> is also used by <filename>/etc/hosts.equiv</filename> is also used by
the <citerefentry><refentrytitle>ruserok</refentrytitle><manvolnum>3</manvolnum></citerefentry> protocol, and affects programs like <ulink URL="http://www.freebsd.org/cgi/man.cgi?rsh">rsh</ulink> and <ulink URL="http://www.freebsd.org/cgi/man.cgi?rcp">rcp</ulink>, so be careful.</para> the
<citerefentry><refentrytitle>ruserok</refentrytitle><manvolnum>3</manvolnum></citerefentry> protocol, and affects programs like <citerefentry>
<refentrytitle>rsh</refentrytitle></citerefentry> and
<citerefentry>
<refentrytitle>rcp</refentrytitle></citerefentry>, so be careful.</para>
<para>For example, here is the <para>For example, here is the
<filename>/etc/hosts.lpd</filename> file on the host <filename>/etc/hosts.lpd</filename> file on the host
@ -10802,8 +10826,8 @@
<xref linkend="printing-advanced-lpf" remap="lpf: a Text <xref linkend="printing-advanced-lpf" remap="lpf: a Text
Filter">, and</para> Filter">, and</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink>, a <refentrytitle>pac</refentrytitle></citerefentry>, a
program to gather and total entries from printer accounting program to gather and total entries from printer accounting
files.</para> files.</para>
@ -10839,11 +10863,11 @@
<para>When you are ready to charge users for printouts, run <para>When you are ready to charge users for printouts, run
the</para> the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
program. Just change to the spooling directory for the printer program. Just change to the spooling directory for the printer
you want to collect on and type <ulink you want to collect on and type <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink>. You <refentrytitle>pac</refentrytitle></citerefentry>. You
will get a dollar-centric summary like the following: will get a dollar-centric summary like the following:
<informalexample> <informalexample>
<programlisting> Login pages/feet runs <programlisting> Login pages/feet runs
@ -10854,8 +10878,8 @@
rose:mary 87.00 32 $ 1.74 rose:root rose:mary 87.00 32 $ 1.74 rose:root
26.00 12 $ 0.52 total 337.00 154 26.00 12 $ 0.52 total 337.00 154
$ 6.74</programlisting> $ 6.74</programlisting>
</informalexample> These are the arguments <ulink </informalexample> These are the arguments <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
expects: expects:
<variablelist> <variablelist>
<varlistentry><term><option>-P<replaceable>printer</replaceable></option></term> <varlistentry><term><option>-P<replaceable>printer</replaceable></option></term>
@ -10926,8 +10950,8 @@
</variablelist> </variablelist>
</para> </para>
<para>In the default summary that <ulink <para>In the default summary that <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
produces, you see the number of pages printed by each user from produces, you see the number of pages printed by each user from
various hosts. If, at your site, host does not matter (because various hosts. If, at your site, host does not matter (because
users can use any host), run <command>pac -m</command>, to users can use any host), run <command>pac -m</command>, to
@ -10939,14 +10963,16 @@
$ 2.36 root 26.00 12 $ 0.52 $ 2.36 root 26.00 12 $ 0.52
zhang 9.00 1 $ 0.18 total zhang 9.00 1 $ 0.18 total
337.00 154 $ 6.74</programlisting> 337.00 154 $ 6.74</programlisting>
</informalexample> To compute the dollar amount due, <ulink </informalexample> To compute the dollar amount due,
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> uses <citerefentry>
<refentrytitle>pac</refentrytitle></citerefentry> uses
the <emphasis remap=tt>pc</emphasis> capability in the the <emphasis remap=tt>pc</emphasis> capability in the
<filename>/etc/printcap</filename> file (default of 200, or 2 <filename>/etc/printcap</filename> file (default of 200, or 2
cents per page). Specify, in hundredths of cents, the price per cents per page). Specify, in hundredths of cents, the price per
page or per foot you want to charge for printouts in this page or per foot you want to charge for printouts in this
capability. You can override this value when you run <ulink capability. You can override this value when you run
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> with <citerefentry>
<refentrytitle>pac</refentrytitle></citerefentry> with
the <option>-p</option> option. The units for the the <option>-p</option> option. The units for the
<option>-p</option> option are in dollars, though, not <option>-p</option> option are in dollars, though, not
hundredths of cents. For example, hundredths of cents. For example,
@ -10960,8 +10986,8 @@
summary information in a summary accounting file, which is named summary information in a summary accounting file, which is named
the same as the printer's accounting file, but with the same as the printer's accounting file, but with
<symbol>_sum</symbol> appended to the name. It then truncates <symbol>_sum</symbol> appended to the name. It then truncates
the accounting file. When you run <ulink the accounting file. When you run <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
again, it rereads the summary file to get starting totals, then again, it rereads the summary file to get starting totals, then
adds information from the regular accounting file.</para> adds information from the regular accounting file.</para>
@ -10992,8 +11018,10 @@
<para>Well, for DVI-to-LaserJet or DVI-to-PostScript conversion, <para>Well, for DVI-to-LaserJet or DVI-to-PostScript conversion,
you can have your filter parse the diagnostic output of</para> you can have your filter parse the diagnostic output of</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj">dvilj</ulink> or <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvips">dvips</ulink> and look to see how many pages were converted. You might be able to do similar things with other file formats and conversion programs.</para> <refentrytitle>dvilj</refentrytitle></citerefentry> or
<citerefentry>
<refentrytitle>dvips</refentrytitle></citerefentry> and look to see how many pages were converted. You might be able to do similar things with other file formats and conversion programs.</para>
<para>But these methods suffer from the fact that the printer may <para>But these methods suffer from the fact that the printer may
not actually print all those pages. For example, it could jam, not actually print all those pages. For example, it could jam,

View file

@ -6989,8 +6989,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with the <ulink <para>Become root with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink> <refentrytitle>su</refentrytitle></citerefentry>
command. Enter the root password when prompted. command. Enter the root password when prompted.
</para> </para>
</listitem> </listitem>
@ -7066,8 +7066,8 @@
works.</para> works.</para>
<para>You can set the communications mode in two ways: by <para>You can set the communications mode in two ways: by
configuring the kernel or by using the <ulink configuring the kernel or by using the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptcontrol">lptcontrol</ulink></para> <refentrytitle>lptcontrol</refentrytitle></citerefentry></para>
<para>program.</para> <para>program.</para>
@ -7120,8 +7120,8 @@
</para> </para>
<para><emphasis remap=bf>To set the communications mode <para><emphasis remap=bf>To set the communications mode
with</emphasis> <ulink with</emphasis> <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptcontrol">lptcontrol</ulink>: <refentrytitle>lptcontrol</refentrytitle></citerefentry>:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -7159,8 +7159,8 @@
<para>To test the printer, we will send some text to it. For <para>To test the printer, we will send some text to it. For
printers that can immediately print characters sent to them, printers that can immediately print characters sent to them,
the program <ulink the program <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> is perfect: it generates all 96 printable ASCII characters in 96 lines.</para> <refentrytitle>lptest</refentrytitle></citerefentry> is perfect: it generates all 96 printable ASCII characters in 96 lines.</para>
<para>For a PostScript (or other language-based) printer, we <para>For a PostScript (or other language-based) printer, we
will need a more sophisticated test. A small PostScript will need a more sophisticated test. A small PostScript
@ -7195,8 +7195,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with <ulink <para>Become root with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink>.</para> <refentrytitle>su</refentrytitle></citerefentry>.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -7205,8 +7205,8 @@
<listitem> <listitem>
<para>If the printer can print plain text, then <para>If the printer can print plain text, then
use <ulink use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. Type: <refentrytitle>lptest</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen><userinput>lptest &gt; <screen><userinput>lptest &gt;
/dev/lpt<replaceable>N</replaceable></userinput></screen> /dev/lpt<replaceable>N</replaceable></userinput></screen>
@ -7267,8 +7267,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with <ulink <para>Become root with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink>. <refentrytitle>su</refentrytitle></citerefentry>.
</para> </para>
</listitem> </listitem>
@ -7295,8 +7295,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Connect to the printer with <ulink <para>Connect to the printer with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?tip">tip</ulink>. Type: <refentrytitle>tip</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen>tip printer</screen> <screen>tip printer</screen>
</informalexample> If this step does not work, edit </informalexample> If this step does not work, edit
@ -7312,8 +7312,8 @@
<listitem> <listitem>
<para>If the printer can print plain text, then <para>If the printer can print plain text, then
use <ulink use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. Type: <refentrytitle>lptest</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen>~$lptest</screen> <screen>~$lptest</screen>
</informalexample> </informalexample>
@ -7375,8 +7375,8 @@
reads this file each time the spooler is used, so updates to the reads this file each time the spooler is used, so updates to the
file take immediate effect.</para> file take immediate effect.</para>
<para>The format of the <ulink <para>The format of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?printcap">printcap</ulink> file is straightforward. Use your favorite text editor to make changes to <filename>/etc/printcap</filename>. The format is identical to other capability files like <filename>/usr/share/misc/termcap</filename> and <filename>/etc/remote</filename>. For complete information about the format, see the <citerefentry><refentrytitle>cgetent</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> <refentrytitle>printcap</refentrytitle></citerefentry> file is straightforward. Use your favorite text editor to make changes to <filename>/etc/printcap</filename>. The format is identical to other capability files like <filename>/usr/share/misc/termcap</filename> and <filename>/etc/remote</filename>. For complete information about the format, see the <citerefentry><refentrytitle>cgetent</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>The simple spooler configuration consists of the following <para>The simple spooler configuration consists of the following
steps: steps:
@ -7431,8 +7431,9 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Test the setup by printing something with the <ulink <para>Test the setup by printing something with the
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <citerefentry>
<refentrytitle>lpr</refentrytitle></citerefentry>
command; see <xref linkend="printing-trying" remap="Trying command; see <xref linkend="printing-trying" remap="Trying
It Out"> and <xref linkend="printing-troubleshooting" It Out"> and <xref linkend="printing-troubleshooting"
remap="Troubleshooting">.</para> remap="Troubleshooting">.</para>
@ -7557,8 +7558,8 @@
is customary to put these directories under is customary to put these directories under
<filename>/var/spool</filename>. It is not necessary to <filename>/var/spool</filename>. It is not necessary to
backup the contents of spooling directories, either. backup the contents of spooling directories, either.
Recreating them is as simple as running <ulink Recreating them is as simple as running <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?mkdir">mkdir</ulink>.</para> <refentrytitle>mkdir</refentrytitle></citerefentry>.</para>
<para>It is also customary to make the directory with a name <para>It is also customary to make the directory with a name
that is identical to the name of the printer, as shown below: that is identical to the name of the printer, as shown below:
@ -7846,14 +7847,14 @@
Unfortunately, congratulations are not quite yet in order, Unfortunately, congratulations are not quite yet in order,
since we still have to test the setup and correct any since we still have to test the setup and correct any
problems. To test the setup, try printing something. To problems. To test the setup, try printing something. To
print with the LPD system, you use the command <ulink print with the LPD system, you use the command <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <refentrytitle>lpr</refentrytitle></citerefentry>,
which submits a job for printing.</para> which submits a job for printing.</para>
<para>You can combine <ulink <para>You can combine <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
with the <ulink with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> program, introduced in section <xref linkend="printing-testing" <refentrytitle>lptest</refentrytitle></citerefentry> program, introduced in section <xref linkend="printing-testing"
remap="Checking Printer Communications"> to generate some remap="Checking Printer Communications"> to generate some
test text.</para> test text.</para>
@ -7867,16 +7868,16 @@
</informalexample> where <emphasis </informalexample> where <emphasis
remap=it>printer-name</emphasis> is a the name of a printer remap=it>printer-name</emphasis> is a the name of a printer
(or an alias) specified in <filename>/etc/printcap</filename>. (or an alias) specified in <filename>/etc/printcap</filename>.
To test the default printer, type <ulink To test the default printer, type <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
without any <option>-P</option> argument. Again, if you are without any <option>-P</option> argument. Again, if you are
testing a printer that expects PostScript, send a PostScript testing a printer that expects PostScript, send a PostScript
program in that language instead of using <ulink program in that language instead of using <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. You can do so by putting the program in a file and typing <emphasis remap=tt>lpr <replaceable>file</replaceable></emphasis>.</para> <refentrytitle>lptest</refentrytitle></citerefentry>. You can do so by putting the program in a file and typing <emphasis remap=tt>lpr <replaceable>file</replaceable></emphasis>.</para>
<para>For a PostScript printer, you should get the results of <para>For a PostScript printer, you should get the results of
the program. If you are using <ulink the program. If you are using <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>, then your results should look like the following:</para> <refentrytitle>lptest</refentrytitle></citerefentry>, then your results should look like the following:</para>
<para> <para>
<informalexample> <informalexample>
@ -7889,8 +7890,8 @@
<para>To further test the printer, try downloading larger <para>To further test the printer, try downloading larger
programs (for language-based printers) or running</para> programs (for language-based printers) or running</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> with different arguments. For example, <command>lptest 80 60</command> will produce 60 lines of 80 characters each.</para> <refentrytitle>lptest</refentrytitle></citerefentry> with different arguments. For example, <command>lptest 80 60</command> will produce 60 lines of 80 characters each.</para>
<para>If the printer did not work, see the next section, <xref <para>If the printer did not work, see the next section, <xref
linkend="printing-troubleshooting" linkend="printing-troubleshooting"
@ -7902,8 +7903,8 @@
id="printing-troubleshooting"> id="printing-troubleshooting">
<title>Troubleshooting</title> <title>Troubleshooting</title>
<para> After performing the simple test with <ulink <para> After performing the simple test with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>, you might have gotten one of the following results instead of the correct printout: <refentrytitle>lptest</refentrytitle></citerefentry>, you might have gotten one of the following results instead of the correct printout:
<variablelist> <variablelist>
<varlistentry><term>It worked, after awhile; or, it did not <varlistentry><term>It worked, after awhile; or, it did not
eject a full sheet.</term> eject a full sheet.</term>
@ -8198,23 +8199,23 @@
<para> This section tells you how to use printers you have setup with <para> This section tells you how to use printers you have setup with
FreeBSD. Here is an overview of the user-level commands: FreeBSD. Here is an overview of the user-level commands:
<variablelist> <variablelist>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink></term> <refentrytitle>lpr</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Print jobs</para> <para>Print jobs</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink></term> <refentrytitle>lpq</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Check printer queues</para> <para>Check printer queues</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink></term> <refentrytitle>lprm</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Remove jobs from a printer's queue</para> <para>Remove jobs from a printer's queue</para>
@ -8223,16 +8224,17 @@
</variablelist> </variablelist>
</para> </para>
<para>There is also an administrative command, <ulink <para>There is also an administrative command, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink>, <refentrytitle>lpc</refentrytitle></citerefentry>,
described in the section <xref linkend="printing-lpc" described in the section <xref linkend="printing-lpc"
remap="Administrating the remap="Administrating the
LPD Spooler">, used to control printers and their queues.</para> LPD Spooler">, used to control printers and their queues.</para>
<para>All three of the commands <ulink <para>All three of the commands <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <ulink <refentrytitle>lpr</refentrytitle></citerefentry>, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink>, and <refentrytitle>lprm</refentrytitle></citerefentry>, and
<ulink URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry>
accept an option <option>-P</option> <emphasis accept an option <option>-P</option> <emphasis
remap=it>printer-name</emphasis> to specify on which remap=it>printer-name</emphasis> to specify on which
printer/queue to operate, as listed in the printer/queue to operate, as listed in the
@ -8259,8 +8261,8 @@
<screen><userinput>lpr <screen><userinput>lpr
<replaceable>filename...</replaceable></userinput></screen> <replaceable>filename...</replaceable></userinput></screen>
</informalexample> This prints each of the listed files to the </informalexample> This prints each of the listed files to the
default printer. If you list no files, <ulink default printer. If you list no files, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> reads <refentrytitle>lpr</refentrytitle></citerefentry> reads
data to print from standard input. For example, this command data to print from standard input. For example, this command
prints some important system files: prints some important system files:
<informalexample> <informalexample>
@ -8273,14 +8275,15 @@
current directory to the printer named <hostid>rattan</hostid>: current directory to the printer named <hostid>rattan</hostid>:
<informalexample> <informalexample>
<screen>ls -l | lpr -P rattan</screen> <screen>ls -l | lpr -P rattan</screen>
</informalexample> Because no files were listed for the <ulink </informalexample> Because no files were listed for the
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <citerefentry>
<refentrytitle>lpr</refentrytitle></citerefentry>
command, <command>lpr</command> read the data to print command, <command>lpr</command> read the data to print
from standard input, which was the output of the <command>ls from standard input, which was the output of the <command>ls
-l</command> command.</para> -l</command> command.</para>
<para>The <ulink <para>The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
can also accept a wide variety of options to control formatting, can also accept a wide variety of options to control formatting,
apply file conversions, generate multiple copies, and so forth. apply file conversions, generate multiple copies, and so forth.
For more information, see the section <xref For more information, see the section <xref
@ -8293,8 +8296,8 @@
id="printing-lpq"> id="printing-lpq">
<title>Checking Jobs</title> <title>Checking Jobs</title>
<para> When you print with <ulink <para> When you print with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, the <refentrytitle>lpr</refentrytitle></citerefentry>, the
data you wish to print is put together in a package called a data you wish to print is put together in a package called a
<emphasis>print job</emphasis>, which is sent to the LPD spooling <emphasis>print job</emphasis>, which is sent to the LPD spooling
system. Each printer has a queue of jobs, and your job waits in system. Each printer has a queue of jobs, and your job waits in
@ -8302,8 +8305,9 @@
users. The printer prints those jobs in a first-come, first-served users. The printer prints those jobs in a first-come, first-served
order.</para> order.</para>
<para>To display the queue for the default printer, type <ulink <para>To display the queue for the default printer, type
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink>. For a <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry>. For a
specific printer, use the <option>-P</option> option. For specific printer, use the <option>-P</option> option. For
example, the command example, the command
<informalexample> <informalexample>
@ -8326,29 +8330,29 @@
details.</para> details.</para>
<para>Job number nine consists of two files; multiple files given on <para>Job number nine consists of two files; multiple files given on
the <ulink the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
line are treated as part of a single job. It is the currently line are treated as part of a single job. It is the currently
active job (note the word <literal>active</literal> active job (note the word <literal>active</literal>
under the <quote>Rank</quote> column), which means the printer should be under the <quote>Rank</quote> column), which means the printer should be
currently printing that job. The second job consists of data currently printing that job. The second job consists of data
passed as the standard input to the</para> passed as the standard input to the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command. The third job came from user mary; it is a much larger command. The third job came from user mary; it is a much larger
job. The pathname of the files she's trying to print is too long job. The pathname of the files she's trying to print is too long
to fit, so the <ulink to fit, so the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> command <refentrytitle>lpq</refentrytitle></citerefentry> command
just shows three dots.</para> just shows three dots.</para>
<para>The very first line of the output from <ulink <para>The very first line of the output from <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> is also <refentrytitle>lpq</refentrytitle></citerefentry> is also
useful: it tells what the printer is currently doing (or at least useful: it tells what the printer is currently doing (or at least
what LPD thinks the printer is doing).</para> what LPD thinks the printer is doing).</para>
<para>The <ulink <para>The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> command <refentrytitle>lpq</refentrytitle></citerefentry> command
also support a <option>-l</option> option to generate a detailed also support a <option>-l</option> option to generate a detailed
long listing. Here is an example of <command>lpq -l</command>: long listing. Here is an example of <command>lpq -l</command>:
<informalexample> <informalexample>
@ -8370,15 +8374,16 @@
<title>Removing Jobs</title> <title>Removing Jobs</title>
<para> If you change your mind about printing a job, you can remove <para> If you change your mind about printing a job, you can remove
the job from the queue with the <ulink the job from the queue with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
command. Often, you can even use <ulink command. Often, you can even use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> to <refentrytitle>lprm</refentrytitle></citerefentry> to
remove an active job, but some or all of the job might still get remove an active job, but some or all of the job might still get
printed.</para> printed.</para>
<para>To remove a job from the default printer, first use <ulink <para>To remove a job from the default printer, first use
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> to find <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry> to find
the job number. Then type the job number. Then type
<informalexample> <informalexample>
<screen><userinput>lprm <screen><userinput>lprm
@ -8388,8 +8393,8 @@
number 10 from the queue for the printer <hostid>bamboo</hostid>: number 10 from the queue for the printer <hostid>bamboo</hostid>:
<informalexample> <informalexample>
<screen>lprm -P bamboo 10</screen> <screen>lprm -P bamboo 10</screen>
</informalexample> The <ulink </informalexample> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
command has a few shortcuts: command has a few shortcuts:
<variablelist> <variablelist>
<varlistentry><term>lprm -</term> <varlistentry><term>lprm -</term>
@ -8415,8 +8420,8 @@
<listitem> <listitem>
<para>With no job number, user name, or <para>With no job number, user name, or
<option>-</option> appearing on the command line, <option>-</option> appearing on the command line,
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> removes the currently active job on the default printer, if it belongs to you. The superuser can remove any active job.</para> <refentrytitle>lprm</refentrytitle></citerefentry> removes the currently active job on the default printer, if it belongs to you. The superuser can remove any active job.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -8438,8 +8443,8 @@
<para>If you are working in a networked <para>If you are working in a networked
environment,</para> environment,</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
will let you remove jobs only from the host from which the jobs will let you remove jobs only from the host from which the jobs
were submitted, even if the same printer is available from other were submitted, even if the same printer is available from other
hosts. The following command sequence demonstrates this: hosts. The following command sequence demonstrates this:
@ -8460,8 +8465,8 @@
id="printing-lpr-options"> id="printing-lpr-options">
<title>Beyond Plain Text: Printing Options</title> <title>Beyond Plain Text: Printing Options</title>
<para> The <ulink <para> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
supports a number of options that control formatting text, supports a number of options that control formatting text,
converting graphic and other file formats, producing multiple converting graphic and other file formats, producing multiple
copies, handling of the job, and more. This section describes the copies, handling of the job, and more. This section describes the
@ -8472,12 +8477,12 @@
id="printing-lpr-options-format"> id="printing-lpr-options-format">
<title>Formatting and Conversion Options</title> <title>Formatting and Conversion Options</title>
<para> The following <ulink <para> The following <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
options control formatting of the files in the job. Use these options control formatting of the files in the job. Use these
options if the job does not contain plain text or if you want options if the job does not contain plain text or if you want
plain text formatted through the <ulink plain text formatted through the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
utility.</para> utility.</para>
<para>For example, the following command prints a DVI file (from <para>For example, the following command prints a DVI file (from
@ -8565,8 +8570,8 @@
<varlistentry><term>-p</term> <varlistentry><term>-p</term>
<listitem> <listitem>
<para>Format plain text with <ulink <para>Format plain text with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
before printing. See <citerefentry><refentrytitle>pr</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more information.</para> before printing. See <citerefentry><refentrytitle>pr</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more information.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -8576,8 +8581,8 @@
<listitem> <listitem>
<para>Use <emphasis remap=it>title</emphasis> on the <para>Use <emphasis remap=it>title</emphasis> on the
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
header instead of the file name. This option has effect header instead of the file name. This option has effect
only when used with the <option>-p</option> only when used with the <option>-p</option>
option.</para> option.</para>
@ -8601,28 +8606,28 @@
</para> </para>
<para>Here is an example: this command prints a nicely formatted <para>Here is an example: this command prints a nicely formatted
version of the <ulink version of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?ls">ls</ulink> manual <refentrytitle>ls</refentrytitle></citerefentry> manual
page on the default printer: page on the default printer:
<informalexample> <informalexample>
<screen>zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr <screen>zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr
-t</screen> -t</screen>
</informalexample> The <ulink </informalexample> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?zcat">zcat</ulink> <refentrytitle>zcat</refentrytitle></citerefentry>
command uncompresses the source of the</para> command uncompresses the source of the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?ls">ls</ulink> manual <refentrytitle>ls</refentrytitle></citerefentry> manual
page and passes it to the <ulink page and passes it to the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?troff">troff</ulink> <refentrytitle>troff</refentrytitle></citerefentry>
command, which formats that source and makes GNU troff output command, which formats that source and makes GNU troff output
and passes it to <ulink and passes it to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <refentrytitle>lpr</refentrytitle></citerefentry>,
which submits the job to the LPD spooler. Because we used the which submits the job to the LPD spooler. Because we used the
<option>-t</option> option to</para> <option>-t</option> option to</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, the <refentrytitle>lpr</refentrytitle></citerefentry>, the
spooler will convert the GNU troff output into a format the spooler will convert the GNU troff output into a format the
default printer can understand when it prints the job.</para> default printer can understand when it prints the job.</para>
@ -8632,8 +8637,8 @@
id="printing-lpr-options-job-handling"> id="printing-lpr-options-job-handling">
<title>Job Handling Options</title> <title>Job Handling Options</title>
<para> The following options to <ulink <para> The following options to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> tell <refentrytitle>lpr</refentrytitle></citerefentry> tell
LPD to handle the job specially:</para> LPD to handle the job specially:</para>
<para> <para>
@ -8717,8 +8722,8 @@
id="printing-lpr-options-misc"> id="printing-lpr-options-misc">
<title>Header Page Options</title> <title>Header Page Options</title>
<para> These options to <ulink <para> These options to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
adjust the text that normally appears on a job's header page. adjust the text that normally appears on a job's header page.
If header pages are suppressed for the destination printer, If header pages are suppressed for the destination printer,
these options have no effect. See section <xref these options have no effect. See section <xref
@ -8772,13 +8777,13 @@
<title>Administrating Printers</title> <title>Administrating Printers</title>
<para> As an administrator for your printers, you have had to <para> As an administrator for your printers, you have had to
install, set up, and test them. Using the <ulink install, set up, and test them. Using the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
command, you can interact with your printers in yet more ways. command, you can interact with your printers in yet more ways.
With</para> With</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink>, you <refentrytitle>lpc</refentrytitle></citerefentry>, you
can</para> can</para>
<para> <para>
@ -8816,14 +8821,14 @@
<para>In general, you have to have root privileges to use the</para> <para>In general, you have to have root privileges to use the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
command. Ordinary users can use the <ulink command. Ordinary users can use the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> command <refentrytitle>lpc</refentrytitle></citerefentry> command
to get printer status and to restart a hung printer only.</para> to get printer status and to restart a hung printer only.</para>
<para>Here is a summary of the <ulink <para>Here is a summary of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
commands. Most of the commands takes a <emphasis commands. Most of the commands takes a <emphasis
remap=it>printer-name</emphasis> argument to tell on which remap=it>printer-name</emphasis> argument to tell on which
printer to operate. You can use <literal>all</literal> printer to operate. You can use <literal>all</literal>
@ -8879,8 +8884,8 @@
<para>Take a printer down. Equivalent to <command>disable</command> followed by <command>stop</command>. The <emphasis <para>Take a printer down. Equivalent to <command>disable</command> followed by <command>stop</command>. The <emphasis
remap=it>message</emphasis> appears as the printer's remap=it>message</emphasis> appears as the printer's
status whenever a user checks the printer's queue with status whenever a user checks the printer's queue with
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> <refentrytitle>lpq</refentrytitle></citerefentry>
or status with <command>lpc or status with <command>lpc
status</command>.</para> status</command>.</para>
</listitem> </listitem>
@ -8966,11 +8971,11 @@
</variablelist> </variablelist>
</para> </para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> accepts <refentrytitle>lpc</refentrytitle></citerefentry> accepts
the above commands on the command line. If you do not enter any the above commands on the command line. If you do not enter any
commands, <ulink commands, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> enters <refentrytitle>lpc</refentrytitle></citerefentry> enters
an interactive mode, where you can enter commands until you type an interactive mode, where you can enter commands until you type
<command>exit</command>, <command>quit</command>, or end-of-file.</para> <command>exit</command>, <command>quit</command>, or end-of-file.</para>
@ -9118,8 +9123,8 @@
what is listed in the <filename>/etc/printcap</filename> file what is listed in the <filename>/etc/printcap</filename> file
and what arguments the user specified for the job on the</para> and what arguments the user specified for the job on the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command line. For example, if the user typed <command>lpr command line. For example, if the user typed <command>lpr
-t</command>, LPD would start the troff filter, listed in the -t</command>, LPD would start the troff filter, listed in the
<emphasis remap=tt>tf</emphasis> capability for the destination <emphasis remap=tt>tf</emphasis> capability for the destination
@ -9384,8 +9389,8 @@
text-to-PostScript program you wish. The FreeBSD ports text-to-PostScript program you wish. The FreeBSD ports
collection (see <xref linkend="ports" remap="The Ports collection (see <xref linkend="ports" remap="The Ports
Collection">) includes a full featured text-to-PostScript Collection">) includes a full featured text-to-PostScript
program called <ulink program called <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=a2ps">a2ps</ulink> that you might want to investigate.</para> <refentrytitle>a2ps</refentrytitle></citerefentry> that you might want to investigate.</para>
</sect3> </sect3>
@ -9420,8 +9425,8 @@
for Hewlett Packard DeskJet 500 printers. For other printers, for Hewlett Packard DeskJet 500 printers. For other printers,
substitute the <option>-sDEVICE</option> argument to the</para> substitute the <option>-sDEVICE</option> argument to the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=gs">gs</ulink> (Ghostscript) command. (Type <command>gs -h</command> to get a list of devices the current installation of Ghostscript supports.) <refentrytitle>gs</refentrytitle></citerefentry> (Ghostscript) command. (Type <command>gs -h</command> to get a list of devices the current installation of Ghostscript supports.)
<informalexample> <informalexample>
<programlisting>#!/bin/sh # # ifhp - Print <programlisting>#!/bin/sh # # ifhp - Print
Ghostscript-simulated PostScript on a DeskJet 500 # Ghostscript-simulated PostScript on a DeskJet 500 #
@ -9571,8 +9576,8 @@
Invoked by lpd when user runs lpr -d # exec Invoked by lpd when user runs lpr -d # exec
/usr/local/bin/dvips -f | /usr/local/libexec/lprps /usr/local/bin/dvips -f | /usr/local/libexec/lprps
"$@"</programlisting> "$@"</programlisting>
</informalexample> This script runs <ulink </informalexample> This script runs <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvips">dvips</ulink> in filter mode (the <option>-f</option> argument) on standard input, which is the job to print. It then starts the PostScript printer filter <command>lprps</command> (see section <xref linkend="printing-advanced-if-conversion" <refentrytitle>dvips</refentrytitle></citerefentry> in filter mode (the <option>-f</option> argument) on standard input, which is the job to print. It then starts the PostScript printer filter <command>lprps</command> (see section <xref linkend="printing-advanced-if-conversion"
remap="Accommodating Plain Text Jobs on PostScript remap="Accommodating Plain Text Jobs on PostScript
Printers">) with the arguments LPD passed to this script. Printers">) with the arguments LPD passed to this script.
<command>lprps</command> will use those arguments <command>lprps</command> will use those arguments
@ -9664,11 +9669,26 @@
<para>Now, for the hard part: making the filter. For that, we <para>Now, for the hard part: making the filter. For that, we
need a DVI-to-LaserJet/PCL conversion program. The FreeBSD need a DVI-to-LaserJet/PCL conversion program. The FreeBSD
ports collection (see <xref linkend="ports" remap="The ports collection (see <xref linkend="ports" remap="The
Ports Collection">) has one: <ulink Ports Collection">) has one: <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvi2xx">dvi2xx</ulink> is the name of the package. Installing this package gives us the program we need, <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink>, which converts DVI into LaserJet IIp, LaserJet III, and LaserJet 2000 compatible codes.</para> <refentrytitle>dvi2xx</refentrytitle></citerefentry> is the
name of the package. Installing this package gives us the
program we need, <citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry>, which converts DVI into LaserJet IIp, LaserJet III, and LaserJet 2000 compatible codes.</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> makes the filter <command>hpdf</command> quite complex since <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> cannot read from standard input. It wants to work with a filename. What is worse, the filename has to end in <filename>.dvi</filename> so using <filename>/dev/fd/0</filename> for standard input is problematic. We can get around that problem by linking (symbolically) a temporary file name (one that ends in <filename>.dvi</filename>) to <filename>/dev/fd/0</filename>, thereby forcing <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> to read from standard input.</para> <refentrytitle>dvilj2p</refentrytitle></citerefentry> makes
the filter <command>hpdf</command> quite complex since
<citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry> cannot
read from standard input. It wants to work with a filename.
What is worse, the filename has to end in
<filename>.dvi</filename> so using
<filename>/dev/fd/0</filename> for standard input is
problematic. We can get around that problem by linking
(symbolically) a temporary file name (one that ends in
<filename>.dvi</filename>) to <filename>/dev/fd/0</filename>,
thereby forcing <citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry> to read from standard input.</para>
<para>The only other fly in the ointment is the fact that we <para>The only other fly in the ointment is the fact that we
cannot use <filename>/tmp</filename> for the temporary link. cannot use <filename>/tmp</filename> for the temporary link.
@ -9724,8 +9744,8 @@
<para> All these conversion filters accomplish a lot for your <para> All these conversion filters accomplish a lot for your
printing environment, but at the cost forcing the user to printing environment, but at the cost forcing the user to
specify (on the <ulink specify (on the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command line) which one to use. If your users are not command line) which one to use. If your users are not
particularly computer literate, having to specify a filter particularly computer literate, having to specify a filter
option will become annoying. What is worse, though, is that option will become annoying. What is worse, though, is that
@ -9743,8 +9763,8 @@
you can still provide conversion filters just for them.</para> you can still provide conversion filters just for them.</para>
<para>The FreeBSD ports collection has a text filter that <para>The FreeBSD ports collection has a text filter that
performs automatic conversion called <ulink performs automatic conversion called <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=apsfilter">apsfilter</ulink>. It can detect plain text, PostScript, and DVI files, run the proper conversions, and print.</para> <refentrytitle>apsfilter</refentrytitle></citerefentry>. It can detect plain text, PostScript, and DVI files, run the proper conversions, and print.</para>
</sect4> </sect4>
</sect3> </sect3>
@ -9939,8 +9959,8 @@
they can suppress header pages by submitting the job with they can suppress header pages by submitting the job with
<command>lpr -h</command>; see <xref <command>lpr -h</command>; see <xref
linkend="printing-lpr-options-misc" remap="Header Page linkend="printing-lpr-options-misc" remap="Header Page
Options"> for more <ulink Options"> for more <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
options.</para> options.</para>
<note> <note>
@ -10439,8 +10459,8 @@
<para>If you feel multiple copies cause unnecessary wear and tear <para>If you feel multiple copies cause unnecessary wear and tear
on your printers, you can disable the <option>-#</option> option on your printers, you can disable the <option>-#</option> option
to <ulink to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> by <refentrytitle>lpr</refentrytitle></citerefentry> by
adding the <emphasis remap=tt>sc</emphasis> capability to the adding the <emphasis remap=tt>sc</emphasis> capability to the
<filename>/etc/printcap</filename> file. When users submit jobs <filename>/etc/printcap</filename> file. When users submit jobs
with the <option>-#</option> option, they will see with the <option>-#</option> option, they will see
@ -10491,8 +10511,8 @@
:lp=:rm=rose:rp=bamboo:sd=/var/spool/lpd/bamboo:sc:</programlisting> :lp=:rm=rose:rp=bamboo:sd=/var/spool/lpd/bamboo:sc:</programlisting>
</informalexample> By using the <emphasis remap=tt>sc</emphasis> </informalexample> By using the <emphasis remap=tt>sc</emphasis>
capability, we prevent the use of <command>lpr -#</command>, but capability, we prevent the use of <command>lpr -#</command>, but
that still does not prevent users from running <ulink that still does not prevent users from running <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
multiple times, or from submitting the same file multiple times multiple times, or from submitting the same file multiple times
in one job like this: in one job like this:
<informalexample> <informalexample>
@ -10633,7 +10653,11 @@
<para>The format of these files is simple: one host name <para>The format of these files is simple: one host name
per line. Note that the file per line. Note that the file
<filename>/etc/hosts.equiv</filename> is also used by <filename>/etc/hosts.equiv</filename> is also used by
the <citerefentry><refentrytitle>ruserok</refentrytitle><manvolnum>3</manvolnum></citerefentry> protocol, and affects programs like <ulink URL="http://www.freebsd.org/cgi/man.cgi?rsh">rsh</ulink> and <ulink URL="http://www.freebsd.org/cgi/man.cgi?rcp">rcp</ulink>, so be careful.</para> the
<citerefentry><refentrytitle>ruserok</refentrytitle><manvolnum>3</manvolnum></citerefentry> protocol, and affects programs like <citerefentry>
<refentrytitle>rsh</refentrytitle></citerefentry> and
<citerefentry>
<refentrytitle>rcp</refentrytitle></citerefentry>, so be careful.</para>
<para>For example, here is the <para>For example, here is the
<filename>/etc/hosts.lpd</filename> file on the host <filename>/etc/hosts.lpd</filename> file on the host
@ -10802,8 +10826,8 @@
<xref linkend="printing-advanced-lpf" remap="lpf: a Text <xref linkend="printing-advanced-lpf" remap="lpf: a Text
Filter">, and</para> Filter">, and</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink>, a <refentrytitle>pac</refentrytitle></citerefentry>, a
program to gather and total entries from printer accounting program to gather and total entries from printer accounting
files.</para> files.</para>
@ -10839,11 +10863,11 @@
<para>When you are ready to charge users for printouts, run <para>When you are ready to charge users for printouts, run
the</para> the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
program. Just change to the spooling directory for the printer program. Just change to the spooling directory for the printer
you want to collect on and type <ulink you want to collect on and type <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink>. You <refentrytitle>pac</refentrytitle></citerefentry>. You
will get a dollar-centric summary like the following: will get a dollar-centric summary like the following:
<informalexample> <informalexample>
<programlisting> Login pages/feet runs <programlisting> Login pages/feet runs
@ -10854,8 +10878,8 @@
rose:mary 87.00 32 $ 1.74 rose:root rose:mary 87.00 32 $ 1.74 rose:root
26.00 12 $ 0.52 total 337.00 154 26.00 12 $ 0.52 total 337.00 154
$ 6.74</programlisting> $ 6.74</programlisting>
</informalexample> These are the arguments <ulink </informalexample> These are the arguments <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
expects: expects:
<variablelist> <variablelist>
<varlistentry><term><option>-P<replaceable>printer</replaceable></option></term> <varlistentry><term><option>-P<replaceable>printer</replaceable></option></term>
@ -10926,8 +10950,8 @@
</variablelist> </variablelist>
</para> </para>
<para>In the default summary that <ulink <para>In the default summary that <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
produces, you see the number of pages printed by each user from produces, you see the number of pages printed by each user from
various hosts. If, at your site, host does not matter (because various hosts. If, at your site, host does not matter (because
users can use any host), run <command>pac -m</command>, to users can use any host), run <command>pac -m</command>, to
@ -10939,14 +10963,16 @@
$ 2.36 root 26.00 12 $ 0.52 $ 2.36 root 26.00 12 $ 0.52
zhang 9.00 1 $ 0.18 total zhang 9.00 1 $ 0.18 total
337.00 154 $ 6.74</programlisting> 337.00 154 $ 6.74</programlisting>
</informalexample> To compute the dollar amount due, <ulink </informalexample> To compute the dollar amount due,
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> uses <citerefentry>
<refentrytitle>pac</refentrytitle></citerefentry> uses
the <emphasis remap=tt>pc</emphasis> capability in the the <emphasis remap=tt>pc</emphasis> capability in the
<filename>/etc/printcap</filename> file (default of 200, or 2 <filename>/etc/printcap</filename> file (default of 200, or 2
cents per page). Specify, in hundredths of cents, the price per cents per page). Specify, in hundredths of cents, the price per
page or per foot you want to charge for printouts in this page or per foot you want to charge for printouts in this
capability. You can override this value when you run <ulink capability. You can override this value when you run
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> with <citerefentry>
<refentrytitle>pac</refentrytitle></citerefentry> with
the <option>-p</option> option. The units for the the <option>-p</option> option. The units for the
<option>-p</option> option are in dollars, though, not <option>-p</option> option are in dollars, though, not
hundredths of cents. For example, hundredths of cents. For example,
@ -10960,8 +10986,8 @@
summary information in a summary accounting file, which is named summary information in a summary accounting file, which is named
the same as the printer's accounting file, but with the same as the printer's accounting file, but with
<symbol>_sum</symbol> appended to the name. It then truncates <symbol>_sum</symbol> appended to the name. It then truncates
the accounting file. When you run <ulink the accounting file. When you run <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
again, it rereads the summary file to get starting totals, then again, it rereads the summary file to get starting totals, then
adds information from the regular accounting file.</para> adds information from the regular accounting file.</para>
@ -10992,8 +11018,10 @@
<para>Well, for DVI-to-LaserJet or DVI-to-PostScript conversion, <para>Well, for DVI-to-LaserJet or DVI-to-PostScript conversion,
you can have your filter parse the diagnostic output of</para> you can have your filter parse the diagnostic output of</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj">dvilj</ulink> or <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvips">dvips</ulink> and look to see how many pages were converted. You might be able to do similar things with other file formats and conversion programs.</para> <refentrytitle>dvilj</refentrytitle></citerefentry> or
<citerefentry>
<refentrytitle>dvips</refentrytitle></citerefentry> and look to see how many pages were converted. You might be able to do similar things with other file formats and conversion programs.</para>
<para>But these methods suffer from the fact that the printer may <para>But these methods suffer from the fact that the printer may
not actually print all those pages. For example, it could jam, not actually print all those pages. For example, it could jam,

View file

@ -6989,8 +6989,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with the <ulink <para>Become root with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink> <refentrytitle>su</refentrytitle></citerefentry>
command. Enter the root password when prompted. command. Enter the root password when prompted.
</para> </para>
</listitem> </listitem>
@ -7066,8 +7066,8 @@
works.</para> works.</para>
<para>You can set the communications mode in two ways: by <para>You can set the communications mode in two ways: by
configuring the kernel or by using the <ulink configuring the kernel or by using the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptcontrol">lptcontrol</ulink></para> <refentrytitle>lptcontrol</refentrytitle></citerefentry></para>
<para>program.</para> <para>program.</para>
@ -7120,8 +7120,8 @@
</para> </para>
<para><emphasis remap=bf>To set the communications mode <para><emphasis remap=bf>To set the communications mode
with</emphasis> <ulink with</emphasis> <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptcontrol">lptcontrol</ulink>: <refentrytitle>lptcontrol</refentrytitle></citerefentry>:
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -7159,8 +7159,8 @@
<para>To test the printer, we will send some text to it. For <para>To test the printer, we will send some text to it. For
printers that can immediately print characters sent to them, printers that can immediately print characters sent to them,
the program <ulink the program <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> is perfect: it generates all 96 printable ASCII characters in 96 lines.</para> <refentrytitle>lptest</refentrytitle></citerefentry> is perfect: it generates all 96 printable ASCII characters in 96 lines.</para>
<para>For a PostScript (or other language-based) printer, we <para>For a PostScript (or other language-based) printer, we
will need a more sophisticated test. A small PostScript will need a more sophisticated test. A small PostScript
@ -7195,8 +7195,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with <ulink <para>Become root with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink>.</para> <refentrytitle>su</refentrytitle></citerefentry>.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -7205,8 +7205,8 @@
<listitem> <listitem>
<para>If the printer can print plain text, then <para>If the printer can print plain text, then
use <ulink use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. Type: <refentrytitle>lptest</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen><userinput>lptest &gt; <screen><userinput>lptest &gt;
/dev/lpt<replaceable>N</replaceable></userinput></screen> /dev/lpt<replaceable>N</replaceable></userinput></screen>
@ -7267,8 +7267,8 @@
<orderedlist> <orderedlist>
<listitem> <listitem>
<para>Become root with <ulink <para>Become root with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?su">su</ulink>. <refentrytitle>su</refentrytitle></citerefentry>.
</para> </para>
</listitem> </listitem>
@ -7295,8 +7295,8 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Connect to the printer with <ulink <para>Connect to the printer with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?tip">tip</ulink>. Type: <refentrytitle>tip</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen>tip printer</screen> <screen>tip printer</screen>
</informalexample> If this step does not work, edit </informalexample> If this step does not work, edit
@ -7312,8 +7312,8 @@
<listitem> <listitem>
<para>If the printer can print plain text, then <para>If the printer can print plain text, then
use <ulink use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. Type: <refentrytitle>lptest</refentrytitle></citerefentry>. Type:
<informalexample> <informalexample>
<screen>~$lptest</screen> <screen>~$lptest</screen>
</informalexample> </informalexample>
@ -7375,8 +7375,8 @@
reads this file each time the spooler is used, so updates to the reads this file each time the spooler is used, so updates to the
file take immediate effect.</para> file take immediate effect.</para>
<para>The format of the <ulink <para>The format of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?printcap">printcap</ulink> file is straightforward. Use your favorite text editor to make changes to <filename>/etc/printcap</filename>. The format is identical to other capability files like <filename>/usr/share/misc/termcap</filename> and <filename>/etc/remote</filename>. For complete information about the format, see the <citerefentry><refentrytitle>cgetent</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> <refentrytitle>printcap</refentrytitle></citerefentry> file is straightforward. Use your favorite text editor to make changes to <filename>/etc/printcap</filename>. The format is identical to other capability files like <filename>/usr/share/misc/termcap</filename> and <filename>/etc/remote</filename>. For complete information about the format, see the <citerefentry><refentrytitle>cgetent</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>The simple spooler configuration consists of the following <para>The simple spooler configuration consists of the following
steps: steps:
@ -7431,8 +7431,9 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Test the setup by printing something with the <ulink <para>Test the setup by printing something with the
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <citerefentry>
<refentrytitle>lpr</refentrytitle></citerefentry>
command; see <xref linkend="printing-trying" remap="Trying command; see <xref linkend="printing-trying" remap="Trying
It Out"> and <xref linkend="printing-troubleshooting" It Out"> and <xref linkend="printing-troubleshooting"
remap="Troubleshooting">.</para> remap="Troubleshooting">.</para>
@ -7557,8 +7558,8 @@
is customary to put these directories under is customary to put these directories under
<filename>/var/spool</filename>. It is not necessary to <filename>/var/spool</filename>. It is not necessary to
backup the contents of spooling directories, either. backup the contents of spooling directories, either.
Recreating them is as simple as running <ulink Recreating them is as simple as running <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?mkdir">mkdir</ulink>.</para> <refentrytitle>mkdir</refentrytitle></citerefentry>.</para>
<para>It is also customary to make the directory with a name <para>It is also customary to make the directory with a name
that is identical to the name of the printer, as shown below: that is identical to the name of the printer, as shown below:
@ -7846,14 +7847,14 @@
Unfortunately, congratulations are not quite yet in order, Unfortunately, congratulations are not quite yet in order,
since we still have to test the setup and correct any since we still have to test the setup and correct any
problems. To test the setup, try printing something. To problems. To test the setup, try printing something. To
print with the LPD system, you use the command <ulink print with the LPD system, you use the command <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <refentrytitle>lpr</refentrytitle></citerefentry>,
which submits a job for printing.</para> which submits a job for printing.</para>
<para>You can combine <ulink <para>You can combine <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
with the <ulink with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> program, introduced in section <xref linkend="printing-testing" <refentrytitle>lptest</refentrytitle></citerefentry> program, introduced in section <xref linkend="printing-testing"
remap="Checking Printer Communications"> to generate some remap="Checking Printer Communications"> to generate some
test text.</para> test text.</para>
@ -7867,16 +7868,16 @@
</informalexample> where <emphasis </informalexample> where <emphasis
remap=it>printer-name</emphasis> is a the name of a printer remap=it>printer-name</emphasis> is a the name of a printer
(or an alias) specified in <filename>/etc/printcap</filename>. (or an alias) specified in <filename>/etc/printcap</filename>.
To test the default printer, type <ulink To test the default printer, type <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
without any <option>-P</option> argument. Again, if you are without any <option>-P</option> argument. Again, if you are
testing a printer that expects PostScript, send a PostScript testing a printer that expects PostScript, send a PostScript
program in that language instead of using <ulink program in that language instead of using <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>. You can do so by putting the program in a file and typing <emphasis remap=tt>lpr <replaceable>file</replaceable></emphasis>.</para> <refentrytitle>lptest</refentrytitle></citerefentry>. You can do so by putting the program in a file and typing <emphasis remap=tt>lpr <replaceable>file</replaceable></emphasis>.</para>
<para>For a PostScript printer, you should get the results of <para>For a PostScript printer, you should get the results of
the program. If you are using <ulink the program. If you are using <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>, then your results should look like the following:</para> <refentrytitle>lptest</refentrytitle></citerefentry>, then your results should look like the following:</para>
<para> <para>
<informalexample> <informalexample>
@ -7889,8 +7890,8 @@
<para>To further test the printer, try downloading larger <para>To further test the printer, try downloading larger
programs (for language-based printers) or running</para> programs (for language-based printers) or running</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink> with different arguments. For example, <command>lptest 80 60</command> will produce 60 lines of 80 characters each.</para> <refentrytitle>lptest</refentrytitle></citerefentry> with different arguments. For example, <command>lptest 80 60</command> will produce 60 lines of 80 characters each.</para>
<para>If the printer did not work, see the next section, <xref <para>If the printer did not work, see the next section, <xref
linkend="printing-troubleshooting" linkend="printing-troubleshooting"
@ -7902,8 +7903,8 @@
id="printing-troubleshooting"> id="printing-troubleshooting">
<title>Troubleshooting</title> <title>Troubleshooting</title>
<para> After performing the simple test with <ulink <para> After performing the simple test with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lptest">lptest</ulink>, you might have gotten one of the following results instead of the correct printout: <refentrytitle>lptest</refentrytitle></citerefentry>, you might have gotten one of the following results instead of the correct printout:
<variablelist> <variablelist>
<varlistentry><term>It worked, after awhile; or, it did not <varlistentry><term>It worked, after awhile; or, it did not
eject a full sheet.</term> eject a full sheet.</term>
@ -8198,23 +8199,23 @@
<para> This section tells you how to use printers you have setup with <para> This section tells you how to use printers you have setup with
FreeBSD. Here is an overview of the user-level commands: FreeBSD. Here is an overview of the user-level commands:
<variablelist> <variablelist>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink></term> <refentrytitle>lpr</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Print jobs</para> <para>Print jobs</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink></term> <refentrytitle>lpq</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Check printer queues</para> <para>Check printer queues</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry><term><ulink <varlistentry><term><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink></term> <refentrytitle>lprm</refentrytitle></citerefentry></term>
<listitem> <listitem>
<para>Remove jobs from a printer's queue</para> <para>Remove jobs from a printer's queue</para>
@ -8223,16 +8224,17 @@
</variablelist> </variablelist>
</para> </para>
<para>There is also an administrative command, <ulink <para>There is also an administrative command, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink>, <refentrytitle>lpc</refentrytitle></citerefentry>,
described in the section <xref linkend="printing-lpc" described in the section <xref linkend="printing-lpc"
remap="Administrating the remap="Administrating the
LPD Spooler">, used to control printers and their queues.</para> LPD Spooler">, used to control printers and their queues.</para>
<para>All three of the commands <ulink <para>All three of the commands <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <ulink <refentrytitle>lpr</refentrytitle></citerefentry>, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink>, and <refentrytitle>lprm</refentrytitle></citerefentry>, and
<ulink URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry>
accept an option <option>-P</option> <emphasis accept an option <option>-P</option> <emphasis
remap=it>printer-name</emphasis> to specify on which remap=it>printer-name</emphasis> to specify on which
printer/queue to operate, as listed in the printer/queue to operate, as listed in the
@ -8259,8 +8261,8 @@
<screen><userinput>lpr <screen><userinput>lpr
<replaceable>filename...</replaceable></userinput></screen> <replaceable>filename...</replaceable></userinput></screen>
</informalexample> This prints each of the listed files to the </informalexample> This prints each of the listed files to the
default printer. If you list no files, <ulink default printer. If you list no files, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> reads <refentrytitle>lpr</refentrytitle></citerefentry> reads
data to print from standard input. For example, this command data to print from standard input. For example, this command
prints some important system files: prints some important system files:
<informalexample> <informalexample>
@ -8273,14 +8275,15 @@
current directory to the printer named <hostid>rattan</hostid>: current directory to the printer named <hostid>rattan</hostid>:
<informalexample> <informalexample>
<screen>ls -l | lpr -P rattan</screen> <screen>ls -l | lpr -P rattan</screen>
</informalexample> Because no files were listed for the <ulink </informalexample> Because no files were listed for the
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <citerefentry>
<refentrytitle>lpr</refentrytitle></citerefentry>
command, <command>lpr</command> read the data to print command, <command>lpr</command> read the data to print
from standard input, which was the output of the <command>ls from standard input, which was the output of the <command>ls
-l</command> command.</para> -l</command> command.</para>
<para>The <ulink <para>The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
can also accept a wide variety of options to control formatting, can also accept a wide variety of options to control formatting,
apply file conversions, generate multiple copies, and so forth. apply file conversions, generate multiple copies, and so forth.
For more information, see the section <xref For more information, see the section <xref
@ -8293,8 +8296,8 @@
id="printing-lpq"> id="printing-lpq">
<title>Checking Jobs</title> <title>Checking Jobs</title>
<para> When you print with <ulink <para> When you print with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, the <refentrytitle>lpr</refentrytitle></citerefentry>, the
data you wish to print is put together in a package called a data you wish to print is put together in a package called a
<emphasis>print job</emphasis>, which is sent to the LPD spooling <emphasis>print job</emphasis>, which is sent to the LPD spooling
system. Each printer has a queue of jobs, and your job waits in system. Each printer has a queue of jobs, and your job waits in
@ -8302,8 +8305,9 @@
users. The printer prints those jobs in a first-come, first-served users. The printer prints those jobs in a first-come, first-served
order.</para> order.</para>
<para>To display the queue for the default printer, type <ulink <para>To display the queue for the default printer, type
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink>. For a <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry>. For a
specific printer, use the <option>-P</option> option. For specific printer, use the <option>-P</option> option. For
example, the command example, the command
<informalexample> <informalexample>
@ -8326,29 +8330,29 @@
details.</para> details.</para>
<para>Job number nine consists of two files; multiple files given on <para>Job number nine consists of two files; multiple files given on
the <ulink the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
line are treated as part of a single job. It is the currently line are treated as part of a single job. It is the currently
active job (note the word <literal>active</literal> active job (note the word <literal>active</literal>
under the <quote>Rank</quote> column), which means the printer should be under the <quote>Rank</quote> column), which means the printer should be
currently printing that job. The second job consists of data currently printing that job. The second job consists of data
passed as the standard input to the</para> passed as the standard input to the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command. The third job came from user mary; it is a much larger command. The third job came from user mary; it is a much larger
job. The pathname of the files she's trying to print is too long job. The pathname of the files she's trying to print is too long
to fit, so the <ulink to fit, so the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> command <refentrytitle>lpq</refentrytitle></citerefentry> command
just shows three dots.</para> just shows three dots.</para>
<para>The very first line of the output from <ulink <para>The very first line of the output from <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> is also <refentrytitle>lpq</refentrytitle></citerefentry> is also
useful: it tells what the printer is currently doing (or at least useful: it tells what the printer is currently doing (or at least
what LPD thinks the printer is doing).</para> what LPD thinks the printer is doing).</para>
<para>The <ulink <para>The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> command <refentrytitle>lpq</refentrytitle></citerefentry> command
also support a <option>-l</option> option to generate a detailed also support a <option>-l</option> option to generate a detailed
long listing. Here is an example of <command>lpq -l</command>: long listing. Here is an example of <command>lpq -l</command>:
<informalexample> <informalexample>
@ -8370,15 +8374,16 @@
<title>Removing Jobs</title> <title>Removing Jobs</title>
<para> If you change your mind about printing a job, you can remove <para> If you change your mind about printing a job, you can remove
the job from the queue with the <ulink the job from the queue with the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
command. Often, you can even use <ulink command. Often, you can even use <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> to <refentrytitle>lprm</refentrytitle></citerefentry> to
remove an active job, but some or all of the job might still get remove an active job, but some or all of the job might still get
printed.</para> printed.</para>
<para>To remove a job from the default printer, first use <ulink <para>To remove a job from the default printer, first use
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> to find <citerefentry>
<refentrytitle>lpq</refentrytitle></citerefentry> to find
the job number. Then type the job number. Then type
<informalexample> <informalexample>
<screen><userinput>lprm <screen><userinput>lprm
@ -8388,8 +8393,8 @@
number 10 from the queue for the printer <hostid>bamboo</hostid>: number 10 from the queue for the printer <hostid>bamboo</hostid>:
<informalexample> <informalexample>
<screen>lprm -P bamboo 10</screen> <screen>lprm -P bamboo 10</screen>
</informalexample> The <ulink </informalexample> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
command has a few shortcuts: command has a few shortcuts:
<variablelist> <variablelist>
<varlistentry><term>lprm -</term> <varlistentry><term>lprm -</term>
@ -8415,8 +8420,8 @@
<listitem> <listitem>
<para>With no job number, user name, or <para>With no job number, user name, or
<option>-</option> appearing on the command line, <option>-</option> appearing on the command line,
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> removes the currently active job on the default printer, if it belongs to you. The superuser can remove any active job.</para> <refentrytitle>lprm</refentrytitle></citerefentry> removes the currently active job on the default printer, if it belongs to you. The superuser can remove any active job.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -8438,8 +8443,8 @@
<para>If you are working in a networked <para>If you are working in a networked
environment,</para> environment,</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lprm">lprm</ulink> <refentrytitle>lprm</refentrytitle></citerefentry>
will let you remove jobs only from the host from which the jobs will let you remove jobs only from the host from which the jobs
were submitted, even if the same printer is available from other were submitted, even if the same printer is available from other
hosts. The following command sequence demonstrates this: hosts. The following command sequence demonstrates this:
@ -8460,8 +8465,8 @@
id="printing-lpr-options"> id="printing-lpr-options">
<title>Beyond Plain Text: Printing Options</title> <title>Beyond Plain Text: Printing Options</title>
<para> The <ulink <para> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> command <refentrytitle>lpr</refentrytitle></citerefentry> command
supports a number of options that control formatting text, supports a number of options that control formatting text,
converting graphic and other file formats, producing multiple converting graphic and other file formats, producing multiple
copies, handling of the job, and more. This section describes the copies, handling of the job, and more. This section describes the
@ -8472,12 +8477,12 @@
id="printing-lpr-options-format"> id="printing-lpr-options-format">
<title>Formatting and Conversion Options</title> <title>Formatting and Conversion Options</title>
<para> The following <ulink <para> The following <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
options control formatting of the files in the job. Use these options control formatting of the files in the job. Use these
options if the job does not contain plain text or if you want options if the job does not contain plain text or if you want
plain text formatted through the <ulink plain text formatted through the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
utility.</para> utility.</para>
<para>For example, the following command prints a DVI file (from <para>For example, the following command prints a DVI file (from
@ -8565,8 +8570,8 @@
<varlistentry><term>-p</term> <varlistentry><term>-p</term>
<listitem> <listitem>
<para>Format plain text with <ulink <para>Format plain text with <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
before printing. See <citerefentry><refentrytitle>pr</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more information.</para> before printing. See <citerefentry><refentrytitle>pr</refentrytitle><manvolnum>1</manvolnum></citerefentry> for more information.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -8576,8 +8581,8 @@
<listitem> <listitem>
<para>Use <emphasis remap=it>title</emphasis> on the <para>Use <emphasis remap=it>title</emphasis> on the
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pr">pr</ulink> <refentrytitle>pr</refentrytitle></citerefentry>
header instead of the file name. This option has effect header instead of the file name. This option has effect
only when used with the <option>-p</option> only when used with the <option>-p</option>
option.</para> option.</para>
@ -8601,28 +8606,28 @@
</para> </para>
<para>Here is an example: this command prints a nicely formatted <para>Here is an example: this command prints a nicely formatted
version of the <ulink version of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?ls">ls</ulink> manual <refentrytitle>ls</refentrytitle></citerefentry> manual
page on the default printer: page on the default printer:
<informalexample> <informalexample>
<screen>zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr <screen>zcat /usr/share/man/man1/ls.1.gz | troff -t -man | lpr
-t</screen> -t</screen>
</informalexample> The <ulink </informalexample> The <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?zcat">zcat</ulink> <refentrytitle>zcat</refentrytitle></citerefentry>
command uncompresses the source of the</para> command uncompresses the source of the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?ls">ls</ulink> manual <refentrytitle>ls</refentrytitle></citerefentry> manual
page and passes it to the <ulink page and passes it to the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?troff">troff</ulink> <refentrytitle>troff</refentrytitle></citerefentry>
command, which formats that source and makes GNU troff output command, which formats that source and makes GNU troff output
and passes it to <ulink and passes it to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, <refentrytitle>lpr</refentrytitle></citerefentry>,
which submits the job to the LPD spooler. Because we used the which submits the job to the LPD spooler. Because we used the
<option>-t</option> option to</para> <option>-t</option> option to</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink>, the <refentrytitle>lpr</refentrytitle></citerefentry>, the
spooler will convert the GNU troff output into a format the spooler will convert the GNU troff output into a format the
default printer can understand when it prints the job.</para> default printer can understand when it prints the job.</para>
@ -8632,8 +8637,8 @@
id="printing-lpr-options-job-handling"> id="printing-lpr-options-job-handling">
<title>Job Handling Options</title> <title>Job Handling Options</title>
<para> The following options to <ulink <para> The following options to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> tell <refentrytitle>lpr</refentrytitle></citerefentry> tell
LPD to handle the job specially:</para> LPD to handle the job specially:</para>
<para> <para>
@ -8717,8 +8722,8 @@
id="printing-lpr-options-misc"> id="printing-lpr-options-misc">
<title>Header Page Options</title> <title>Header Page Options</title>
<para> These options to <ulink <para> These options to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
adjust the text that normally appears on a job's header page. adjust the text that normally appears on a job's header page.
If header pages are suppressed for the destination printer, If header pages are suppressed for the destination printer,
these options have no effect. See section <xref these options have no effect. See section <xref
@ -8772,13 +8777,13 @@
<title>Administrating Printers</title> <title>Administrating Printers</title>
<para> As an administrator for your printers, you have had to <para> As an administrator for your printers, you have had to
install, set up, and test them. Using the <ulink install, set up, and test them. Using the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
command, you can interact with your printers in yet more ways. command, you can interact with your printers in yet more ways.
With</para> With</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink>, you <refentrytitle>lpc</refentrytitle></citerefentry>, you
can</para> can</para>
<para> <para>
@ -8816,14 +8821,14 @@
<para>In general, you have to have root privileges to use the</para> <para>In general, you have to have root privileges to use the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
command. Ordinary users can use the <ulink command. Ordinary users can use the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> command <refentrytitle>lpc</refentrytitle></citerefentry> command
to get printer status and to restart a hung printer only.</para> to get printer status and to restart a hung printer only.</para>
<para>Here is a summary of the <ulink <para>Here is a summary of the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> <refentrytitle>lpc</refentrytitle></citerefentry>
commands. Most of the commands takes a <emphasis commands. Most of the commands takes a <emphasis
remap=it>printer-name</emphasis> argument to tell on which remap=it>printer-name</emphasis> argument to tell on which
printer to operate. You can use <literal>all</literal> printer to operate. You can use <literal>all</literal>
@ -8879,8 +8884,8 @@
<para>Take a printer down. Equivalent to <command>disable</command> followed by <command>stop</command>. The <emphasis <para>Take a printer down. Equivalent to <command>disable</command> followed by <command>stop</command>. The <emphasis
remap=it>message</emphasis> appears as the printer's remap=it>message</emphasis> appears as the printer's
status whenever a user checks the printer's queue with status whenever a user checks the printer's queue with
<ulink <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpq">lpq</ulink> <refentrytitle>lpq</refentrytitle></citerefentry>
or status with <command>lpc or status with <command>lpc
status</command>.</para> status</command>.</para>
</listitem> </listitem>
@ -8966,11 +8971,11 @@
</variablelist> </variablelist>
</para> </para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> accepts <refentrytitle>lpc</refentrytitle></citerefentry> accepts
the above commands on the command line. If you do not enter any the above commands on the command line. If you do not enter any
commands, <ulink commands, <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpc">lpc</ulink> enters <refentrytitle>lpc</refentrytitle></citerefentry> enters
an interactive mode, where you can enter commands until you type an interactive mode, where you can enter commands until you type
<command>exit</command>, <command>quit</command>, or end-of-file.</para> <command>exit</command>, <command>quit</command>, or end-of-file.</para>
@ -9118,8 +9123,8 @@
what is listed in the <filename>/etc/printcap</filename> file what is listed in the <filename>/etc/printcap</filename> file
and what arguments the user specified for the job on the</para> and what arguments the user specified for the job on the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command line. For example, if the user typed <command>lpr command line. For example, if the user typed <command>lpr
-t</command>, LPD would start the troff filter, listed in the -t</command>, LPD would start the troff filter, listed in the
<emphasis remap=tt>tf</emphasis> capability for the destination <emphasis remap=tt>tf</emphasis> capability for the destination
@ -9384,8 +9389,8 @@
text-to-PostScript program you wish. The FreeBSD ports text-to-PostScript program you wish. The FreeBSD ports
collection (see <xref linkend="ports" remap="The Ports collection (see <xref linkend="ports" remap="The Ports
Collection">) includes a full featured text-to-PostScript Collection">) includes a full featured text-to-PostScript
program called <ulink program called <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=a2ps">a2ps</ulink> that you might want to investigate.</para> <refentrytitle>a2ps</refentrytitle></citerefentry> that you might want to investigate.</para>
</sect3> </sect3>
@ -9420,8 +9425,8 @@
for Hewlett Packard DeskJet 500 printers. For other printers, for Hewlett Packard DeskJet 500 printers. For other printers,
substitute the <option>-sDEVICE</option> argument to the</para> substitute the <option>-sDEVICE</option> argument to the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=gs">gs</ulink> (Ghostscript) command. (Type <command>gs -h</command> to get a list of devices the current installation of Ghostscript supports.) <refentrytitle>gs</refentrytitle></citerefentry> (Ghostscript) command. (Type <command>gs -h</command> to get a list of devices the current installation of Ghostscript supports.)
<informalexample> <informalexample>
<programlisting>#!/bin/sh # # ifhp - Print <programlisting>#!/bin/sh # # ifhp - Print
Ghostscript-simulated PostScript on a DeskJet 500 # Ghostscript-simulated PostScript on a DeskJet 500 #
@ -9571,8 +9576,8 @@
Invoked by lpd when user runs lpr -d # exec Invoked by lpd when user runs lpr -d # exec
/usr/local/bin/dvips -f | /usr/local/libexec/lprps /usr/local/bin/dvips -f | /usr/local/libexec/lprps
"$@"</programlisting> "$@"</programlisting>
</informalexample> This script runs <ulink </informalexample> This script runs <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvips">dvips</ulink> in filter mode (the <option>-f</option> argument) on standard input, which is the job to print. It then starts the PostScript printer filter <command>lprps</command> (see section <xref linkend="printing-advanced-if-conversion" <refentrytitle>dvips</refentrytitle></citerefentry> in filter mode (the <option>-f</option> argument) on standard input, which is the job to print. It then starts the PostScript printer filter <command>lprps</command> (see section <xref linkend="printing-advanced-if-conversion"
remap="Accommodating Plain Text Jobs on PostScript remap="Accommodating Plain Text Jobs on PostScript
Printers">) with the arguments LPD passed to this script. Printers">) with the arguments LPD passed to this script.
<command>lprps</command> will use those arguments <command>lprps</command> will use those arguments
@ -9664,11 +9669,26 @@
<para>Now, for the hard part: making the filter. For that, we <para>Now, for the hard part: making the filter. For that, we
need a DVI-to-LaserJet/PCL conversion program. The FreeBSD need a DVI-to-LaserJet/PCL conversion program. The FreeBSD
ports collection (see <xref linkend="ports" remap="The ports collection (see <xref linkend="ports" remap="The
Ports Collection">) has one: <ulink Ports Collection">) has one: <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvi2xx">dvi2xx</ulink> is the name of the package. Installing this package gives us the program we need, <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink>, which converts DVI into LaserJet IIp, LaserJet III, and LaserJet 2000 compatible codes.</para> <refentrytitle>dvi2xx</refentrytitle></citerefentry> is the
name of the package. Installing this package gives us the
program we need, <citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry>, which converts DVI into LaserJet IIp, LaserJet III, and LaserJet 2000 compatible codes.</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> makes the filter <command>hpdf</command> quite complex since <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> cannot read from standard input. It wants to work with a filename. What is worse, the filename has to end in <filename>.dvi</filename> so using <filename>/dev/fd/0</filename> for standard input is problematic. We can get around that problem by linking (symbolically) a temporary file name (one that ends in <filename>.dvi</filename>) to <filename>/dev/fd/0</filename>, thereby forcing <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj2p">dvilj2p</ulink> to read from standard input.</para> <refentrytitle>dvilj2p</refentrytitle></citerefentry> makes
the filter <command>hpdf</command> quite complex since
<citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry> cannot
read from standard input. It wants to work with a filename.
What is worse, the filename has to end in
<filename>.dvi</filename> so using
<filename>/dev/fd/0</filename> for standard input is
problematic. We can get around that problem by linking
(symbolically) a temporary file name (one that ends in
<filename>.dvi</filename>) to <filename>/dev/fd/0</filename>,
thereby forcing <citerefentry>
<refentrytitle>dvilj2p</refentrytitle></citerefentry> to read from standard input.</para>
<para>The only other fly in the ointment is the fact that we <para>The only other fly in the ointment is the fact that we
cannot use <filename>/tmp</filename> for the temporary link. cannot use <filename>/tmp</filename> for the temporary link.
@ -9724,8 +9744,8 @@
<para> All these conversion filters accomplish a lot for your <para> All these conversion filters accomplish a lot for your
printing environment, but at the cost forcing the user to printing environment, but at the cost forcing the user to
specify (on the <ulink specify (on the <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
command line) which one to use. If your users are not command line) which one to use. If your users are not
particularly computer literate, having to specify a filter particularly computer literate, having to specify a filter
option will become annoying. What is worse, though, is that option will become annoying. What is worse, though, is that
@ -9743,8 +9763,8 @@
you can still provide conversion filters just for them.</para> you can still provide conversion filters just for them.</para>
<para>The FreeBSD ports collection has a text filter that <para>The FreeBSD ports collection has a text filter that
performs automatic conversion called <ulink performs automatic conversion called <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=apsfilter">apsfilter</ulink>. It can detect plain text, PostScript, and DVI files, run the proper conversions, and print.</para> <refentrytitle>apsfilter</refentrytitle></citerefentry>. It can detect plain text, PostScript, and DVI files, run the proper conversions, and print.</para>
</sect4> </sect4>
</sect3> </sect3>
@ -9939,8 +9959,8 @@
they can suppress header pages by submitting the job with they can suppress header pages by submitting the job with
<command>lpr -h</command>; see <xref <command>lpr -h</command>; see <xref
linkend="printing-lpr-options-misc" remap="Header Page linkend="printing-lpr-options-misc" remap="Header Page
Options"> for more <ulink Options"> for more <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
options.</para> options.</para>
<note> <note>
@ -10439,8 +10459,8 @@
<para>If you feel multiple copies cause unnecessary wear and tear <para>If you feel multiple copies cause unnecessary wear and tear
on your printers, you can disable the <option>-#</option> option on your printers, you can disable the <option>-#</option> option
to <ulink to <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> by <refentrytitle>lpr</refentrytitle></citerefentry> by
adding the <emphasis remap=tt>sc</emphasis> capability to the adding the <emphasis remap=tt>sc</emphasis> capability to the
<filename>/etc/printcap</filename> file. When users submit jobs <filename>/etc/printcap</filename> file. When users submit jobs
with the <option>-#</option> option, they will see with the <option>-#</option> option, they will see
@ -10491,8 +10511,8 @@
:lp=:rm=rose:rp=bamboo:sd=/var/spool/lpd/bamboo:sc:</programlisting> :lp=:rm=rose:rp=bamboo:sd=/var/spool/lpd/bamboo:sc:</programlisting>
</informalexample> By using the <emphasis remap=tt>sc</emphasis> </informalexample> By using the <emphasis remap=tt>sc</emphasis>
capability, we prevent the use of <command>lpr -#</command>, but capability, we prevent the use of <command>lpr -#</command>, but
that still does not prevent users from running <ulink that still does not prevent users from running <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?lpr">lpr</ulink> <refentrytitle>lpr</refentrytitle></citerefentry>
multiple times, or from submitting the same file multiple times multiple times, or from submitting the same file multiple times
in one job like this: in one job like this:
<informalexample> <informalexample>
@ -10633,7 +10653,11 @@
<para>The format of these files is simple: one host name <para>The format of these files is simple: one host name
per line. Note that the file per line. Note that the file
<filename>/etc/hosts.equiv</filename> is also used by <filename>/etc/hosts.equiv</filename> is also used by
the <citerefentry><refentrytitle>ruserok</refentrytitle><manvolnum>3</manvolnum></citerefentry> protocol, and affects programs like <ulink URL="http://www.freebsd.org/cgi/man.cgi?rsh">rsh</ulink> and <ulink URL="http://www.freebsd.org/cgi/man.cgi?rcp">rcp</ulink>, so be careful.</para> the
<citerefentry><refentrytitle>ruserok</refentrytitle><manvolnum>3</manvolnum></citerefentry> protocol, and affects programs like <citerefentry>
<refentrytitle>rsh</refentrytitle></citerefentry> and
<citerefentry>
<refentrytitle>rcp</refentrytitle></citerefentry>, so be careful.</para>
<para>For example, here is the <para>For example, here is the
<filename>/etc/hosts.lpd</filename> file on the host <filename>/etc/hosts.lpd</filename> file on the host
@ -10802,8 +10826,8 @@
<xref linkend="printing-advanced-lpf" remap="lpf: a Text <xref linkend="printing-advanced-lpf" remap="lpf: a Text
Filter">, and</para> Filter">, and</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink>, a <refentrytitle>pac</refentrytitle></citerefentry>, a
program to gather and total entries from printer accounting program to gather and total entries from printer accounting
files.</para> files.</para>
@ -10839,11 +10863,11 @@
<para>When you are ready to charge users for printouts, run <para>When you are ready to charge users for printouts, run
the</para> the</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
program. Just change to the spooling directory for the printer program. Just change to the spooling directory for the printer
you want to collect on and type <ulink you want to collect on and type <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink>. You <refentrytitle>pac</refentrytitle></citerefentry>. You
will get a dollar-centric summary like the following: will get a dollar-centric summary like the following:
<informalexample> <informalexample>
<programlisting> Login pages/feet runs <programlisting> Login pages/feet runs
@ -10854,8 +10878,8 @@
rose:mary 87.00 32 $ 1.74 rose:root rose:mary 87.00 32 $ 1.74 rose:root
26.00 12 $ 0.52 total 337.00 154 26.00 12 $ 0.52 total 337.00 154
$ 6.74</programlisting> $ 6.74</programlisting>
</informalexample> These are the arguments <ulink </informalexample> These are the arguments <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
expects: expects:
<variablelist> <variablelist>
<varlistentry><term><option>-P<replaceable>printer</replaceable></option></term> <varlistentry><term><option>-P<replaceable>printer</replaceable></option></term>
@ -10926,8 +10950,8 @@
</variablelist> </variablelist>
</para> </para>
<para>In the default summary that <ulink <para>In the default summary that <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
produces, you see the number of pages printed by each user from produces, you see the number of pages printed by each user from
various hosts. If, at your site, host does not matter (because various hosts. If, at your site, host does not matter (because
users can use any host), run <command>pac -m</command>, to users can use any host), run <command>pac -m</command>, to
@ -10939,14 +10963,16 @@
$ 2.36 root 26.00 12 $ 0.52 $ 2.36 root 26.00 12 $ 0.52
zhang 9.00 1 $ 0.18 total zhang 9.00 1 $ 0.18 total
337.00 154 $ 6.74</programlisting> 337.00 154 $ 6.74</programlisting>
</informalexample> To compute the dollar amount due, <ulink </informalexample> To compute the dollar amount due,
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> uses <citerefentry>
<refentrytitle>pac</refentrytitle></citerefentry> uses
the <emphasis remap=tt>pc</emphasis> capability in the the <emphasis remap=tt>pc</emphasis> capability in the
<filename>/etc/printcap</filename> file (default of 200, or 2 <filename>/etc/printcap</filename> file (default of 200, or 2
cents per page). Specify, in hundredths of cents, the price per cents per page). Specify, in hundredths of cents, the price per
page or per foot you want to charge for printouts in this page or per foot you want to charge for printouts in this
capability. You can override this value when you run <ulink capability. You can override this value when you run
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> with <citerefentry>
<refentrytitle>pac</refentrytitle></citerefentry> with
the <option>-p</option> option. The units for the the <option>-p</option> option. The units for the
<option>-p</option> option are in dollars, though, not <option>-p</option> option are in dollars, though, not
hundredths of cents. For example, hundredths of cents. For example,
@ -10960,8 +10986,8 @@
summary information in a summary accounting file, which is named summary information in a summary accounting file, which is named
the same as the printer's accounting file, but with the same as the printer's accounting file, but with
<symbol>_sum</symbol> appended to the name. It then truncates <symbol>_sum</symbol> appended to the name. It then truncates
the accounting file. When you run <ulink the accounting file. When you run <citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?pac">pac</ulink> <refentrytitle>pac</refentrytitle></citerefentry>
again, it rereads the summary file to get starting totals, then again, it rereads the summary file to get starting totals, then
adds information from the regular accounting file.</para> adds information from the regular accounting file.</para>
@ -10992,8 +11018,10 @@
<para>Well, for DVI-to-LaserJet or DVI-to-PostScript conversion, <para>Well, for DVI-to-LaserJet or DVI-to-PostScript conversion,
you can have your filter parse the diagnostic output of</para> you can have your filter parse the diagnostic output of</para>
<para><ulink <para><citerefentry>
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvilj">dvilj</ulink> or <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&amp;query=dvips">dvips</ulink> and look to see how many pages were converted. You might be able to do similar things with other file formats and conversion programs.</para> <refentrytitle>dvilj</refentrytitle></citerefentry> or
<citerefentry>
<refentrytitle>dvips</refentrytitle></citerefentry> and look to see how many pages were converted. You might be able to do similar things with other file formats and conversion programs.</para>
<para>But these methods suffer from the fact that the printer may <para>But these methods suffer from the fact that the printer may
not actually print all those pages. For example, it could jam, not actually print all those pages. For example, it could jam,