lpd(ADMN)
lpd --
line printer daemon
Syntax
/usr/lib/lpd [ -ld ] [ port # ]
Description
lpd is the line printer daemon (spool area
handler) and is normally invoked at boot time from the
/etc/rc2.d/S85tcp
file which is an
rc2(ADM)
startup script. It makes a single pass through the
printcap(SFF)
file to find out the existing printers and prints any
files left after a crash. It then uses the system calls
listen(SSC)
and
accept(SSC)
to receive requests to print files in the queue, transfer
files to the spooling area, display the queue, or remove
jobs from the queue. In each case, lpd forks a child to
handle the request so the parent can continue to listen for
more requests.
The -l flag causes lpd to log valid
requests received from the network. This can be useful for
debugging purposes. The -d option turns on socket-level
debugging.
Access control is provided by two means. First, all
requests must come from one of the machines listed in the
file /etc/hosts.equiv or
/etc/hosts.lpd. Second, if the ``rs'' capability
is specified in the printcap entry for the
printer being accessed, lp requests will only be
honored for those users with accounts on the machine with
the printer.
NOTE:
There are other configurable options that apply to the
/etc/printcap file. Refer to the
printcap(SFF)
reference manual page for more information.
If the file minfree exists in a printer's spool
directory on the destination
machine, it should contain the number of minimum disk blocks that must be free
in addition to the actual size of the print job. If the sum of this number of
minimum disk blocks and the job size exceed the available free space of the
device on which the spool directory exists, then the job will not be processed.
Superuser privileges are required to create and edit
the minfree file
in the spool directories.
The file lock in each spool directory prevents
multiple daemons from becoming active simultaneously, and
stores information about the daemon process for
lp(C),
lpstat(C),
and
cancel(C).
After the daemon has successfully set the lock, it scans
the directory for files beginning with cf. Lines
in each cf file specify files to be printed or
non-printing actions to be performed. Each such line
begins with a key character to specify what to do with the
remainder of the line.
C-
Classification. String to be used for the classification line on the burst page.
F-
Content type support.
H-
Hostname of the machine where lp was invoked.
I-
Indent output by amount.
J-
Job name. String to be used for the job name on the burst page.
L-
Literal. The line contains identification info from
the password file and causes the banner page to be printed.
M-
Mail specified user when the current print job completes.
N-
Name of file used by lpq (Pass 2 only).
O-
Other System V options; for example ``nobanner''.
P-
Person. Login name of the person who invoked lp.
This is used to verify ownership by cancel.
Q-
Queue. Priority level in print queue.
S-
Stat info. For symbolic link protection.
T-
Title. String to be used as the title for
pr(C).
U-
Unlink. Name of file to remove upon completion of printing.
W-
Width. Page width.
c-
Cifplot file to print.
d-
dvi file to print.
f-
Formatted file. Name of a file to print which is already
formatted.
g-
plot file to print.
l-
Filename of text file with control characters.
n-
ditroff file to print
p-
Filename of text file to print with
pr(C).
r-
Request ID used by the
cancel(C)
command.
t-
troff file to print.
v-
Plain raster file to print.
1-
Roman font file for troff.
2-
Italic font file for troff.
3-
Bold font file for troff.
4-
Sanserif font file for troff.
If a file can not be opened, a message will be logged
in the file /usr/adm/syslog
via
syslog(SLIB)
using the LOG_LPR facility. lpd will
try up to 20 times to reopen a file it expects to be there,
after which it will skip the file to be printed.
lpd uses
fcntl(S)
to provide exclusive access to the lock file and to prevent
multiple daemons from becoming active simultaneously. If
the daemon should be killed or die unexpectedly, the lock
file need not be removed. The lock file is kept in a
readable ASCII form and contains two lines. The
first is the process ID of the daemon and the
second is the control filename of the current job being
printed. The second line is updated to reflect the current
status of lpd for the programs
lpstat(C)
and
cancel(C).
Files
/etc/printcap-
printer description file
/usr/spool/-
spool directories
/usr/spool/lpd/<printer_name//minfree-
minimum free space to leave
/dev/lp-
line printer devices
/etc/hosts.equiv-
machine names allowed printer access
/etc/hosts.lpd-
machine names allowed printer access, but not under
same administrative control
See also
cancel(C),
hosts.equiv(SFF),
hosts.lpd(SFF),
lp(C),
lpstat(C),
lpmove(ADM),
printcap(SFF),
syslog(SLIB)
Standards conformance
lpd is conformant with:
RFC 1179
X/Open Portability Guide, Issue 4, 1992
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003