Prior to the current release of Red Hat Linux, there were two major printing services offered with Red Hat Linux: CUPS and LPRng. Although LPRng has been dropped from the distribution, the LPRng package is still available and still can be used with Red Hat Linux. The following sections discuss some of the characteristics of those two services.
CUPS has become the standard for printing from Linux and other UNIX-like operating systems. Instead of being based on older, text-based line printing technology, CUPS was designed to meet today's needs for standardized printer definitions and sharing on IP-based networks (such as the Internet). Here are some features of CUPS:
IPP — At its heart, CUPS is based on the Internet Printing Protocol (www.pwg.org/ipp), a standard that was created to simplify how printers can be shared over IP networks. In the IPP model, printer servers and clients who want to print can exchange information about the model and features of a printer using HTTP (that is, Web content) protocol. A server could also broadcast the availability of a printer, so a printing client can easily find a list of locally-available printers.
Drivers — CUPS also standardized how printer drivers are created. The idea was to have a common format that could be used by printer manufacturers that could work across all different types of UNIX systems. That way, a manufacturer only had to create the driver once to work for Linux, Mac OS X, and a variety of UNIX derivatives.
Printer classes — Using printer classes, you can create multiple print server entries that point to the same printer or one print server entry that points to multiple printers. In the first case, multiple entries could each allow different options (such as pointing to a particular paper tray or printing with certain character sizes or margins). In the second case, you could have a pool of printers so that printing is distributed. This would decrease the occurrence of congested print jobs, caused by a malfunctioning printer or a printer that is dealing with very large documents.
UNIX print commands — To integrate into Linux and other UNIX environments, CUPS offers versions of standard commands for printing and managing printers that have been traditionally offered with UNIX systems. (See the "Switching printing service" section for information on how to have CUPS take over these standard commands.)
The Printer configuration window (redhat-config-printer command) lets you configure printers that use the CUPS facility. However, CUPS also offers a Web-based interface for adding and managing printers. Configuration files for CUPS are contained in the /etc/cups directory. In particular, you might be interested in the cupsd.conf file (which identifies permission, authentication, and other information for the printer daemon) and printers.conf (which identifies addresses and options for configured printers).
The LPRng print service is an extended version of the old Berkeley UNIX LPR print spooler facility. It was designed to work in networked computing environment, where multiple printers and queues needed to be managed. While still supporting older printing commands (lpr, lpq, lprm, and others), it added many administrative and security features (such as support for Kerberos and PGP authentication).
If you have used LPRng in previous releases of Red Hat Linux, you should consider switching to CUPS. By default, the procedures in this chapter use CUPS as the underlying print service.
CUPS is the preferred alternative to LPRng in Red Hat Linux. CUPS is based on the Internet Printing Protocol, whose purpose is to standardize printing service across all UNIX platforms (including Linux).
CUPS supports many of the same interfaces that are in LPRng. Thus, if you decide to replace LPRng with CUPS, you can still use the following commands to print and manage documents:
cancel or lprm — Cancels a print job.
lp or lpr — Prints a document.
lpc — Controls print service operation. (Although in CUPS it only lists printer status.)
lpq — Views print queues.
lpstat — Views the status of the print service.
In other words, after you replace the underlying print service, you and the others who print on your Red Hat Linux system should still be able to use the print service as you did before. (Most of these basic printing commands are described later in this chapter.)
To use CUPS, you must install the htmlview and cups packages installed from CD #1.
You can switch to CUPS easily by using the alternatives feature. The alternatives system links the printing commands into the new service via the Red Hat Printer Switcher window. Then, all you have to do is start up the CUPS daemon instead of the LPRng daemon for CUPS to take over. (Chapter 10 shows you how to use the alternatives system to switch to CUPS. Switching service to CUPS enables new printing commands, stops the lpd daemon, and starts the cupsd daemon.)
Although switching LPRng for CUPS isn't too difficult, you must still do some work to configure CUPS. The following sections provide an overview of configuring CUPS as your printing service.