1*49647Scael.\" Copyright (c) 1983, 1991 Regents of the University of California. 248928Scael.\" All rights reserved. 320823Smckusick.\" 4*49647Scael.\" %sccs.include.redist.roff% 520823Smckusick.\" 6*49647Scael.\" @(#)printcap.5 6.6 (Berkeley) 05/10/91 748928Scael.\" 8*49647Scael.Dd 9*49647Scael.Dt PRINTCAP 5 10*49647Scael.Os BSD 4.2 11*49647Scael.Sh NAME 12*49647Scael.Nm printcap 13*49647Scael.Nd printer capability data base 14*49647Scael.Sh SYNOPSIS 15*49647Scael.Nm printcap 16*49647Scael.Sh DESCRIPTION 17*49647ScaelThe 18*49647Scael.Nm Printcap 19*49647Scaelfunction 2020823Smckusickis a simplified version of the 21*49647Scael.Xr termcap 5 2220823Smckusickdata base 2320823Smckusickused to describe line printers. The spooling system accesses the 24*49647Scael.Nm printcap 2520823Smckusickfile every time it is used, allowing dynamic 2620823Smckusickaddition and deletion of printers. Each entry in the data base 2720823Smckusickis used to describe one printer. This data base may not be 2820823Smckusicksubstituted for, as is possible for 29*49647Scael.Xr termcap , 3020823Smckusickbecause it may allow accounting to be bypassed. 31*49647Scael.Pp 3220823SmckusickThe default printer is normally 33*49647Scael.Em lp , 34*49647Scaelthough the environment variable 35*49647Scael.Ev PRINTER 3620823Smckusickmay be used to override this. Each spooling utility supports an option, 37*49647Scael.Fl P Ar printer , 3820823Smckusickto allow explicit naming of a destination printer. 39*49647Scael.Pp 4020823SmckusickRefer to the 41*49647Scael.%T "4.3 BSD Line Printer Spooler Manual" 4220823Smckusickfor a complete discussion on how setup the database for a given printer. 43*49647Scael.Sh CAPABILITIES 4420823SmckusickRefer to 45*49647Scael.Xr termcap 5 4620823Smckusickfor a description of the file layout. 47*49647Scael.Bl -column Namexxx Typexx "/var/spool/lpdxxxxx" 48*49647Scael.Sy Name Type Description 49*49647Scael.It "af str" Ta Dv NULL Ta No "name of accounting file" 50*49647Scael.It "br num none if lp is a tty, set the baud rate" 51*49647Scael.Pf ( Xr ioctl 2 52*49647Scaelcall) 53*49647Scael.It "cf str" Ta Dv NULL Ta No "cifplot data filter" 54*49647Scael.It "df str" Ta Dv NULL Ta No "tex data filter" 55*49647Scael.Pf ( Tn DVI 56*49647Scaelformat) 57*49647Scael.It "fc num 0 if lp is a tty, clear flag bits" 58*49647Scael.Pq Pa sgtty.h 59*49647Scael.It "ff str" Ta So Li \ef Sc Ta No "string to send for a form feed" 60*49647Scael.It "fo bool false print a form feed when device is opened" 61*49647Scael.It "fs num 0 like `fc' but set bits" 62*49647Scael.It "gf str" Ta Dv NULL Ta No "graph data filter" 63*49647Scael.Pf ( Xr plot 3 64*49647Scaelformat 65*49647Scael.It "hl bool false print the burst header page last" 66*49647Scael.It "ic bool false driver supports (non standard) ioctl to indent printout" 67*49647Scael.It "if str" Ta Dv NULL Ta No "name of text filter which does accounting" 68*49647Scael.It "lf str" Ta Pa /dev/console Ta No "error logging file name" 69*49647Scael.It "lo str" Ta Pa lock Ta No "name of lock file" 70*49647Scael.It "lp str" Ta Pa /dev/lp Ta No "device name to open for output" 71*49647Scael.It "mx num 1000 maximum file size (in" 72*49647Scael.Dv BUFSIZ 73*49647Scaelblocks), zero = unlimited 74*49647Scael.It "nd str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)" 75*49647Scael.It "nf str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)" 76*49647Scael.It "of str" Ta Dv NULL Ta No "name of output filtering program" 77*49647Scael.It "pc num 200 price per foot or page in hundredths of cents" 78*49647Scael.It "pl num 66 page length (in lines)" 79*49647Scael.It "pw num 132 page width (in characters)" 80*49647Scael.It "px num 0 page width in pixels (horizontal)" 81*49647Scael.It "py num 0 page length in pixels (vertical)" 82*49647Scael.It "rf str" Ta Dv NULL Ta No "filter for printing" 83*49647Scael.Tn FORTRAN 84*49647Scaelstyle text files 85*49647Scael.It "rg str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access" 86*49647Scael.It "rm str" Ta Dv NULL Ta No "machine name for remote printer" 87*49647Scael.It "rp str ``lp'' remote printer name argument" 88*49647Scael.It "rs bool false restrict remote users to those with local accounts" 89*49647Scael.It "rw bool false open the printer device for reading and writing" 90*49647Scael.It "sb bool false short banner (one line only)" 91*49647Scael.It "sc bool false suppress multiple copies" 92*49647Scael.It "sd str" Ta Pa /var/spool/lpd Ta No "spool directory" 93*49647Scael.It "sf bool false suppress form feeds" 94*49647Scael.It "sh bool false suppress printing of burst page header" 95*49647Scael.It "st str" Ta Pa status Ta No "status file name" 96*49647Scael.It "tf str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)" 97*49647Scael.It "tr str" Ta Dv NULL Ta No "trailer string to print when queue empties" 98*49647Scael.It "vf str" Ta Dv NULL Ta No "raster image filter" 99*49647Scael.It "xc num 0 if lp is a tty, clear local mode bits" 100*49647Scael.Pq Xr tty 4 101*49647Scael.It "xs num 0 like `xc' but set bits" 102*49647Scael.El 103*49647Scael.Pp 10425497SericIf the local line printer driver supports indentation, the daemon 10525497Sericmust understand how to invoke it. 106*49647Scael.Sh FILTERS 10725497SericThe 108*49647Scael.Xr lpd 8 10925497Sericdaemon creates a pipeline of 110*49647Scael.Em filters 11125497Sericto process files for various printer types. 11225497SericThe filters selected depend on the flags passed to 113*49647Scael.Xr lpr 1 . 11425497SericThe pipeline set up is: 115*49647Scael.Bd -literal -offset indent 116*49647Scaelp pr | if regular text + pr(1) 11725497Sericnone if regular text 118*49647Scaelc cf cifplot 119*49647Scaeld df DVI (tex) 120*49647Scaelg gf plot(3) 121*49647Scaeln nf ditroff 122*49647Scaelf rf Fortran 123*49647Scaelt tf troff 124*49647Scaelv vf raster image 125*49647Scael.Ed 126*49647Scael.Pp 12725497SericThe 128*49647Scael.Sy if 12925497Sericfilter is invoked with arguments: 130*49647Scael.Bd -filled -offset indent 131*49647Scael.Cm if 132*49647Scael.Op Fl c 133*49647Scael.Fl w Ns Ar width 134*49647Scael.Fl l Ns Ar length 135*49647Scael.Fl i Ns Ar indent 136*49647Scael.Fl n Ar login 137*49647Scael.Fl h Ar host acct-file 138*49647Scael.Ed 139*49647Scael.Pp 14025497SericThe 141*49647Scael.Fl c 14225497Sericflag is passed only if the 143*49647Scael.Fl l 14425497Sericflag (pass control characters literally) 14525497Sericis specified to 146*49647Scael.Xr lpr . 147*49647ScaelThe 148*49647Scael.Ar Width 149*49647Scaelfunction 15025497Sericand 151*49647Scael.Ar length 15225497Sericspecify the page width and length 15325497Seric(from 154*49647Scael.Cm pw 15525497Sericand 156*49647Scael.Cm pl 15725497Sericrespectively) in characters. 15825497SericThe 159*49647Scael.Fl n 16025497Sericand 161*49647Scael.Fl h 16225497Sericparameters specify the login name and host name of the owner 16325497Sericof the job respectively. 164*49647ScaelThe 165*49647Scael.Ar Acct-file 166*49647Scaelfunction 16725497Sericis passed from the 168*49647Scael.Cm af 169*49647Scael.Nm printcap 17025497Sericentry. 171*49647Scael.Pp 17225497SericIf no 173*49647Scael.Cm if 17425497Sericis specified, 175*49647Scael.Cm of 17625497Sericis used instead, 17725497Sericwith the distinction that 178*49647Scael.Cm of 17925497Sericis opened only once, 18025497Sericwhile 181*49647Scael.Cm if 18225497Sericis opened for every individual job. 18325497SericThus, 184*49647Scael.Cm if 18525497Sericis better suited to performing accounting. 18625497SericThe 187*49647Scael.Cm of 18825497Sericis only given the 189*49647Scael.Ar width 19025497Sericand 191*49647Scael.Ar length 19225497Sericflags. 193*49647Scael.Pp 19425497SericAll other filters are called as: 195*49647Scael.Bd -filled -offset indent 196*49647Scael.Nm filter 197*49647Scael.Fl x Ns Ar width 198*49647Scael.Fl y Ns Ar length 199*49647Scael.Fl n Ar login 200*49647Scael.Fl h Ar host acct-file 201*49647Scael.Ed 202*49647Scael.Pp 20325497Sericwhere 204*49647Scael.Ar width 20525497Sericand 206*49647Scael.Ar length 20725497Sericare represented in pixels, 20825497Sericspecified by the 209*49647Scael.Cm px 21025497Sericand 211*49647Scael.Cm py 21225497Sericentries respectively. 213*49647Scael.Pp 21425497SericAll filters take 215*49647Scael.Em stdin 21625497Sericas the file, 217*49647Scael.Em stdout 21825497Sericas the printer, 21925497Sericmay log either to 220*49647Scael.Em stderr 22125497Sericor using 222*49647Scael.Xr syslog 3 , 22325497Sericand must not ignore 224*49647Scael.Dv SIGINT . 225*49647Scael.Sh LOGGING 22625497SericError messages generated by the line printer programs themselves 22725497Seric(that is, the 228*49647Scael.Xr lp Ns * 22925497Sericprograms) 23025497Sericare logged by 231*49647Scael.Xr syslog 3 23225497Sericusing the 233*49647Scael.Dv LPR 23425497Sericfacility. 23525497SericMessages printed on 236*49647Scael.Em stderr 23725497Sericof one of the filters 23825497Sericare sent to the corresponding 239*49647Scael.Cm lf 24025497Sericfile. 24125497SericThe filters may, of course, use 242*49647Scael.Xr syslog 24325497Sericthemselves. 244*49647Scael.Pp 24520823SmckusickError messages sent to the console have a carriage return and a line 24620823Smckusickfeed appended to them, rather than just a line feed. 247*49647Scael.Sh SEE ALSO 248*49647Scael.Xr termcap 5 , 249*49647Scael.Xr lpc 8 , 250*49647Scael.Xr lpd 8 , 251*49647Scael.Xr pac 8 , 252*49647Scael.Xr lpr 1 , 253*49647Scael.Xr lpq 1 , 254*49647Scael.Xr lprm 1 255*49647Scael.Rs 256*49647Scael.%T "4.3 BSD Line Printer Spooler Manual" 257*49647Scael.Re 258*49647Scael.Sh HISTORY 259*49647ScaelThe 260*49647Scael.Nm 261*49647Scaelfile format appeared in 262*49647Scael.Bx 4.2 .. 263