⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lpd.8

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 8
字号:
.TH lpd 8.SH Namelpd \- line printer daemon.SH Syntax.B /usr/lib/lpd[.B \-l] [.B \-L.I logfile] [.I portnumber].SH Description.NXR "lpd daemon".NXAM "lpr command" "lpd daemon".NXS "line printer daemon" "lpd daemon".NXA "lpd daemon" "lpc program".NXR "lpd daemon" "key characters"The.PN lpdline printer daemon uses the system calls.PN listenand.PN accept ,to receive requests to print files in the print queue,transfer files to the spooling area, display the queue, and remove jobsfrom the queue..PPThe line printer daemon is invoked by the.PN /etc/rccommand file when the system goes multi-user (normally at system startup).The daemon looks at the.PN /etc/printcapfile to find out about the capabilities of existing printers, andprints any files that were not printed when the system last stoppedoperating..PPThe Internet port number used to rendezvous with other processes isnormally obtained with.PN getservbyname ,but can be changed by using the \fIportnumber\fR argument..PPAccess to the facilities provided by the.PN lpddaemon is controlled by only allowing requests fromthe machines listed in the.PN /etc/hosts.equivor.PN /etc/hosts.lpdfiles.The.PN /etc/hosts.equivfile is described on the.PN hosts.equiv(5yp)reference page.The.PN /etc/hosts.lpdfile is a list of names consisting of one host machine name per line.An * character at the start of any line in.PN /etc/hosts.lpdallows print requests from all systems.  The machine names listed in the .PN /etc/hosts.equivand.PN /etc/hosts.lpdfiles may optionally contain the local BIND domain name.  Formore information on BIND, see the.I Guide to the BIND/Hesiod Service..PPYou can also control access to the.PN lpddaemon by specifying the \fBrs\fR capability fora particular printer in the.PN printcapfile.This restricts the printer users to those with accounts on themachine which the printer is connected to..PPThe file.I lockin each spool directory is used to prevent multiple daemons frombecoming active simultaneously, and to store informationabout the daemon process for.PN lpr ,.PN lpq ,and.PN lprm ..PPAfter the daemon has successfully set the lock, it scans the directoryfor command files with names beginning with .I cf .These files specify names of files which are to be printed andparameters affecting how the files are printed.Each line in a command file begins with a key characterto specify what to do with the remainder of the line.The key characters and their meanings are shown below.They are listed in the order that they would appear in a command file..PPIf a file is to be printed but can not be opened, a message will be placedin the \fIlogfile\fR (by default, the system console)..PPThe.PN lpddaemon uses .PN flockto provide exclusive access to the \fIlock\fR file.The lock is automatically removed by the kernel when a.PN lpdprocess terminates for any reason.The lock file contains two lines.The first is the process id of the daemon and the second is the controlfile name of the current job being printed.The second line is updated for use by.PN lpqand.PN lprm ..PPThe key characters in the command file and their meanings are as follows:.IP H\fIhost\fR 1iHost Name.Name of the machine where.PN lprwas invoked..IP P\fIuser\fR 1iPerson.Login name of the person who invoked.PN lpr .This is used to verify ownership by.PN lprm ..IP J\fIjob\fR 1iJob Name.String to be used for the job name on the banner page..IP C\fIclass\fR 1iClassification.String to be used for the classification line on the banner page..IP L\fIuser\fR 1iLiteral.The line contains identification information fromthe password file and causes the banner page to be printed..IP I\fInum\fR 1iIndent.The number of characters by which the output is indented (in ASCII)..IP M\fIuser\fR 1iSend mail to the specified user when the current print job completes..IP 1\fIfont\fR 1iTroff Font R.Name of the font file to use instead of the default..IP 2\fIfont\fR 1iTroff Font I.Name of the font file to use instead of the default..IP 3\fIfont\fR 1iTroff Font B.Name of the font file to use instead of the default..IP 4\fIfont\fR 1iTroff Font S.Name of the font file to use instead of the default..IP W\fInum\fR 1iWidth.Changes the page width (in characters) used by.PN prand the text filters..IP Z\fInum\fR 1iLength.Changes the page length (in lines) used by.PN prand the text filters..IP D\fIdata_type\fR 1iData type of the job..br(PostScript (TM) printers only.).IP <\fIinput_tray\fR 1iSelects the input tray that supplies paper for the print job..br(PostScript (TM) printers only.).IP >\fIoutput_tray\fR 1iSelects the output tray where the printed paper is deposited..br(PostScript (TM) printers only.).IP O\fIorientation\fR 1iSpecifies the orientation of the printed output on the page..br(PostScript (TM) printers only.).IP F\fIpage_size\fR 1iSpecifies the size of the pages being printed..br(PostScript (TM) printers only.).IP S\fIsheet_size\fR 1iSpecifies the physical size of the sheets being printed..br(PostScript (TM) printers only.).IP E\fImessage\fR 1iSpecifies what happens to messages generated when processing the print job..br(PostScript (TM) printers only.).IP X\fInum\fR 1iSpecifies the number of times each page is printed..br(PostScript (TM) printers only.).IP A\fInum\fR 1iSpecifies the first page to be printed for the job..br(PostScript (TM) printers only.).IP B\fInum\fR 1iSpecifies the last page to be printed for the job..br(PostScript (TM) printers only.).IP G\fInum\fR 1iSpecifies the number of pages to be printed on a single physical sheet..br(PostScript (TM) printers only.).IP z\fIfilename\fR 1iLayup definition file which alters the appearance of pages (margins, borders,etc)..br(PostScript (TM) printers only.).IP K\fIsides\fR 1iSpecifies whether the job should be printed on both sides to the physicalsheet, and whether the pages should be rotated by 180 degrees..br(PostScript (TM) printers only.).IP T\fItitle\fRTitle.String to be used as the title for .PN pr ..IP f\fIfilename\fR 1iFormatted File.Name of a file to print which is already formatted..IP p\fIfilename\fR 1iName of a file to print using .PN pras a filter..IP l\fIfilename\fR 1iLike .PN f but passes control characters and does not make page breaks..IP t\fIfilename\fR 1iTroff File.The file contains .PN troff ..IP n\fIfilename\fR 1iDitroff File.The file contains.PN ditroffoutput (device independent.PN troff )..IP d\fIfilename\fR 1iDVI File.The file contains TeX output (DVI format from Stanford)..IP g\fIfilename\fR 1iGraph File.The file contains data produced by.PN plot ..IP v\fIfilename\fR 1iThe file contains a raster image..IP c\fIfilename\fR 1iCifplot File.The file contains data produced by cifplot..IP r\fIfilename\fR 1iThe file contains text data with Fortran carriage control characters..IP x\fIfilename\fR 1iDo not interpret any control characters in the file..IP U\fIfilename\fR 1iUnlink.Name of file to remove upon completion of printing..IP N\fIname\fR 1iFile name.The name of the file which is being printed, or a blankfor the standard input (when .PN lpris invoked in a pipeline)..SS PostScript (TM) Printers With Specialised SupportTo use the features of the PostScript (TM) printers for which specialisedsupport is available, you must ensure that \fB:ps=LPS:\fR isset in the appropriate entry in the.PN /etc/printcapfile..PPFor PostScript (TM) printers, the line printer daemon assembles the PostScript(TM)from the users data files and PostScript (TM) device control modules.The device control modules access device features and manipulate theappropriate printer parameters.Device control modules (the \fBDl\fR capability in.PN /etc/printcap ),are provided in an archive file, refer to.PN ar(5) .Device control modules access printer specific features of PostScript (TM)and are therefore device dependent..PPThe data type of the spooled files is given by the \fBDa\fR capability inthe.PN printcapfile.The data type can be overridden by the \fBD\fR key character in the commandfile..PPThe support for PostScript (TM) printers introduces a new method ofspecifying the type of the data to be printed using the \fB\-D\fR option of.PN lpror the \fBDa\fR capability in.PN /etc/printcap .The mechanism for invoking these translators needs to interact with theexisting mechanism for invoking filters for non-text files, so that theexisting mechanism can be used if required.The mechanism has the following features:.IPThe new translators are invoked via the shell program.PN xlator_call ,which is passed the data type as one of its parameters..IPAny old style filter arguments (for example, \fB\-t\fR and \fB\-x\fR) takeprecedence over \fB\-D\fR (even though.PN lprwill accept the combination).This means that the \fBif\fR capability in.PN /etc/printcapmust not be specified if data types are being used..SS Filter CapabilitiesTwo of the.PN printcapcapabilities that affect the behaviour of.PN lpdrequire a more detailed explanation than that given on the.PN printcap(5)reference page..IP ct .3iConnection type.This entry in the.PN printcapfile determines the type of connection.The following table shows the valid choices for \fBct\fR, and the mandatory andoptional entries to go with each choice..sp 6p.TS tab(@);lfHB lfHB lfHBlfR lfR lfR ._.sp 4pct=@Mandatory Entries@Optional Entries.sp 6p_.sp 6p.Rdev@lp@oflat@lp, ts, op, os@ofremote@rp, rm@network@of@.sp 6p_.TE.IP \& .3iRemote means a printer that is connected to another system running acompatible printing daemon.Network means that the output filter does not use stdout (that is, no\fBlp\fR) and is restarted for each job..IP uv .3iULTRIX version.To enable the \fBct\fR capability to determine the type of connection,and to ensure % escapes are expanded in all filter command strings, youmust have.EX:uv=psv1.0:.EEas part of the.PN printcapentry..SS Using Filter CapabilitiesThis section refers to the programs specified bythe following filter capabilities in the.PN printcapfile: .PN cf , .PN df , .PN gf , .PN if , .PN nf , .PN of , .PN pp , .PN tf , .PN vf , .PN xf , .PN Lf , and.PN Xf ..PPFilters may be specified as pipelines as well as simple commands.The syntax accepts tab or space as word separators, and | toset up a pipe connection.You can specify arguments to the filters.The individual commands may be specified as full path names oras simple program names, in which case the path searched is:.EX/usr/local/lib/lpdfilters:/usr/ucb:/bin:/usr/bin:                            /usr/lib:/usr/lib/lpdfilters.EE.SS Filter Argument ParameterisationThe arguments to the filter program are normally supplied automaticallyby.PN lpdbut you can assign your own arguments to filters.When arguments are supplied automatically, they are put after the argumentsfor the first command in a pipeline, or after the arguments of a simplecommand..PPIf you want to assign your own arguments to filters, you must ensure that\fB:uv=psv1.0:\fR is set in the appropriate entry in the.PN printcapfile..PPArguments are supplied exactly as for previous.PN lpdreleasesunless a special character (%) is found anywhere in the command.If a % is found it tells.PN lpdthat you have taken controlof passing arguments to the filter.In this case, the default set of argumentsare no longer appended to the argument list.The arguments supplied to the command are those specified in the commandstring, but with.PN lpdreplacing %x pairs with parameter strings..PPTo allow the special character, %, to be passed,a pair of %%'s are replaced by a %.It is an error to specify an unknown %x pair.The %x pairs and the parameter strings that replace them are shown below..sp 6p.TStab(@);lw lwlw lw..HB_.sp 6p%x Pairs@Parameter String.sp 6p_.sp 6p.R%%@%%0@T{null string (used to pass null argument or disable default arguments)T}%\&_@space (used to insert spaces in arguments)%A@accounting file%D@data type%F@pagesize%H@host where job was submitted%I@indent%j@job name%J@T{job id as shown by.PN lpqT}%L@length%O@orientation%P@printer name%T@title%U@user's login name%W@width%X@pixel width%Y@pixel length.sp 6p_.TE.PPAll of the above %x pairs are available to all input filters.For a network printer (\fB:ct=network:\fR in the.PN /etc/printcapfile) they are all available to the output filter \fBof\fR.For dev and lat printers the per-job parameters (%H, %U, %J and%j) are not available to the output filter.This is because the output filteris invoked per session so that per-job parameters are still unset..SS Filter Arguments Supplied By lpdThe arguments automatically assigned to each filter by.PN lpdare shown below.For clarity the parameters for each argument are shown as the appropriate %x pair..sp 6p.TStab(@);lw lwlw lw..HB_.sp 6pFilter@Parameterised Form of Default Arguments.sp 6p_.sp 6p.Rcf@\-x%X \-y%Y \-n %U \-h %H %Adf@\-x%X \-y%Y \-n %U \-h %H %Agf@\-x%X \-y%Y \-n %U \-h %H %Aif@\-w%W \-l%L \-n %U \-h %H %A\&(when \c.PN lpr \0\cis invoked@without the \fB\-l\fR option)@if@\-c \-w%W \-l%L \-n %U \-h %H %A\&(when \c.PN lpr \0\cis invoked@with the \fB\-l\fR option)@nf@\-w%W \-l%L \-n %U \-h %H %Aof@\-w%W \-l%Lpp@\-w%W \-l%L \-h %Trf@\-w%W \-l%L \-n %U \-h %H %Atf@\-x%X \-y%Y \-n %U \-h %H %Avf@\-x%X \-y%Y \-n %U \-h %H %Axf@(no arguments)Lf@(no arguments)Xf@%D %O %F %W %L %I.sp 6p_.TE.PPThe %A argument is only supplied if the \fBaf\fR capabilityis present..SH Options.IP \fB\-l\fR .3iLog valid requests received from the network.This can be useful for debugging purposes..IP \fB\-L\fIlogfile\fR .3iWrite error conditions to the file specified by the argument\fIlogfile\fR.If this option is not used, error conditions are written to the systemconsole..SH Files.TP 25.PN /etc/printcapPrinter description file.TP.PN /usr/spool/lpdSpool directories.TP.PN /dev/lp*Line printer devices.TP.PN /dev/printerSocket for local requests.TP.PN /etc/hosts.lpdLists machine names allowed printer access.TP.PN /etc/hosts.equivLists machine names allowed printer access as trusted machines.SH See Alsolpq(1), lpr(1), lprm(1), printcap(5), lpc(8), pac(8), xlator_call(8).br.I Guide to the BIND/Hesiod Service.br.I Guide to System Environment Setup

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -