Information Technology Reference
In-Depth Information
Printer usage is controlled by the enable(1) and disable(1) commands and
specifying the name of a defined printer as a command-line argument. A
printer cannot be used for printing until it is enabled. The lpstat command
with the -p command-line argument can be used to determine the
enabled/disabled printer status. The following listing uses defined printer
laser1 as an example:
# lpstat -p laser1
printer laser1 disabled since
Tue Aug 6 19:29:48 EDT 2002. available.
unknown reason
# enable laser1
printer “laser1” now enabled
# lpstat -p laser1
printer laser1 is idle. enabled since
Mon Aug 12 09:18:51 EDT 2002. available.
#
Defining Printer Classes
A printer class is a group of one or more printers assigned to a printer class
name. When a print request is submitted to a printer class instead of a print-
er, the first available printer in the class is used to print the request. The
lpadmin command is used to define printer classes by assigning a printer to
the class. Additional printers can be assigned using the same command. The
following listing shows how to use the lpadmin command to create a printer
class called draft by assigning the printer laser1 to it:
# lpadmin -p laser1 -c draft
#
A printer class can also be deleted using the lpadmin command as shown in
the following listing:
# lpadmin -r draft
#
Printers in a class are checked for availability based on the order in which they are
added to the class. Best printing performance can be achieved by adding the fastest
printers to the class first, and then adding the slower printers.
Printing Files (Submitting Print Requests)
The lp(1) command is used to submit one or more files to be printed. A des-
tination printer can be selected by specifying the -d command-line argument.
Search WWH ::




Custom Search