161843Sbostic.\" Copyright (c) 1983, 1991, 1993 261843Sbostic.\" The Regents of the University of California. All rights reserved. 318984Smckusick.\" 443831Strent.\" %sccs.include.redist.man% 518984Smckusick.\" 6*66990Sbostic.\" @(#)lpd.8 8.3 (Berkeley) 04/19/94 735749Sbostic.\" 847469Scael.Dd 947469Scael.Dt LPD 8 1047469Scael.Os BSD 4.2 1147469Scael.Sh NAME 1247469Scael.Nm lpd 1347469Scael.Nd line printer spooler daemon 1447469Scael.Sh SYNOPSIS 1547469Scael.Nm lpd 1647469Scael.Op Fl l 1747469Scael.Op Ar port# 1847469Scael.Sh DESCRIPTION 1947469Scael.Nm Lpd 2018984Smckusickis the line printer daemon (spool area handler) and is normally invoked 2118984Smckusickat boot time from the 2247469Scael.Xr rc 8 2318984Smckusickfile. It makes a single pass through the 2447469Scael.Xr printcap 5 2518984Smckusickfile to find out about the existing printers and 2618984Smckusickprints any files left after a crash. It then uses the system calls 2747469Scael.Xr listen 2 2818984Smckusickand 2947469Scael.Xr accept 2 3018984Smckusickto receive requests to print files in the queue, 3118984Smckusicktransfer files to the spooling area, display the queue, 3218984Smckusickor remove jobs from the queue. In each case, it forks a child to handle 3318984Smckusickthe request so the parent can continue to listen for more requests. 3447469Scael.Pp 3547469ScaelAvailable options: 3647469Scael.Bl -tag -width Ds 3747469Scael.It Fl l 3847469ScaelThe 3947469Scael.Fl l 4047469Scaelflag causes 4147469Scael.Nm lpd 4247469Scaelto log valid requests received from the network. This can be useful 4347469Scaelfor debugging purposes. 4447469Scael.It Ar "port#" 4518984SmckusickThe Internet port number used to rendezvous 4618984Smckusickwith other processes is normally obtained with 4747469Scael.Xr getservbyname 3 4818984Smckusickbut can be changed with the 4947469Scael.Ar port# 5025492Sericargument. 5147469Scael.El 5247469Scael.Pp 5347469ScaelAccess control is provided by two means. First, all requests must come from 5418984Smckusickone of the machines listed in the file 5547469Scael.Pa /etc/hosts.equiv 5618985Smckusickor 5747469Scael.Pa /etc/hosts.lpd . 5847469ScaelSecond, if the 5947469Scael.Li rs 6047469Scaelcapability is specified in the 6147469Scael.Xr printcap 6218984Smckusickentry for the printer being accessed, 6347469Scael.Em lpr 6418984Smckusickrequests will only be honored for those users with accounts on the 6518984Smckusickmachine with the printer. 6647469Scael.Pp 6718984SmckusickThe file 6847469Scael.Em minfree 6918985Smckusickin each spool directory contains the number of disk blocks to leave free 7018985Smckusickso that the line printer queue won't completely fill the disk. 7118985SmckusickThe 7247469Scael.Em minfree 7318985Smckusickfile can be edited with your favorite text editor. 7447469Scael.Pp 7547469ScaelThe daemon begins processing files 7647469Scaelafter it has successfully set the lock for exclusive 77*66990Sbosticaccess (described a bit later), 7847469Scaeland scans the spool directory 7918984Smckusickfor files beginning with 8047469Scael.Em cf . 8118984SmckusickLines in each 8247469Scael.Em cf 8318984Smckusickfile specify files to be printed or non-printing actions to be 8418984Smckusickperformed. Each such line begins with a key character 8518984Smckusickto specify what to do with the remainder of the line. 8647469Scael.Bl -tag -width Ds 8747469Scael.It J 8818984SmckusickJob Name. String to be used for the job name on the burst page. 8947469Scael.It C 9018984SmckusickClassification. String to be used for the classification line 9118984Smckusickon the burst page. 9247469Scael.It L 9318984SmckusickLiteral. The line contains identification info from 9418984Smckusickthe password file and causes the banner page to be printed. 9547469Scael.It T 9618984SmckusickTitle. String to be used as the title for 9747469Scael.Xr pr 1 . 9847469Scael.It H 9918984SmckusickHost Name. Name of the machine where 10047469Scael.Xr lpr 10118984Smckusickwas invoked. 10247469Scael.It P 10318984SmckusickPerson. Login name of the person who invoked 10447469Scael.Xr lpr . 10518984SmckusickThis is used to verify ownership by 10647469Scael.Xr lprm . 10747469Scael.It M 10818984SmckusickSend mail to the specified user when the current print job completes. 10947469Scael.It f 11018984SmckusickFormatted File. Name of a file to print which is already formatted. 11147469Scael.It l 11218984SmckusickLike ``f'' but passes control characters and does not make page breaks. 11347469Scael.It p 11418984SmckusickName of a file to print using 11547469Scael.Xr pr 1 11618984Smckusickas a filter. 11747469Scael.It t 11818984SmckusickTroff File. The file contains 11947469Scael.Xr troff 1 12018984Smckusickoutput (cat phototypesetter commands). 12147469Scael.It n 12218985SmckusickDitroff File. The file contains device independent troff 12318985Smckusickoutput. 12447469Scael.It r 12518984SmckusickDVI File. The file contains 12647469Scael.Tn Tex l 12747469Scaeloutput 12865104SmckusickDVI format from Standford. 12947469Scael.It g 13018984SmckusickGraph File. The file contains data produced by 13147469Scael.Xr plot 3 . 13247469Scael.It c 13318984SmckusickCifplot File. The file contains data produced by 13447469Scael.Em cifplot . 13547469Scael.It v 13618984SmckusickThe file contains a raster image. 13747469Scael.It r 13847469ScaelThe file contains text data with 13947469ScaelFORTRAN carriage control characters. 14047469Scael.It \&1 14118984SmckusickTroff Font R. Name of the font file to use instead of the default. 14247469Scael.It \&2 14318984SmckusickTroff Font I. Name of the font file to use instead of the default. 14447469Scael.It \&3 14518984SmckusickTroff Font B. Name of the font file to use instead of the default. 14647469Scael.It \&4 14718984SmckusickTroff Font S. Name of the font file to use instead of the default. 14847469Scael.It W 14918984SmckusickWidth. Changes the page width (in characters) used by 15047469Scael.Xr pr 1 15118984Smckusickand the text filters. 15247469Scael.It I 15318984SmckusickIndent. The number of characters to indent the output by (in ascii). 15447469Scael.It U 15518984SmckusickUnlink. Name of file to remove upon completion of printing. 15647469Scael.It N 15718984SmckusickFile name. The name of the file which is being printed, or a blank 15818984Smckusickfor the standard input (when 15947469Scael.Xr lpr 16018984Smckusickis invoked in a pipeline). 16147469Scael.El 16247469Scael.Pp 16365104SmckusickIf a file cannot be opened, a message will be logged via 16447469Scael.Xr syslog 3 16525492Sericusing the 16647469Scael.Em LOG_LPR 16725492Sericfacility. 16847469Scael.Nm Lpd 16918984Smckusickwill try up to 20 times 17018984Smckusickto reopen a file it expects to be there, after which it will 17118984Smckusickskip the file to be printed. 17247469Scael.Pp 17347469Scael.Nm Lpd 17418984Smckusickuses 17547469Scael.Xr flock 2 17618984Smckusickto provide exclusive access to the lock file and to prevent multiple 17765104Smckusickdaemons from becoming active simultaneously. If the daemon should be killed 17818984Smckusickor die unexpectedly, the lock file need not be removed. 17947469ScaelThe lock file is kept in a readable 18047469Scael.Tn ASCII 18147469Scaelform 18218984Smckusickand contains two lines. 18318984SmckusickThe first is the process id of the daemon and the second is the control 18418984Smckusickfile name of the current job being printed. The second line is updated to 18518984Smckusickreflect the current status of 18647469Scael.Nm lpd 18718984Smckusickfor the programs 18847469Scael.Xr lpq 1 18918984Smckusickand 19047469Scael.Xr lprm 1 . 19147469Scael.Sh FILES 19247469Scael.Bl -tag -width "/var/spool/*/minfree" -compact 19347469Scael.It Pa /etc/printcap 19447469Scaelprinter description file 19547469Scael.It Pa /var/spool/* 19647469Scaelspool directories 19747469Scael.It Pa /var/spool/*/minfree 19847469Scaelminimum free space to leave 19947469Scael.It Pa /dev/lp* 20047469Scaelline printer devices 20147469Scael.It Pa /dev/printer 20247469Scaelsocket for local requests 20347469Scael.It Pa /etc/hosts.equiv 20447469Scaellists machine names allowed printer access 20547469Scael.It Pa /etc/hosts.lpd 20647469Scaellists machine names allowed printer access, 20747469Scaelbut not under same administrative control. 20847469Scael.El 20947469Scael.Sh SEE ALSO 21047469Scael.Xr lpc 8 , 21147469Scael.Xr pac 1 , 21247469Scael.Xr lpr 1 , 21347469Scael.Xr lpq 1 , 21447469Scael.Xr lprm 1 , 21547469Scael.Xr syslog 3 , 21647469Scael.Xr printcap 5 21747469Scael.Rs 21847469Scael.%T "4.2 BSD Line Printer Spooler Manual" 21947469Scael.Re 22047469Scael.Sh HISTORY 22147469ScaelAn 22247469Scael.Nm 22347469Scaeldaemon appeared in Version 6 AT&T UNIX. 224