Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
CUPS Administrative Guide

You're reading from  CUPS Administrative Guide

Product type Book
Published in Sep 2008
Publisher
ISBN-13 9781847192585
Pages 248 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Ankur Shah Ankur Shah
Profile icon Ankur Shah

Table of Contents (16) Chapters

CUPS Administrative Guide
Credits
About the Author
1. Acknowledgement
About the Reviewer
2. Preface
1. Introduction 2. Building and Installing CUPS 3. Printer Management 4. Managing Multiple Printers at a Time 5. CUPS Server Management 6. Client Setup 7. Quota Management 8. Monitoring CUPS 9. File Typing and Filtering 10. Security

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

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


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:

$lpstat -t

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.

$lp file

or

$lpr file

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:

$lpstat

cupsprinter-1 kajol 1261 Mar 17 19:48

The following example shows that the user kajol currently has no print requests in queue:

$lpstat -u kajol

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.

Administration

The administration window in the CUPS web interface looks like this:

Adding a New Printer

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...

Summary


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.

lock icon The rest of the chapter is locked
You have been reading a chapter from
CUPS Administrative Guide
Published in: Sep 2008 Publisher: ISBN-13: 9781847192585
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}