Книга: Fedora™ Unleashed, 2008 edition

Overview of Fedora Printing

Overview of Fedora Printing

Fedora's print filter system is the main engine that enables the printing of many types of documents. The heart of that engine is the GNU GPL version of Aladdin's Ghostscript interpreter, the gs client. The system administrator's printer configuration tool is the system-config-printer client.

NOTE

Fedora's print system can be used to print to local (attached) or remote (network) printers. If you use a local printer, it is represented by a printer device, such as /dev/ip0 or /dev/usb/ip0 (if you have a USB printer). Local and remote printers use print queues defined in your system's printer capabilities database, /etc/printcap. A document being printed is known as a print job, and you can view and control your list, or queue, of current print jobs in the spool directory, which is /var/spool/cups. Note that you may control only your print jobs; only the root operator can control print jobs of any user on the system.

To add a printer to your system, you use the system-config-printer client to create, configure, and save the printer's definition. The client saves the definition as an entry in your system's printer capabilities database, /etc/printcap. Each definition contains a text field with the name of the printer, its host, and name of the print queue. Printed documents are spooled to the /var/spool/cups directory. A sample printcap definition might look like the following:

# This file was automatically generated by cupsd(8) from the
# /etc/cups/printers.conf file. All changes to this file
# will be lost.
Officejet|Officejet Pro K5400:rm=teletran.hudson.com:rp=Officejet:

CUPS maintains its own database of defined printers under the /etc/cups directory in a file named printers.conf. For example, an associated printer defined in /etc/printcap previously might have the following entry in /etc/cups/printers.conf:

# Printer configuration file for CUPS v1.3.3
# Written by cupsd on 2007-10-28 19:30 <DefaultPrinter Officejet>
Info Officejet Pro K5400 Location Office
DeviceURI socket://192.168.0.100:9100
State Idle
StateTime 1193599791
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default ErrorPolicy stop-printer </Printer>

This example shows the definition for the printer named lp, along with its associated device, description, state, and other information. The various possible fields and entries in this file are documented in the printer.conf man page.

CUPS uses a print server (daemon) named cupsd, also called a scheduler in the CUPS documentation. The server can be controlled, like other Fedora services, by the service command or system-config-services client. How the server works on a system is determined by settings in its configuration file, cupsd.conf, found under the /etc/cups directory. CUPS executables are found under the /usr/lib/cups directory.

The cupsd.conf man page documents more than 80 different settings for the server, which you can configure to match your system, network, or printing environment. Default CUPS-related files and directories are stored under the /usr/share/cups directory. Logging can be set to seven different levels, with information about access and errors stored in log files under the /var/log/cups directory.

Resource requirements can be tailored through other settings, such as MaxCopies to set the maximum number of copies of a print job by a user, MaxJobs to set a limit on the number of active print jobs, and MaxJobsPerUser to set a limit on the number of active jobs per user. The RIPCache setting (8MB by default) controls the amount of memory used for graphics cache during printing.

For example, if you want to limit printing to 20 copies of a document or page at a time and only 10 simultaneous print jobs per user, use settings such as the following:

MaxCopies 20
MaxJobsPerUser 10

TIP

Do not forget to restart the CUPS server after making any changes to its configuration file. Changes are activated only when the service is restarted (when the daemon rereads its configuration file). See the "GUI-Based Printer Configuration Quick Start" section later in this chapter.

Because CUPS does not use the traditional Berkeley-style print spooling system, lpd, you can change the name of the printer capabilities database from the default /etc/printcap. Encryption can be used for printing, with secure access behavior determined by settings in /etc/cups/client.conf. Network access settings include port, connection, IP address, domains, and limits to the number and size of client requests.

Оглавление книги


Генерация: 0.998. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз