Chapter 5. Printing

Table of Contents
5.1. Installing and managing printers
5.1.1. Install CUPS and browse its web interface
5.1.2. Configure a new printer
5.1.3. A note about security
5.1.4. Managing print jobs
5.2. Printing documents
5.2.1. Just print a file
5.2.2. Advanced configuration

This chapter is divided in two parts: Installing and managing printers, devoted to people administering their machine; and Printing documents, that explains how to use an advanced printing tool: XPP.

5.1. Installing and managing printers

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

5.1.1. Install CUPS and browse its web interface

CUPS being now the default printer manager for Linux-Mandrake, 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 an application for KDE called Kups. We already talked about the latter in the User Guide and we will now concentrate on the web interface as it is accessible from any platform.

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

Figure 5-1. The CUPS welcome page

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

5.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 5-2) should look empty for now.

Figure 5-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 5-3). Simply provide the root login and password here.

Figure 5-3. The CUPS login dialog

5.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 5-4. Adding a new printer, step 1

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

5.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, then choose Parallel Port #1, Serial Port, or USB depending on the type of connection.

Figure 5-5. Adding a new printer, step 2

Many types of connections are available:

Ethernet

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.

5.1.2.3. Choose the brand name of your printer

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

Figure 5-6. Adding a new printer, step 3

5.1.2.4. Choose your printer's model

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

Figure 5-7. Adding a new printer, step 4

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

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

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.

5.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 should'nt 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:

/etc/rc.d/init.d/cups restart

5.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 5-8).

Figure 5-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 kups program.

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. 2000.
http://www.linux-mandrake.com/