Section 15.1. An Overview of Printing


15.1. An Overview of Printing

There are several implementations of printing available for Linux systems, but they all have a basic architecture in common. In every printing system, a central daemon receives print jobs, via either a user command (such as lpr) or the network. The print job is then processed as necessary and either sent to a local printer or another printing daemon.

Historically, there have been two competing printing implementations on Unix systems, one invented for BSD Unix, and another for System V (SysV) Unix. While the implementations are similar, they have completely different commands. The BSD printing commands include lpd, lpr, lprm, and lpc. The System V printing commands include lp, enable, disable, cancel, lpstat, and lpadmin. Table 15-1 compares the commands used by the two printing systems.

Table 15-1. BSD versus SysV printing

Description

BSD command

System V command

Printing daemon

lpd

lpsched

Print files

lpr

lp

List print queues

lpq

lpstat -o

Remove files from a queue

lprm

cancel

Enable a queue

lpc enable

enable

Disable a queue

lpc disable

disable

Move a job to another queue

lpc move

lpmove


On System V-based systems, there is a command, lpadmin, used to configure print queues. There is no equivalent to it on BSD-based systems, other than to simply edit /etc/printcap. Other than that one command, there is a one-to-one relationship between BSD and System V printing commands. However, the internal details, such as files used, vary considerably.

Older Linux distributions tended to use a port of the BSD lpd code (and related commands). Due to various security issues with the BSD code (mostly the over-use of root), current distributions have largely dropped the BSD code in favor of either LPRng or Common UNIX Printing System (CUPS).

LPRng is a complete rewrite of the BSD utilities. It is designed to be portable and secure. Unlike the BSD utilities, the client programs do not need to run setuid. The server (still called lpd) is a complete implementation of the RFC 1179 Line Printer Daemon Protocol. It also includes lp and lpstat commands for System V compatibility.

While LPRng is a complete rewrite, configuration is still mostly the same as for the BSD utilities. It still uses /etc/printcap (described in "Linux Printing Overview" later in this chapter). It also has two additional configuration files: /etc/lpd.conf, which is used to control details of LPRng's lpd, and /etc/lpd.perms, which is used to configure access controls for lpd.

LPRng is available from http://www.lprng.com.

CUPS is a more recent printing system that was initially designed to support Internet Printing Protocol (IPP) but has evolved into drop-in replacement for both the BSD and System V utilities, including client replacements for both and RFC 1179 (lpd protocol) support. It also includes support for SMB and JetDirect printing.

While it retains backward compatibility with older printing systems, the internal details of CUPS are significantly different. The server component cupsd handles queueing, but it also includes a web server for configuration and management. Nearly everything can be configured through the web interface or the included lpadmin. The various configuration files in the /etc/cups directory rarely need to be edited by hand.

CUPS is available from http://www.cups.org.



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net