161609Sbostic.\" Copyright (c) 1983, 1991, 1993 261609Sbostic.\" The Regents of the University of California. All rights reserved. 320823Smckusick.\" 449647Scael.\" %sccs.include.redist.roff% 520823Smckusick.\" 6*69379Stef.\" @(#)printcap.5 8.5 (Berkeley) 05/10/95 748928Scael.\" 849647Scael.Dd 949647Scael.Dt PRINTCAP 5 1049647Scael.Os BSD 4.2 1149647Scael.Sh NAME 1249647Scael.Nm printcap 1349647Scael.Nd printer capability data base 1449647Scael.Sh SYNOPSIS 1549647Scael.Nm printcap 1649647Scael.Sh DESCRIPTION 1749647ScaelThe 1869103Stef.Nm printcap 1949647Scaelfunction 2020823Smckusickis a simplified version of the 2149647Scael.Xr termcap 5 2220823Smckusickdata base 2320823Smckusickused to describe line printers. The spooling system accesses the 2449647Scael.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 2949647Scael.Xr termcap , 3020823Smckusickbecause it may allow accounting to be bypassed. 3149647Scael.Pp 3220823SmckusickThe default printer is normally 3349647Scael.Em lp , 3449647Scaelthough the environment variable 3549647Scael.Ev PRINTER 3620823Smckusickmay be used to override this. Each spooling utility supports an option, 3749647Scael.Fl P Ar printer , 3820823Smckusickto allow explicit naming of a destination printer. 3949647Scael.Pp 4020823SmckusickRefer to the 4149647Scael.%T "4.3 BSD Line Printer Spooler Manual" 4265101Smckusickfor a complete discussion on how to setup the database for a given printer. 4349647Scael.Sh CAPABILITIES 4420823SmckusickRefer to 4549647Scael.Xr termcap 5 4620823Smckusickfor a description of the file layout. 4749647Scael.Bl -column Namexxx Typexx "/var/spool/lpdxxxxx" 4849647Scael.Sy Name Type Description 4949647Scael.It "af str" Ta Dv NULL Ta No "name of accounting file" 5049647Scael.It "br num none if lp is a tty, set the baud rate" 5149647Scael.Pf ( Xr ioctl 2 5249647Scaelcall) 5349647Scael.It "cf str" Ta Dv NULL Ta No "cifplot data filter" 5449647Scael.It "df str" Ta Dv NULL Ta No "tex data filter" 5549647Scael.Pf ( Tn DVI 5649647Scaelformat) 5749647Scael.It "fc num 0 if lp is a tty, clear flag bits" 5849647Scael.Pq Pa sgtty.h 5949647Scael.It "ff str" Ta So Li \ef Sc Ta No "string to send for a form feed" 6049647Scael.It "fo bool false print a form feed when device is opened" 6149647Scael.It "fs num 0 like `fc' but set bits" 6249647Scael.It "gf str" Ta Dv NULL Ta No "graph data filter" 6349647Scael.Pf ( Xr plot 3 6449647Scaelformat 6549647Scael.It "hl bool false print the burst header page last" 6649647Scael.It "ic bool false driver supports (non standard) ioctl to indent printout" 6749647Scael.It "if str" Ta Dv NULL Ta No "name of text filter which does accounting" 6849647Scael.It "lf str" Ta Pa /dev/console Ta No "error logging file name" 6949647Scael.It "lo str" Ta Pa lock Ta No "name of lock file" 7049647Scael.It "lp str" Ta Pa /dev/lp Ta No "device name to open for output" 7149647Scael.It "mx num 1000 maximum file size (in" 7249647Scael.Dv BUFSIZ 7349647Scaelblocks), zero = unlimited 7449647Scael.It "nd str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)" 7549647Scael.It "nf str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)" 7649647Scael.It "of str" Ta Dv NULL Ta No "name of output filtering program" 7749647Scael.It "pc num 200 price per foot or page in hundredths of cents" 7849647Scael.It "pl num 66 page length (in lines)" 7949647Scael.It "pw num 132 page width (in characters)" 8049647Scael.It "px num 0 page width in pixels (horizontal)" 8149647Scael.It "py num 0 page length in pixels (vertical)" 8249647Scael.It "rf str" Ta Dv NULL Ta No "filter for printing" 8349647Scael.Tn FORTRAN 8449647Scaelstyle text files 8549647Scael.It "rg str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access" 8649647Scael.It "rm str" Ta Dv NULL Ta No "machine name for remote printer" 8749647Scael.It "rp str ``lp'' remote printer name argument" 8849647Scael.It "rs bool false restrict remote users to those with local accounts" 8949647Scael.It "rw bool false open the printer device for reading and writing" 9049647Scael.It "sb bool false short banner (one line only)" 9149647Scael.It "sc bool false suppress multiple copies" 9249647Scael.It "sd str" Ta Pa /var/spool/lpd Ta No "spool directory" 9349647Scael.It "sf bool false suppress form feeds" 9449647Scael.It "sh bool false suppress printing of burst page header" 9549647Scael.It "st str" Ta Pa status Ta No "status file name" 9649647Scael.It "tf str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)" 9749647Scael.It "tr str" Ta Dv NULL Ta No "trailer string to print when queue empties" 9849647Scael.It "vf str" Ta Dv NULL Ta No "raster image filter" 9949647Scael.It "xc num 0 if lp is a tty, clear local mode bits" 10049647Scael.Pq Xr tty 4 10149647Scael.It "xs num 0 like `xc' but set bits" 10249647Scael.El 10349647Scael.Pp 10425497SericIf the local line printer driver supports indentation, the daemon 10525497Sericmust understand how to invoke it. 10669103Stef.Pp 10769103StefThe 10869103Stef.Em lp 10969103Stefentry can specify either a device in the ``/dev'' directory 11069103Stefor a printer accessible via the network using the syntax: 11169103Stef.Bd -filled -offset indent 112*69379Stef.Nm :lp= Ns Ar port 113*69379Stef.Nm @ Ns Ar host 11469103Stef.Nm : 11569103Stef.Ed 11669103Stef.Pp 11769103Stefwhere 11869103Stef.Ar host 11969103Stefis the network name of the printer and 12069103Stef.Ar port 12169103Stefis the TCP port number to use for the network connection. 12269103StefThis works both for printers directly connected 12369103Stefto the network (and which understand TCP/IP) 12469103Stefas well as for many terminal servers 12569103Stefthat support printers via their serial and/or parallel ports. 12649647Scael.Sh FILTERS 12725497SericThe 12849647Scael.Xr lpd 8 12925497Sericdaemon creates a pipeline of 13049647Scael.Em filters 13125497Sericto process files for various printer types. 13225497SericThe filters selected depend on the flags passed to 13349647Scael.Xr lpr 1 . 13425497SericThe pipeline set up is: 13549647Scael.Bd -literal -offset indent 13649647Scaelp pr | if regular text + pr(1) 13725497Sericnone if regular text 13849647Scaelc cf cifplot 13949647Scaeld df DVI (tex) 14049647Scaelg gf plot(3) 14149647Scaeln nf ditroff 14249647Scaelf rf Fortran 14349647Scaelt tf troff 14449647Scaelv vf raster image 14549647Scael.Ed 14649647Scael.Pp 14725497SericThe 14849647Scael.Sy if 14925497Sericfilter is invoked with arguments: 15049647Scael.Bd -filled -offset indent 15149647Scael.Cm if 15249647Scael.Op Fl c 15349647Scael.Fl w Ns Ar width 15449647Scael.Fl l Ns Ar length 15549647Scael.Fl i Ns Ar indent 15649647Scael.Fl n Ar login 15749647Scael.Fl h Ar host acct-file 15849647Scael.Ed 15949647Scael.Pp 16025497SericThe 16149647Scael.Fl c 16225497Sericflag is passed only if the 16349647Scael.Fl l 16425497Sericflag (pass control characters literally) 16525497Sericis specified to 16649647Scael.Xr lpr . 16749647ScaelThe 16869103Stef.Ar width 16949647Scaelfunction 17025497Sericand 17149647Scael.Ar length 17225497Sericspecify the page width and length 17325497Seric(from 17449647Scael.Cm pw 17525497Sericand 17649647Scael.Cm pl 17725497Sericrespectively) in characters. 17825497SericThe 17949647Scael.Fl n 18025497Sericand 18149647Scael.Fl h 18225497Sericparameters specify the login name and host name of the owner 18325497Sericof the job respectively. 18449647ScaelThe 18549647Scael.Ar Acct-file 18649647Scaelfunction 18725497Sericis passed from the 18849647Scael.Cm af 18949647Scael.Nm printcap 19025497Sericentry. 19149647Scael.Pp 19225497SericIf no 19349647Scael.Cm if 19425497Sericis specified, 19549647Scael.Cm of 19625497Sericis used instead, 19725497Sericwith the distinction that 19849647Scael.Cm of 19925497Sericis opened only once, 20025497Sericwhile 20149647Scael.Cm if 20225497Sericis opened for every individual job. 20325497SericThus, 20449647Scael.Cm if 20525497Sericis better suited to performing accounting. 20625497SericThe 20749647Scael.Cm of 20825497Sericis only given the 20949647Scael.Ar width 21025497Sericand 21149647Scael.Ar length 21225497Sericflags. 21349647Scael.Pp 21425497SericAll other filters are called as: 21549647Scael.Bd -filled -offset indent 21649647Scael.Nm filter 21749647Scael.Fl x Ns Ar width 21849647Scael.Fl y Ns Ar length 21949647Scael.Fl n Ar login 22049647Scael.Fl h Ar host acct-file 22149647Scael.Ed 22249647Scael.Pp 22325497Sericwhere 22449647Scael.Ar width 22525497Sericand 22649647Scael.Ar length 22725497Sericare represented in pixels, 22825497Sericspecified by the 22949647Scael.Cm px 23025497Sericand 23149647Scael.Cm py 23225497Sericentries respectively. 23349647Scael.Pp 23425497SericAll filters take 23549647Scael.Em stdin 23625497Sericas the file, 23749647Scael.Em stdout 23825497Sericas the printer, 23925497Sericmay log either to 24049647Scael.Em stderr 24125497Sericor using 24249647Scael.Xr syslog 3 , 24325497Sericand must not ignore 24449647Scael.Dv SIGINT . 24549647Scael.Sh LOGGING 24625497SericError messages generated by the line printer programs themselves 24725497Seric(that is, the 24849647Scael.Xr lp Ns * 24925497Sericprograms) 25025497Sericare logged by 25149647Scael.Xr syslog 3 25225497Sericusing the 25349647Scael.Dv LPR 25425497Sericfacility. 25525497SericMessages printed on 25649647Scael.Em stderr 25725497Sericof one of the filters 25825497Sericare sent to the corresponding 25949647Scael.Cm lf 26025497Sericfile. 26125497SericThe filters may, of course, use 26249647Scael.Xr syslog 26325497Sericthemselves. 26449647Scael.Pp 26520823SmckusickError messages sent to the console have a carriage return and a line 26620823Smckusickfeed appended to them, rather than just a line feed. 26769103Stef.Sh ADMINISTRATION 26869103StefIn a networked environment with many hosts, 26969103Stefit is convenient to use the same 27069103Stef.Nm printcap 27169103Steffile on all machines. 27269103StefThis is accomplished by specifying the complete set of entries 27369103Steffor every printer on all machines, including entries for both the 27469103Stef.Cm rm 27569103Stefand 27669103Stef.Cm lp 27769103Stefcapabilities. 27869103StefThis is possible because the 27969103Stef.Xr lpd 28069103Stefdaemon matches the 28169103Stef.Cm rm 28269103Stefprintcap entry with the local host name and 28369103Stefonly opens the line printer specified by 28469103Stef.Cm lp 28569103Stefif the names match. 28669103StefOtherwise the 28769103Stef.Cm lp 28869103Stefentry is ignored and the spooled file is sent on 28969103Stefto the remote machine for printing. 29049647Scael.Sh SEE ALSO 29149647Scael.Xr termcap 5 , 29249647Scael.Xr lpc 8 , 29349647Scael.Xr lpd 8 , 29449647Scael.Xr pac 8 , 29549647Scael.Xr lpr 1 , 29649647Scael.Xr lpq 1 , 29749647Scael.Xr lprm 1 29849647Scael.Rs 29949647Scael.%T "4.3 BSD Line Printer Spooler Manual" 30049647Scael.Re 30149647Scael.Sh HISTORY 30249647ScaelThe 30349647Scael.Nm 30449647Scaelfile format appeared in 30567801Smckusick.Bx 4.2 . 306