The last installment of Ask the Geek discussed Web-based configuration of the CUPS (Common Unix Printing System) software. If you haven't read the last two installments, please see Resources for links. The CUPS software offers a universal, standards-compliant printing system for Linux/Unix. This week, I will discuss CUPS configuration via the KDE/QT interfaces.
CUPS's basic install does not include a graphical client. It includes only command-line utilities and a Web-based interface, which works well and has many capabilities. However, you might sometimes prefer to use a native KDE interface. (If you prefer GNOME, please see Resources for some GNOME interfaces.)
Why Mandrake?
Since my last column, I have given up on Red Hat 6.2 and moved to Mandrake
7.2. I use Mandrake at home, but I had standardized the office on Red Hat. After running Mandrake 7.2 for about a month, my office setup is about to change. One reason I prefer Mandrake 7.2 is that it comes with CUPS; this has saved folks a lot of time when configuring.
Mandrake installs two packages with the basic CUPS distributions: qtcups and kups. qtcups is required for kups to work. If you don't run KDE, you can use qtcups without kups to graphically configure CUPS.
I will not describe qtcups in much detail here, but will instead focus on kups.
It's printer time
You can start qtcups by typing qtcups at a prompt or selecting the qtcups icon from the K menu. When you start qtcups, you will see in Figure 1 that it is remarkably similar to the Microsoft Windows print manager.
 |
Figure 1. The print-manager window in qtcups |
You can select your printer using the drop-down box, and set the printer's properties with the Properties box. If you use qtcups, you must use the command-line or Web-based utilities to add a printer.
The kups program is not so limited; it can completely replace the Web-based administration. You can also add printers and classes, manage print jobs, and so on.
To start the kups program, type kups at a command prompt. If you want to actually add and delete printers, you need to log in as root.
When kups first starts up, it looks like this (Figure 2):
 |
Figure 2. The print-manager window in kups |
The left pane is a drop-down tree of available classes and printers; you
can see that my printer is an HP4. The right pane displays information on a particular object. For example, if I click on the HP4 icon under All Printers, the program shows information about the HP4 printer: my printer is a remote printer and its URI (location) is my associate's machine, named "lx." It also displays the IP address, the printer state, and a description of the printer.
 |
|
Figure 3. Managing printer jobs. |
The right pane has a second tab, used to view and manage a particular printer's jobs. If multiple print jobs are waiting, you can select the Jobs tab for a printer. You can also perform basic tasks, like removing all of the jobs or moving a specific job to a different printer. (Figure 3.)
If you select File and then the Options dialog, you can set the CUPS server information. The Options windows ask you for basic information, like which username, password, and CUPS host you want to manage. The default configuration is to use the user root and the user root's password. You can also reach the Options screen by clicking on the wrench icon. (Figure 4.)
 |
|
Figure 4. Setting server information |
Figure 5 shows kups managing my HP4, which is connected to the "lx" machine. Figure 6 shows kups managing the same HP4, but with the cups program located on the "lx" machine.
 |
|
Figure 5. Managing the HP4 on my machine |
 |
|
Figure 6. Managing the same HP4
|
To add printers using kups, click on the printer with the star icon to start the CUPS AddPrinter wizard (Figure 7).
 |
|
Figure 7. The AddPrinter wizard |
After you click Next, the wizard walks you through the configuration, which is very similar to the Web-based interface. It first asks you for the back end; we will select SMB, the protocol used to talk to Microsoft-Windows-based machines.
The wizard then asks you for a username and password. If you do not need either to print to the shared printer, you can just select the "guest account" option. Hit Next and the wizard asks you to enter the basic windows information for SMB. This information includes the work group, server, and name of the shared printer (Figure 8).
 |
|
Figure 8. SMB printer selection window |
Once you have set up the network portion, kups asks for the model. The default installation of CUPS comes with drivers for Epson- and HP-based printers only. You can get more drivers from Websites like LinuxPrinting.org and the Kups Website. (See Resources for links.)
If you have already installed a driver that is not an Epson or HP, you can select the "have driver" option and choose the correct file with a file browser.
 |
|
Figure 9. The Confirmation window |
After selecting your driver, you must provide information such as the printer's name, description, and physical location. The printer name is the name you use to specify which printer to print to from applications. Mine is "myHP4." After you supply the information, the wizard takes you to a confirmation page, where you can select "OK." (Figure 9.)
You can now test the printer by selecting it in the left-hand pane, right-clicking, and selecting "test printer."
Now, you can change a few printer options. My LaserJet driver defaults to 300 dpi. My HP4 can, however, print at 600 dpi. To change the dpi, I can just right-click on the printer and select "configure printer." In Figure 10, a small window pops up with several options.
 |
|
Figure 10. Changing options |
 |
|
Figure 11. Changing output resolution |
When I select Output Resolution, the program opens the lower window and allows me to select the output quality. As you can see in Figure 11, I have the option of 150, 300, or 600 dpi.
Other tasks -- such as disabling a printer to change the toner, or removing the printer entirely -- can be done by right-clicking on the printer and making the appropriate selection.
What's next?
As you can see, the kups interface takes Linux printing's functionality and ease of use to a new level. Unless you are a command-prompt hound, there is absolutely no reason not to use a graphical interface for printing. The kups program lets you do everything necessary, within a simple-to-use interface.
We just covered basic navigation and connecting to the machine with kups. In my next column, I will wrap up the kups series by analyzing the configuration of the cupsd.conf, using the CUPS server configuration that comes with the kups program.
If you have any questions about the CUPS series or anything else Linux-related, please drop me a line or post it in the Ask the Geek discussion forum. We just might feature it! See you in two weeks.
Resources