The
printing
Printing is a process for mass reproducing text and images using a master form or template. The earliest non-paper products involving printing include cylinder seals and objects such as the Cyrus Cylinder and the Cylinders of Nabonidus. The ...
subsystem of
UNIX System V
Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
is one of several standardized systems for printing on Unix, and is typical of commercial System V-based Unix versions such as
Solaris
Solaris is the Latin word for sun.
It may refer to:
Arts and entertainment Literature, television and film
* ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem
** ''Solaris'' (1968 film), directed by Boris Nirenburg
** ''Sol ...
and
SCO OpenServer
Xinuos OpenServer, previously SCO UNIX and SCO Open Desktop (SCO ODT), is a closed source computer operating system developed by Santa Cruz Operation (SCO), later acquired by SCO Group, and now owned by Xinuos. Early versions of OpenServer were ...
. A system running this print architecture could traditionally be identified by the use of the user command as the primary interface to the print system, as opposed to the
BSD
The Berkeley Software Distribution (BSD), also known as Berkeley Unix or BSD Unix, is a discontinued Unix operating system developed and distributed by the Computer Systems Research Group (CSRG) at the University of California, Berkeley, beginni ...
command (though some systems provide as an alias to ).
Typical user commands available to the System V printing system are:
*: the user command to print a document
*: shows the current print queue
*: deletes a job from the print queue
*: a system administration command that configures the print system
*: a system administration command that moves jobs between print queues
History
In the Unix programming model,
device file
In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These s ...
s are special files that act as access points to peripheral devices such as printers. For example, the first
line printer
A line printer Printer (computing), prints one entire line of text before advancing to another line. Most early line printers were
printer (computing)#Impact printers, impact printers.
Line printers are mostly associated with unit record eq ...
on a Unix system might be represented by a file in the device () directory, ''i.e.'', . Using the file metaphor, a document could by printed by "copying" the file onto the device: . While this worked well enough for the case where there was one printer per user, this model did not scale out well to
multiple users having to share one printer.
[ The solution was to create a queue (or "spool") of documents to be printed and use a ]daemon
A demon is a malevolent supernatural being, evil spirit or fiend in religion, occultism, literature, fiction, mythology and folklore.
Demon, daemon or dæmon may also refer to:
Entertainment Fictional entities
* Daemon (G.I. Joe), a character ...
(system process) to manage this queue and send the documents to the printer in the order in which they arrived.
Such a system, with an command to send documents to the queue, was first introduced in 1973 in Version 4 of Unix. By the release of System V Release 4
Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
, the suite of utilities had grown to include commands for canceling print jobs, moving jobs among queues, enabling and disabling queues, enabling and disabling a job scheduler daemon, and status reports of the print system. The command handled queue documents to be printed and had over 20 different options that controlled the appearance of the document and its place in the queue, and even handled email notification of the user once the document had finished printing. The command returned a "job id" which could be used by the ''cancel'' or ''lpstat'' commands to remove the job from the queue or check on its progress, respectively. While the system was considered to be quite complex to set up and administer, most uses were expected to only use these three commands.
With its distribution in the influential AT&T Unix System V, the interface if not the implementation became the standard for users' control over printers. The command was included as a requirement in the POSIX
The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
.2 standard,[ and a command by that name appeared in the subsequent lpr, LPRng and ]CUPS
CUPS (formerly an acronym for Common UNIX Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs ...
printing systems. (In SVR4 derivates like SCO UNIX
Xinuos OpenServer, previously SCO UNIX and SCO Open Desktop (SCO ODT), is a closed source computer operating system developed by Santa Cruz Operation (SCO), later acquired by SCO Group, and now owned by Xinuos. Early versions of OpenServer were ...
, the command was simply an alias for the command used by the BSD-based system.[)
As late as 1996, ''Running ]Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
'' stated "The Linux printing software consists of the UNIX standard ''lp'' and ''lpr'' software,"[ but by 1999 support for ''lp'' was waning and the third edition simply stated "The ''lpr'' command prints a document on Linux."][ By 2003, a survey of the ]Debian
Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
, Mandrake
A mandrake is the root of a plant, historically derived either from plants of the genus '' Mandragora'' (in the family Solanaceae) found in the Mediterranean region, or from other species, such as '' Bryonia alba'' (the English mandrake, in the ...
, Red Hat
Red Hat, Inc. (formerly Red Hat Software, Inc.) is an American software company that provides open source software products to enterprises and is a subsidiary of IBM. Founded in 1993, Red Hat has its corporate headquarters in Raleigh, North ...
, Slackware
Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System (SLS), Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distr ...
and SuSE distributions showed that all of them were running some combination of lpr, LPRng and CUPS.[
The original System V printing system remains proprietary; however, the Solaris print system, heavily modified from the original, has been released as ]open source software
Open-source software (OSS) is Software, computer software that is released under a Open-source license, license in which the copyright holder grants users the rights to use, study, change, and Software distribution, distribute the software an ...
as part of the OpenSolaris
OpenSolaris () is a discontinued open-source computer operating system for SPARC and x86 based systems, created by Sun Microsystems and based on Solaris. Its development began in the mid 2000s and ended in 2010.
OpenSolaris was developed as ...
project. The Common Unix Printing System emulates both System V and Berkeley print architectures on the interface level, though its internal architecture is different from both.
Criticism
In his introduction to a simplified configuration system for lp, author Peter Gray of the University of Wollongong
The University of Wollongong (UOW) is an Australian public university, public research university located in the coastal city of Wollongong, New South Wales, approximately south of Sydney. , the university had an enrolment of more than 33,000 s ...
described several weaknesses of the version shipping with the then-current Solaris (operating system)
Oracle Solaris is a proprietary software, proprietary Unix operating system offered by Oracle Corporation, Oracle for SPARC and x86-64 based workstations and server (computing), servers. Originally developed by Sun Microsystems as Solaris, it su ...
version 2.
*As opposed to the single daemon used by the simpler BSD lpr system, the lp system used separate daemons, one for scheduling and one for remote communication.
*The lpr system could be controlled with a single configuration file while lp requires a separate program for administration.
*The lp system did support permissions, but the model did not scale to hundreds of users.
As a result, Gray observed that "many administrators choose to simply run the old lpr/lpd system on the SVR4 boxes."[
]
See also
* Berkeley printing system
The Berkeley printing system is one of several standard architectures for printing on the Unix platform. It originated in 2.10BSD, and is still used to varying degrees in BSD derivatives such as FreeBSD, NetBSD, OpenBSD, and DragonFly BSD. A syst ...
* Common Unix Printing System (CUPS)
* LPRng
References
External links
lp
lpstat
Printing administration on Solaris 10
{{Unix commands
Computer printing
UNIX System V