Chapter 3. Printer Management
To manage printers in CUPS, the printer name and the driver for the printer are very important. In this chapter, we are going to discuss the various types of printer drivers that CUPS supports, and how to get and use them in CUPS. We will also discuss two highly popular methods for printer management—a command-line tool, and a web based graphical user interface (GUI).
Apart from these two, the KDEPrint and system-config printers are the utilities that are also used to add and manage printers. These utilities have their sets of screens that are more or less similar to the web interface of CUPS.
Printer drivers are pieces of software that convert the data to be printed in a form that can be understood by the printer. Printer drivers allow the applications to print without being aware of the technical details of each printer model that means "they are responsible for sending the characteristic information of the printer to the OS". Although, besides...
Printer drivers are pieces of software that convert the data to be printed in a form that can be understood by the printer. Printer drivers allow the applications to print without being aware of the technical details of each printer model that means "they are responsible for sending the characteristic information of the printer to the OS". Although, besides the PostScript language, CUPS understands other formats such as PDF, image, and text, but it normally converts them into PostScript.
PostScript Printer Description (PPD) Drivers
Let us first understand what is PostScript. PostScript is a platform-independent page description language which is used by many middle and high-end laser printers, and even by some high-end inkjet printers.
The PPD (Postscript Printer Description) files written in PostScript language are used by CUPS to describe printer technical details that are required by the OS to understand each printer model. Normally, PostScript printers are always shipped...
Managing Printer through the Command Line
In order to add the printer, you must first check which printers are already available on the system, so as not to assign the new printer to a port that is already in use. To check the system for printers and their status, you can use the lpstat
command. The following will allow you to see the status of all the printers on the system, as well as the scheduler and the jobs:
If your system does not have any printers installed currently, the output should look something like this:
scheduler is running
no system default destination
Once you have confirmed that the scheduler is running and the device you want to use is free, the next step is to add the printer using the lpadmin
command. The lpadmin
command allows you to perform most printer administration tasks from the command-line. It is normally located in /usr/sbin
.
Basic Command for Adding the Printer
Setting up a printer correctly in CUPS depends on two critical choices—printer device...
Managing Print Jobs through Command Line
One of the most useful features in CUPS is its ability to manage print jobs. This section deals with the various features CUPS offers to manage print jobs via the command line interface.
Submitting Files for Printing
CUPS provides both the System V lp
and Berkeley lpr
for printing commands. You need to type the following command to print a file to the default printer on your system.
or
As we know, CUPS can understand various types of files directly that include PostScript, text, PDF, and image files. This allows you to print from within your applications or through the command-line.
Checking the Status of Print Jobs
The following example shows that user kajol
has one print request queued to the printer CUPSLaser
:
cupsprinter-1 kajol 1261 Mar 17 19:48
The following example shows that the user kajol
currently has no print requests in queue:
The following example shows that two print requests are queued...
Managing Printers using the CUPS Web Interface
In this section, we will discuss above mentioned functions related to printer and job using CUPS web interface.
The CUPS web server provides a user-friendly interface for adding your printers. Rather than figure out which device URI and PPD files to use, you can instead click on the appropriate listings and fill in some simple information. Enter the following URL in your web browser to begin: http://localhost:631/admin
.
The following screen should appear within your browser. We can see a number of tabs such as Administration, Classes, Documentation/Help, Jobs, and Printers within this page.
The administration window in the CUPS web interface looks like this:
Clicking on Add Printer shows you the following screen:
You will need to fill in an appropriate name for your printer. You can also specify the location, and a description for the given printer which helps people recognize the printer. But these fields are...
In this chapter, we have seen various ways to add and manage printers using CUPS. The command line interface—lpadmin
and web interface are two widely used methods that we have looked at in detail. In the next chapter, we will see how to work with and manage printer classes.