lpd(1M) lpd(1M)NAME lpd - supports the Berkeley print spooler SYNOPSIS lpd [-l] [alt-internet-no] ARGUMENTS alt-internet-no Specifies an alternate Internet port number. -l Causes lpd to log requests received from the network. DESCRIPTION lpd is the line-printer daemon (spool area handler) and is normally invoked at boot time from the inittab file. It makes a single pass through the printcap file to find out about the existing printers and prints any files left after a crash. It then uses the system calls listen and accept 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, it forks a child process to handle the request so the parent can continue to listen for more requests. The Internet port number used to rendezvous with other processes is normally obtained with getservbyname but can be changed using an optional argument. 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, lpr requests are only honored for those users with accounts on the machine with the printer. The file minfree in each spool directory contains the number of disk blocks to leave free so that the line printer queue won't completely fill the disk. You can edit the minfree file with your favorite text editor. The file lock in each spool directory is used to prevent multiple daemons from becoming active simultaneously and to store information about the daemon process for lpr, lpq, and lprm. 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 specify nonprinting actions to be performed. Each such line begins with a key character specifying what to do with the remainder of the line: J Job name: string to be used for the job name on the banner page (the page with the job ID) C Classification: string to be used for the January 1992 1
lpd(1M) lpd(1M)classification line on the banner page L Literal: the line containing identification information from the password file and causing the banner page to be printed T Title: string to be used as the title for pr H Host name: name of the machine from which lpr was invoked P Person: login name of the person who invoked lpr; used to verify ownership by lprm M Mail: mail to be sent to the specified user when the current print job is completed f Formatted file: the name of a file already formatted, which is to be printed l Similar to f, but also passing control characters and not making page breaks p Filename: name of a file to be printed with pr as a filter t Troff file: the file containing troff output (cat phototypesetter commands) n Ditroff file: the file containing device-independent troff output d DVI file: the file containing Tex output (Device Independent Format (DVI) from Stanford) g Graph file: the file containing data produced by plot c Cifplot file: the file containing data produced by cifplot v The file containing a raster image r The file containing text data with Fortran carriage- control characters 1 Troff Font R: the name of the font file to use instead of the default 2 Troff Font I: the name of the font file to use instead of the default 3 Troff Font B: the name of the font file to use instead 2 January 1992
lpd(1M) lpd(1M)of the default 4 Troff Font S: the name of the font file to use instead of the default W Width: the number of characters to specify the page width used by pr and the text filters I Indent: the number of character columns used to indent unformatted ASCII text files U Unlink: the name of the file to be removed on completion of printing N Filename: the name of the file that is being printed, or a blank for the standard input (when lpr is invoked in a pipeline) If a file cannot be opened, the LOG_LPR function is used to log status messages (also see syslog(3)). The lpd command tries up to 20 times to reopen a file it expects to be present, after which it skips the file to be printed. The lpd command uses flock to provide exclusive access to the lock file and to prevent multiple daemons from becoming active simultaneously. If you cancel the daemon, or if it quits unexpectedly, the lock file does not need to be removed. The lock file is kept in a readable ASCII format and contains two lines. The first line 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 lpq and lprm. FILES /dev/printer Line-printer device file /dev/printer.socket File containing socket for local requests /etc/hosts.equiv File containing lists of machine names allowed printer access /etc/hosts.lpd File containing lists of machine names allowed printer access, but not under the same administrative control /etc/printcap File containing printer description file /usr/lib/lpd Executable file /usr/spool/* File containing spool directories /usr/spool/*/minfree January 1992 3
lpd(1M) lpd(1M)File containing the minimum amount of free space to leave SEE ALSO lpc(1M), pac(1M) lpq(1), lpr(1), lprm(1), pr(1), psdit(1), troff(1) in A/UX Command Reference accept(2), listen(2), getservbyname(3), syslog(3), plot(3X), inittab(4), printcap(4) in A/UX Programmer's Reference 4 January 1992