Printing

This chapter contains spooling printer management systems and ghostscript applications to render PostScript for display on terminals or paper.

CUPS-1.1.23

Introduction to CUPS

The Common Unix Printing System (CUPS) is a print spooler and associated utilities. It is based on the "Internet Printing Protocol" and provides printing services to most PostScript and raster printers.

Package Information

CUPS Dependencies

Recommended

libjpeg-6b, libpng-1.2.8, and libtiff-3.7.3

Optional

OpenSSL-0.9.7g or GnuTLS (which needs libgpg-error, libgcrypt and opencdk, in that order), Linux-PAM-0.80, PHP-5.0.4, Python-2.4.1, JDK-1.5.0, OpenSLP, libpaper and Valgrind (optionally used if running the test suites)

Installation of CUPS

Create an lp user, as CUPS will install the lppasswd command SUID to this user. Use the following command as the root user:

useradd -c "Print Service User" -d /dev/null -g lp -s /bin/false -u 9 lp

If you utilize Linux-PAM, you need to modify some files so CUPS can find needed headers. Make the appropriate modifications using the following command:

sed -i -e "s@pam/pam@security/pam@g" \
{config-scripts/cups-pam.m4,scheduler/auth.c,configure}

Install CUPS by running the following commands:

./configure &&
make

Now, as the root user:

make install

Command Explanations

The basic default behavior of the installation is appropriate for LFS systems. CUPS files are placed in /usr/bin, /usr/sbin, /var and /etc/cups.

Configuring CUPS

Configuration of CUPS is dependent on the type of printer and can be complex. Generally, PostScript printers are easier. For detailed instructions on configuration and use of CUPS, see http://www.cups.org/documentation.php. The Software Administrators Manual and Software Users Manual are particularly useful.

For non-PostScript printers to print with CUPS, you need to install ESP Ghostscript-7.07.1 to convert PostScript to raster images and a driver (e.g., from Gimp-Print-4.2.7) to convert the resulting raster images to a form that the printer understands. Foomatic drivers use Ghostscript to convert PostScript to a printable form directly, but this is considered to be a hack by CUPS developers.

Boot Script

During the install, CUPS created the startup file /etc/rc.d/init.d/cups. The file works, but you may want to change it to a more conventional LFS startup file by installing the script included in the blfs-bootscripts-6.1 package:

make install-cups

Contents

Installed Programs: accept, cancel, cups-config, cupsaddsmb, cupsd, cupstestppd, disable, enable, lp, lpadmin, lpc, lpinfo, lpmove, lpoptions, lppasswd, lpq, lpr, lprm, lpstat, and reject
Installed Libraries: libcups.[so,a], libcupsimage.[so,a], and various filters and backend drivers
Installed Directories: /etc/cups, /usr/include/cups, /usr/lib/cups, /usr/share/doc/cups, /usr/share/cups, /var/log/cups, and /var/spool/cups

Short Descriptions

accept

instructs the printing system to accept print jobs to the specified destinations.

cancel

cancels existing print jobs from the print queues.

cups-config

is a CUPS program configuration utility.

cupsaddsmb

exports printers to the Samba software for use with Windows clients.

cupsd

is the scheduler for the Common Unix Printing System.

cupstestppd

tests the conformance of PPD files.

disable

stops the named printers or classes.

enable

starts the named printers or classes.

lp

submits files for printing or alters a pending job.

lpadmin

configures printer and class queues provided by CUPS.

lpc

provides limited control over printer and class queues provided by CUPS.

lpinfo

lists the available devices or drivers known to the CUPS server.

lpmove

moves the specified job to a new destination.

lpoptions

displays or sets printer options and defaults.

lppasswd

adds, changes or deletes passwords in the CUPS digest password file passwd.md5.

lpq

shows the current print queue status on the named printer.

lpr

submits files for printing.

lprm

cancels print jobs that have been queued for printing.

lpstat

displays status information about the current classes, jobs, and printers.

reject

instructs the printing system to reject print jobs to the specified destinations.

Last updated on 2005-08-01 13:29:19 -0600