LPD(1) HP-UX 5.0 LPD(1) NAME lpd - line printer daemon SYNOPSIS /usr/lib/lpd [ printername ] HP-UX COMPATIBILITY Level: HP-UX/STANDARD Origin: System III DESCRIPTION Lpd is the daemon for the line printer. It is automatically initiated by the line printer spooling command, lpr. Printername is the name of a printer device file, without the initial "/dev/" (i.e. lp8). If printername is not specified, the default printer lp is used. Lpd searches the directory /usr/spool for a directory of the same name as the specified printername. Thus, /usr/spool/lp is used by default. To be able to use other printers, a directory for each printer must be created in /usr/spool by the super-user. (Other spool directories can be specified by lpr with the -d option.) The file lock is used to prevent two daemons from becoming active on the same spool directory. Several daemons can be active simultaneously, as long as they are working on different spool directories. After the program has successfully set the lock, it forks and the main path exits, thus spawning the daemon. The directory is scanned for files beginning with "df". Each such file is submitted as a job. Each line of a job file must begin with a key character to specify what to do with the remainder of the line. The key characters are: L specifies that the remainder of the line is to be sent as a literal. I is the same as L, but signals the $IDENT card which is to be mailed back by the mail option. B specifies that the rest of the line is a file name. That file is to be printed. F is the same as B except a form-feed is prepended to the file. U specifies that the rest of the line is a file name. After the job has been transmitted, the file is unlinked. M is followed by a user ID; after the job is sent, a message is mailed to the user via the mail(1) command to verify the sending of the job. D specifies that the remainder of the line is a pathname for a specific printer. Any error encountered will cause the daemon to give up, wait 10 seconds, and start over. This means that an improperly constructed "df" file may cause the same job to be submitted every 10 seconds. To restart lpd (in the case of hardware or software malfunction), it is necessary to first kill the old daemon (if it is still alive), and remove the lock file (if present), before initiating the new daemon. This is done automatically by /etc/rc when the system is brought up, in case there were any jobs left in the spooling directory when the system last went down. Lpd will pass ASCII escape sequences to the output device. This enables users to access special capabilities like expanded type fonts, alternate character sets, etc. FILES /usr/spool/lp/* default spool area for line printer daemon. /usr/spool/printername/* spool area for additional printers /etc/passwd used to get the user's name. /dev/lp default line printer device. /dev/lp* additional printer devices. SEE ALSO lpr(1).