1dea673e9SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993 2dea673e9SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3dea673e9SRodney W. Grimes.\" 4dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6dea673e9SRodney W. Grimes.\" are met: 7dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11dea673e9SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 13dea673e9SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 14dea673e9SRodney W. Grimes.\" without specific prior written permission. 15dea673e9SRodney W. Grimes.\" 16dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19dea673e9SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26dea673e9SRodney W. Grimes.\" SUCH DAMAGE. 27dea673e9SRodney W. Grimes.\" 28dea673e9SRodney W. Grimes.\" @(#)lpd.8 8.3 (Berkeley) 4/19/94 2997d92980SPeter Wemm.\" $FreeBSD$ 30dea673e9SRodney W. Grimes.\" 31*56b0f5f3SChris Rees.Dd April 15, 2021 32dea673e9SRodney W. Grimes.Dt LPD 8 33a4c37c81SRuslan Ermilov.Os 34dea673e9SRodney W. Grimes.Sh NAME 35dea673e9SRodney W. Grimes.Nm lpd 36dea673e9SRodney W. Grimes.Nd line printer spooler daemon 37dea673e9SRodney W. Grimes.Sh SYNOPSIS 38e97407b4SRuslan Ermilov.Nm 39c7e56d32SGarance A Drosehn.Op Fl cdlpsW46 40dea673e9SRodney W. Grimes.Op Ar port# 41dea673e9SRodney W. Grimes.Sh DESCRIPTION 42490d5836SPhilippe CharnierThe 43490d5836SPhilippe Charnier.Nm 44490d5836SPhilippe Charnierutility 45dea673e9SRodney W. Grimesis the line printer daemon (spool area handler) and is normally invoked 46dea673e9SRodney W. Grimesat boot time from the 47dea673e9SRodney W. Grimes.Xr rc 8 4807bfccd7SRuslan Ermilovfile. 4907bfccd7SRuslan ErmilovIt makes a single pass through the 50dea673e9SRodney W. Grimes.Xr printcap 5 51dea673e9SRodney W. Grimesfile to find out about the existing printers and 52f2e366a1SSheldon Hearnprints any files left after a crash. 53f2e366a1SSheldon HearnIt then uses the system calls 54dea673e9SRodney W. Grimes.Xr listen 2 55dea673e9SRodney W. Grimesand 56dea673e9SRodney W. Grimes.Xr accept 2 57dea673e9SRodney W. Grimesto receive requests to print files in the queue, 58dea673e9SRodney W. Grimestransfer files to the spooling area, display the queue, 5907bfccd7SRuslan Ermilovor remove jobs from the queue. 6007bfccd7SRuslan ErmilovIn each case, it forks a child to handle 61dea673e9SRodney W. Grimesthe request so the parent can continue to listen for more requests. 62dea673e9SRodney W. Grimes.Pp 63dea673e9SRodney W. GrimesAvailable options: 64dea673e9SRodney W. Grimes.Bl -tag -width Ds 656ddb63caSGarance A Drosehn.It Fl c 666ddb63caSGarance A DrosehnBy default, if some remote host has a connection error while trying to 676ddb63caSGarance A Drosehnsend a print request to 686ddb63caSGarance A Drosehn.Nm 696ddb63caSGarance A Drosehnon a local host, 706ddb63caSGarance A Drosehn.Nm 716ddb63caSGarance A Drosehnwill only send error message to that remote host. 726ddb63caSGarance A DrosehnThe 736ddb63caSGarance A Drosehn.Fl c 746ddb63caSGarance A Drosehnflag causes 756ddb63caSGarance A Drosehn.Nm 766ddb63caSGarance A Drosehnto also log all of those connection errors via 776ddb63caSGarance A Drosehn.Xr syslog 3 . 7836d0e2a3SJoerg Wunsch.It Fl d 7936d0e2a3SJoerg WunschTurn on 8036d0e2a3SJoerg Wunsch.Dv SO_DEBUG 8136d0e2a3SJoerg Wunschon the Internet listening socket (see 8236d0e2a3SJoerg Wunsch.Xr setsockopt 2 ) . 83dea673e9SRodney W. Grimes.It Fl l 84dea673e9SRodney W. GrimesThe 85dea673e9SRodney W. Grimes.Fl l 86dea673e9SRodney W. Grimesflag causes 879b3fe531SPhilippe Charnier.Nm 88f2e366a1SSheldon Hearnto log valid requests received from the network. 89f2e366a1SSheldon HearnThis can be useful 90dea673e9SRodney W. Grimesfor debugging purposes. 91ba901a11SSheldon Hearn.It Fl p 92ba901a11SSheldon HearnThe 93ba901a11SSheldon Hearn.Fl p 94c7e56d32SGarance A Drosehnflag is a synonym for the 95c7e56d32SGarance A Drosehn.Fl s 96c7e56d32SGarance A Drosehnflag. 97a4df5101SSheldon HearnIt is being deprecated, and may be removed in a 98c7e56d32SGarance A Drosehnfuture version of 99c7e56d32SGarance A Drosehn.Nm . 100c7e56d32SGarance A Drosehn.It Fl s 101c7e56d32SGarance A DrosehnThe 102c7e56d32SGarance A Drosehn.Fl s 103c7e56d32SGarance A Drosehn(secure) flag causes 104ba901a11SSheldon Hearn.Nm 105ba901a11SSheldon Hearnnot to open an Internet listening socket. 1066ddb63caSGarance A DrosehnThis means that 1076ddb63caSGarance A Drosehn.Nm 1086ddb63caSGarance A Drosehnwill not accept any connections from any remote 1096ddb63caSGarance A Drosehnhosts, although it will still accept print requests 1106ddb63caSGarance A Drosehnfrom all local users. 1113c636606SChris Rees.It Fl F 1123c636606SChris ReesBy default, 1133c636606SChris Rees.Nm 1143c636606SChris Reeswill daemonize into the background. 1153c636606SChris ReesThe 1163c636606SChris Rees.Fl F 1173c636606SChris Reesflag causes 1183c636606SChris Rees.Nm 1193c636606SChris Reesto remain in the foreground. 1203c636606SChris ReesLogging is still performed with 1213c636606SChris Rees.Xr syslog 3 . 122605d466bSGarance A Drosehn.It Fl W 1236ddb63caSGarance A DrosehnBy default, the 1246ddb63caSGarance A Drosehn.Nm 1256ddb63caSGarance A Drosehndaemon will only accept connections which originate 1266ddb63caSGarance A Drosehnfrom a reserved-port (<1024) on the remote host. 1276ddb63caSGarance A DrosehnThe 128605d466bSGarance A Drosehn.Fl W 1296ddb63caSGarance A Drosehnflag causes 1306ddb63caSGarance A Drosehn.Nm 1316ddb63caSGarance A Drosehnto accept connections coming from any port. 1326ddb63caSGarance A DrosehnThis is can be useful when you want to accept print jobs 1336ddb63caSGarance A Drosehnfrom certain implementations of lpr written for Windows. 13408829865SHajimu UMEMOTO.It Fl 4 13508829865SHajimu UMEMOTOInet only. 13608829865SHajimu UMEMOTO.It Fl 6 13708829865SHajimu UMEMOTOInet6 only. 13808829865SHajimu UMEMOTO.It Fl 46 13908829865SHajimu UMEMOTOInet and inet6 (default). 140dea673e9SRodney W. Grimes.It Ar "port#" 141dea673e9SRodney W. GrimesThe Internet port number used to rendezvous 142dea673e9SRodney W. Grimeswith other processes is normally obtained with 143dea673e9SRodney W. Grimes.Xr getservbyname 3 144dea673e9SRodney W. Grimesbut can be changed with the 145dea673e9SRodney W. Grimes.Ar port# 146dea673e9SRodney W. Grimesargument. 147dea673e9SRodney W. Grimes.El 148dea673e9SRodney W. Grimes.Pp 149f2e366a1SSheldon HearnAccess control is provided by two means. 150f2e366a1SSheldon HearnFirst, all requests must come from 151dea673e9SRodney W. Grimesone of the machines listed in the file 152dea673e9SRodney W. Grimes.Pa /etc/hosts.equiv 153dea673e9SRodney W. Grimesor 154dea673e9SRodney W. Grimes.Pa /etc/hosts.lpd . 155dea673e9SRodney W. GrimesSecond, if the 156dea673e9SRodney W. Grimes.Li rs 157dea673e9SRodney W. Grimescapability is specified in the 1588b5c4af3SRuslan Ermilov.Xr printcap 5 159dea673e9SRodney W. Grimesentry for the printer being accessed, 160dea673e9SRodney W. Grimes.Em lpr 161dea673e9SRodney W. Grimesrequests will only be honored for those users with accounts on the 162dea673e9SRodney W. Grimesmachine with the printer. 163dea673e9SRodney W. Grimes.Pp 164dea673e9SRodney W. GrimesThe file 165dea673e9SRodney W. Grimes.Em minfree 16644d8663dSWarren Blockin each spool directory contains the number of kilobytes to leave free 1670227791bSRuslan Ermilovso that the line printer queue will not completely fill the disk. 168dea673e9SRodney W. GrimesThe 169dea673e9SRodney W. Grimes.Em minfree 170dea673e9SRodney W. Grimesfile can be edited with your favorite text editor. 171dea673e9SRodney W. Grimes.Pp 172dea673e9SRodney W. GrimesThe daemon begins processing files 173dea673e9SRodney W. Grimesafter it has successfully set the lock for exclusive 174dea673e9SRodney W. Grimesaccess (described a bit later), 175dea673e9SRodney W. Grimesand scans the spool directory 176dea673e9SRodney W. Grimesfor files beginning with 177dea673e9SRodney W. Grimes.Em cf . 178dea673e9SRodney W. GrimesLines in each 179dea673e9SRodney W. Grimes.Em cf 180dea673e9SRodney W. Grimesfile specify files to be printed or non-printing actions to be 18107bfccd7SRuslan Ermilovperformed. 18207bfccd7SRuslan ErmilovEach such line begins with a key character 183dea673e9SRodney W. Grimesto specify what to do with the remainder of the line. 184dea673e9SRodney W. Grimes.Bl -tag -width Ds 185dea673e9SRodney W. Grimes.It J 18607bfccd7SRuslan ErmilovJob Name. 18707bfccd7SRuslan ErmilovString to be used for the job name on the burst page. 188dea673e9SRodney W. Grimes.It C 18907bfccd7SRuslan ErmilovClassification. 19007bfccd7SRuslan ErmilovString to be used for the classification line 191dea673e9SRodney W. Grimeson the burst page. 192dea673e9SRodney W. Grimes.It L 19307bfccd7SRuslan ErmilovLiteral. 19407bfccd7SRuslan ErmilovThe line contains identification info from 195dea673e9SRodney W. Grimesthe password file and causes the banner page to be printed. 196dea673e9SRodney W. Grimes.It T 19707bfccd7SRuslan ErmilovTitle. 19807bfccd7SRuslan ErmilovString to be used as the title for 199dea673e9SRodney W. Grimes.Xr pr 1 . 200dea673e9SRodney W. Grimes.It H 20107bfccd7SRuslan ErmilovHost Name. 20207bfccd7SRuslan ErmilovName of the machine where 203f84e4bb7SPhilippe Charnier.Xr lpr 1 204dea673e9SRodney W. Grimeswas invoked. 205dea673e9SRodney W. Grimes.It P 20607bfccd7SRuslan ErmilovPerson. 20707bfccd7SRuslan ErmilovLogin name of the person who invoked 208f84e4bb7SPhilippe Charnier.Xr lpr 1 . 209dea673e9SRodney W. GrimesThis is used to verify ownership by 210f84e4bb7SPhilippe Charnier.Xr lprm 1 . 211dea673e9SRodney W. Grimes.It M 212dea673e9SRodney W. GrimesSend mail to the specified user when the current print job completes. 213dea673e9SRodney W. Grimes.It f 21407bfccd7SRuslan ErmilovFormatted File. 21507bfccd7SRuslan ErmilovName of a file to print which is already formatted. 216dea673e9SRodney W. Grimes.It l 217dea673e9SRodney W. GrimesLike ``f'' but passes control characters and does not make page breaks. 218dea673e9SRodney W. Grimes.It p 219dea673e9SRodney W. GrimesName of a file to print using 220dea673e9SRodney W. Grimes.Xr pr 1 221dea673e9SRodney W. Grimesas a filter. 222dea673e9SRodney W. Grimes.It t 22307bfccd7SRuslan ErmilovTroff File. 22407bfccd7SRuslan ErmilovThe file contains 225dea673e9SRodney W. Grimes.Xr troff 1 226dea673e9SRodney W. Grimesoutput (cat phototypesetter commands). 227dea673e9SRodney W. Grimes.It n 22807bfccd7SRuslan ErmilovDitroff File. 22907bfccd7SRuslan ErmilovThe file contains device independent troff 230dea673e9SRodney W. Grimesoutput. 231dea673e9SRodney W. Grimes.It r 23207bfccd7SRuslan ErmilovDVI File. 23307bfccd7SRuslan ErmilovThe file contains 234dea673e9SRodney W. Grimes.Tn Tex l 235dea673e9SRodney W. Grimesoutput 23657bd0fc6SJens SchweikhardtDVI format from Stanford. 237dea673e9SRodney W. Grimes.It g 23807bfccd7SRuslan ErmilovGraph File. 23907bfccd7SRuslan ErmilovThe file contains data produced by 240dea673e9SRodney W. Grimes.Xr plot 3 . 241dea673e9SRodney W. Grimes.It c 242f2e366a1SSheldon HearnCifplot File. 243f2e366a1SSheldon HearnThe file contains data produced by 244dea673e9SRodney W. Grimes.Em cifplot . 245dea673e9SRodney W. Grimes.It v 246dea673e9SRodney W. GrimesThe file contains a raster image. 247dea673e9SRodney W. Grimes.It r 248dea673e9SRodney W. GrimesThe file contains text data with 249dea673e9SRodney W. GrimesFORTRAN carriage control characters. 250dea673e9SRodney W. Grimes.It \&1 25107bfccd7SRuslan ErmilovTroff Font R. 25207bfccd7SRuslan ErmilovName of the font file to use instead of the default. 253dea673e9SRodney W. Grimes.It \&2 25407bfccd7SRuslan ErmilovTroff Font I. 25507bfccd7SRuslan ErmilovName of the font file to use instead of the default. 256dea673e9SRodney W. Grimes.It \&3 25707bfccd7SRuslan ErmilovTroff Font B. 25807bfccd7SRuslan ErmilovName of the font file to use instead of the default. 259dea673e9SRodney W. Grimes.It \&4 26007bfccd7SRuslan ErmilovTroff Font S. 26107bfccd7SRuslan ErmilovName of the font file to use instead of the default. 262dea673e9SRodney W. Grimes.It W 263f2e366a1SSheldon HearnWidth. 264f2e366a1SSheldon HearnChanges the page width (in characters) used by 265dea673e9SRodney W. Grimes.Xr pr 1 266dea673e9SRodney W. Grimesand the text filters. 267dea673e9SRodney W. Grimes.It I 26807bfccd7SRuslan ErmilovIndent. 26907bfccd7SRuslan ErmilovThe number of characters to indent the output by (in ASCII). 270dea673e9SRodney W. Grimes.It U 27107bfccd7SRuslan ErmilovUnlink. 27207bfccd7SRuslan ErmilovName of file to remove upon completion of printing. 273dea673e9SRodney W. Grimes.It N 27407bfccd7SRuslan ErmilovFile name. 27507bfccd7SRuslan ErmilovThe name of the file which is being printed, or a blank 276dea673e9SRodney W. Grimesfor the standard input (when 277f84e4bb7SPhilippe Charnier.Xr lpr 1 278dea673e9SRodney W. Grimesis invoked in a pipeline). 279d3d56c3dSAndrey A. Chernov.It Z 28007bfccd7SRuslan ErmilovLocale. 28107bfccd7SRuslan ErmilovString to be used as the locale for 282d3d56c3dSAndrey A. Chernov.Xr pr 1 . 283dea673e9SRodney W. Grimes.El 284dea673e9SRodney W. Grimes.Pp 285dea673e9SRodney W. GrimesIf a file cannot be opened, a message will be logged via 286dea673e9SRodney W. Grimes.Xr syslog 3 287dea673e9SRodney W. Grimesusing the 288dea673e9SRodney W. Grimes.Em LOG_LPR 289dea673e9SRodney W. Grimesfacility. 290490d5836SPhilippe CharnierThe 291490d5836SPhilippe Charnier.Nm 292490d5836SPhilippe Charnierutility will try up to 20 times 293dea673e9SRodney W. Grimesto reopen a file it expects to be there, after which it will 294dea673e9SRodney W. Grimesskip the file to be printed. 295dea673e9SRodney W. Grimes.Pp 296490d5836SPhilippe CharnierThe 297490d5836SPhilippe Charnier.Nm 298490d5836SPhilippe Charnierutility uses 299dea673e9SRodney W. Grimes.Xr flock 2 300dea673e9SRodney W. Grimesto provide exclusive access to the lock file and to prevent multiple 30107bfccd7SRuslan Ermilovdaemons from becoming active simultaneously. 30207bfccd7SRuslan ErmilovIf the daemon should be killed 303dea673e9SRodney W. Grimesor die unexpectedly, the lock file need not be removed. 304dea673e9SRodney W. GrimesThe lock file is kept in a readable 305dea673e9SRodney W. Grimes.Tn ASCII 306dea673e9SRodney W. Grimesform 307dea673e9SRodney W. Grimesand contains two lines. 308dea673e9SRodney W. GrimesThe first is the process id of the daemon and the second is the control 30907bfccd7SRuslan Ermilovfile name of the current job being printed. 31007bfccd7SRuslan ErmilovThe second line is updated to 311dea673e9SRodney W. Grimesreflect the current status of 3129b3fe531SPhilippe Charnier.Nm 313dea673e9SRodney W. Grimesfor the programs 314dea673e9SRodney W. Grimes.Xr lpq 1 315dea673e9SRodney W. Grimesand 316dea673e9SRodney W. Grimes.Xr lprm 1 . 317dea673e9SRodney W. Grimes.Sh FILES 318dea673e9SRodney W. Grimes.Bl -tag -width "/var/spool/*/minfree" -compact 319dea673e9SRodney W. Grimes.It Pa /etc/printcap 320dea673e9SRodney W. Grimesprinter description file 321dea673e9SRodney W. Grimes.It Pa /var/spool/* 322dea673e9SRodney W. Grimesspool directories 323dea673e9SRodney W. Grimes.It Pa /var/spool/*/minfree 324dea673e9SRodney W. Grimesminimum free space to leave 325dea673e9SRodney W. Grimes.It Pa /dev/lp* 326dea673e9SRodney W. Grimesline printer devices 32786c7d890SAndreas Schulz.It Pa /var/run/printer 328dea673e9SRodney W. Grimessocket for local requests 329dea673e9SRodney W. Grimes.It Pa /etc/hosts.equiv 330dea673e9SRodney W. Grimeslists machine names allowed printer access 331dea673e9SRodney W. Grimes.It Pa /etc/hosts.lpd 332dea673e9SRodney W. Grimeslists machine names allowed printer access, 333dea673e9SRodney W. Grimesbut not under same administrative control. 334dea673e9SRodney W. Grimes.El 335dea673e9SRodney W. Grimes.Sh SEE ALSO 336dea673e9SRodney W. Grimes.Xr lpq 1 , 337bfd34a4aSWolfram Schneider.Xr lpr 1 , 338dea673e9SRodney W. Grimes.Xr lprm 1 , 33936d0e2a3SJoerg Wunsch.Xr setsockopt 2 , 340dea673e9SRodney W. Grimes.Xr syslog 3 , 341bfd34a4aSWolfram Schneider.Xr hosts.lpd 5 , 34278b0b234SMike Pritchard.Xr printcap 5 , 3434d39e5f9SGarance A Drosehn.Xr chkprintcap 8 , 34478b0b234SMike Pritchard.Xr lpc 8 , 34578b0b234SMike Pritchard.Xr pac 8 346dea673e9SRodney W. Grimes.Rs 347c07aa0a5SGordon Bergling.\" 4.4BSD SMM:7 348c07aa0a5SGordon Bergling.%A Ralph Campbell 349dea673e9SRodney W. Grimes.%T "4.2 BSD Line Printer Spooler Manual" 350dea673e9SRodney W. Grimes.Re 351dea673e9SRodney W. Grimes.Sh HISTORY 352dea673e9SRodney W. GrimesAn 353dea673e9SRodney W. Grimes.Nm 354dea673e9SRodney W. Grimesdaemon appeared in Version 6 AT&T UNIX. 355