Chapter 11. Printing

Table of Contents
11.1. Installing And Managing Printers
11.1.1. Install CUPS And Browse Its Web Interface
11.1.2. Configure a New Printer
11.1.3. A Note About Security
11.1.4. Managing Print Jobs
11.2. Printing Documents
11.2.1. Just Print a File
11.2.2. Advanced Configuration

This chapter is divided in two parts: Installing And Managing Printers, devoted to people administering their own machines; and Printing Documents, which explains how to use an advanced printing tool: XPP.

11.1. Installing And Managing Printers

Starting from release 7.2, Mandrake Linux began using the new printing system based on cups [1]. This is a very powerful tool based on decentralized management and configuration, making all printers in a local network available to all users.

11.1.1. Install CUPS And Browse Its Web Interface

cups is now the default printer manager for Mandrake Linux, and all necessary packages should be installed by default. If it is not the case, make sure that at least the packages cups, cups-drivers and xpp are installed.

Note

There are basically two ways to manage your printers with cups: a web interface and a manager part of the KDE Control Center (System->Printing Management). We chose to concentrate on the web interface as it is accessible from any platform and allows for remote printing management. You can get full documentation about KDE printing tools at their web site.

From your preferred web browser, simply type http://localhost:631/ in the location or URL field. It will display the main cups menu (figure 11-1).

Figure 11-1. The CUPS Welcome Page

You can now browse the configuration interface like a web site.

11.1.2. Configure a New Printer

Depending whether your LAN already has machines with cups installed and running, you may see a list of printers under the Manage Printers link. We will assume that you are now installing a printer connected to your stand-alone computer. For more complex configurations consult the On-Line Help.

The Manage Printers page (figure 11-2) should look empty for now.

Figure 11-2. The Empty CUPS Printers List

To configure a new printer, now click on the Add Printer button at the bottom of the page. It will begin a four-step procedure. To go from one step to the following click the Continue button after filling-in all required fields on the page.

Note

The first time you want to perform an administrative task with cups, it will ask you for the root password (figure 11-3). Simply provide the root login and password here.

Figure 11-3. The CUPS Login Dialog

11.1.2.1. Provide Informal Information About The Printer

This first form presents three fields you can fill-in at your convenience to help other users know which physical printer they deal with. The text has no influence on the printer's behavior, but fill them in carefully anyway, to save confusion later.

Figure 11-4. Adding a New Printer, Step 1

The printer's name is the only required field here.

Warning

Remember to plug in your printer and power it on, so that it will be automatically detected during the setup.

11.1.2.2. Tell Where The Printer Is Connected

You need to tell cups where the printer is physically located. For a printer directly connected to your computer, choose Parallel Port, Serial Port, or USB depending on the type of connection. Note that if you have a serial printer, you will need to install the package cups-serial. USB printers must also be connected and powered on.

Figure 11-5. Adding a New Printer, Step 2

Many other types of connections are available:

Appsocket/HP jetdirect

For printers directly connected to a local area network.

LPD/LPR

For printers that directly implement this type of behavior, or printers served by this type of queue. UNIX OSes, generally provide this type of connection.

Samba

For printers served by Windows servers. Note that to connect to that kind of printer, you need to install the Samba package.

Note

We will not document those types of connection here, since their configuration is rather straight forward provided you have collected the required information previously.

11.1.2.3. Choose The Brand Name of Your Printer

Figure 11-6. Adding a New Printer, Step 3

It is now time to tell cups which printer you are installing. You simply need to highlight the manufacturer's name in the list.

11.1.2.4. Choose Your Printer's Model

Figure 11-7. Adding a New Printer, Step 4

This is the final step, according to your previous choice, the list now shows all models from that specific manufacturer. Choose your model carefully.

If all goes well, you should now see your new printer in the Printers page.

11.1.2.5. Final Configuration And Test

Before testing the printer, you must ensure that the paper size configuration for that printer is correct. Go to the printer page, and click on Configure Printer. From the printer's parameters page, go to the General section and choose the appropriate Page Size. Some printers refuse to print if they do not have the appropriate paper loaded. For color printers it may also be necessary to select the appropriate color cartridge.

Warning

Concerning the parameters page: whenever you change a parameter in a section, you must click the corresponding Continue button in order to make your changes take effect.

11.1.3. A Note About Security

By default whenever you configure a printer on your machine, it becomes available for other people on your local area network. If you prefer that people shouldn't be able to print on your printer, you need to manually edit the cups configuration file: /etc/cups/cupsd.conf. You simply need to replace the line
#BrowseInterval 30
by
BrowseInterval 0
Also, this file contains a lot of options that allow you to finely tune your printer server. In particular, you can restrict access from specific machines or sub-networks. For more information consult the many comments within the configuration file or consult the online help from the web interface.

Tip

Whenever you make changes to the configuration file, do not forget to restart the cups daemon server by issuing:
service cups restart
as root.

11.1.4. Managing Print Jobs

This feature is mostly useful for very busy printers, but you may need it occasionally to cancel a wrong printout of 10,000 pages for example. When you send a job to a printer you can consult your jobs, and possibly all jobs from all users if you are the administrator for the machine hosting that printer, by displaying the page specific to the printer (figure 11-8).

Figure 11-8. The Printer Status Page

You can then perform two different actions on a specific job:

  • Hold Job: To put the job on a waiting list, it'll be printed only when you come back to this job and press the green Release Job button.

  • Cancel Job: to definitely cancel this job (take it out of the queue).

If you wish to make your printer temporarily unavailable (to change the toner for example) you can simply click on the Reject Jobs button. Then when the printer is ready to accept jobs again, click on the Accept Jobs button.

Tip

If you are interested in job handling capabilities, please refer to the Printing Manager of the KDE Control Center.

Notes

[1]

Common Unix Printing System


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2002.
http://www.mandrakelinux.com/