PRINTCAP(5) PRINTCAP(5) NNAAMMEE printcap - printer capability data base SSYYNNOOPPSSIISS /etc/printcap database DDEESSCCRRIIPPTTIIOONN The format of the LPNng _p_r_i_n_t_c_a_p database was based on the _t_e_r_m_c_a_p(5) data base file format. Entries in the _p_r_i_n_t_c_a_p Each entry in the data base is used to define various options and values to control the printing and spooling of print jobs. CCAAPPAABBIILLIITTIIEESS The database is a simplified form of the _t_e_r_m_c_a_p _(_5_) database. Leading whitespace on each line is discarded, and blank lines or lines which then start with a comment character (#) are discarded. A line which does not start with a colon (:) or bar (|) starts a printer entry defini­ tion. Lines ending with a backslash (\) are assumed to continue to the next line; this is for compatibility with other historical printcap file formats. Trailing blanks and tabs (whitespace) for an option value are deleted unless the last one is escaped with a backslash (``\''). A printer definition starts with a primary printer name, followed by zero or more alternative printer names, fol­ lowed by a set of keyword entries and values. For exam­ ple: #comment # primary printer name lp #alternate names |lp2|lp3 |Example of a printer :sd=/usr/spool/LPD/lp :rw:lp=/dev/lp:mx#100 include /etc/printcap/mainprintcap The special printcap definition _i_n_c_l_u_d_e will read the named file, which must have an absolute pathname, as the next set of printcap entries. Keywords can be 1 to an indefinate number of characters long, and are case sensitive. Values for keywords can be strings (:st=string:), signed integer values using the C language notation, (:nu#12:max#-2:mask#0x1EF:), or flags (:flag: to set to 1, :flag@: to clear to 0). Integer val­ ues must be representable as 32 bit 2's complement num­ bers; care should be taken with extremely large numbers. If the primary name of a printcap entry starts with a LPRng LPRng-3.5.3 1 PRINTCAP(5) PRINTCAP(5) punctuation character, then the entry may be referenced using the _t_c capability, but is ignored otherwise. This allows common printcap information to be placed in a sin­ gle entry. The special printcap entry _o_h (i.e. - only this host) may be used to select a printcap entry for use by one or more hosts. The oh entry can be a list of one or more host names or glob type of patterns. These patterns are first applied to the host's fully qualified domain name, and then used to to a lookup of an IP address. If either the glob match or the host has a matching IP address then the printcap entry is selected for use. In addition, the _s_e_r_v_e_r flag indicates that only the LPD server is to use this printcap entry. This allows client and server print­ cap information be to be segragated in a simple manner. The following is a list of the keywords currently used by the LPRng software. Many of these keywords are used only by the _L_P_D server, others are used by the client programs _L_P_R_, _L_P_C_, _L_P_R_M_, _P_A_C_, as well as the server. In the Use column in the table below, an AA stands for all programs, DD stands for _l_p_d, and RR stands for the client programs such as _L_P_R_. Some of these entries can only appear or have an effect if they are in the lpc.conf initialization file. See lpd.conf(5) for further details. EENNTTRRIIEESS BBYY AALLPPHHAABBEETTIICCAALL OORRDDEERR FFLL UUssee TTyyppee DDeeffaauulltt DDeessccrriippttiioonn Xf D str NULL output filter for format X (used by lpd) ab D bool false always print banner, ignore lpr -h option ac A str NULL allowed classes to be printed (default is all classes) achk D bool false If TRUE LPD will check for a 'ACCEPT' reply to the initial accounting information written to a filter at the start of a job. ae D str accounting format for end of job (see also af, la, ar and Accounting) af D str NULL name of accounting file or server (see also la, ar) If the af field has the format |program, a filter will be started and used for recording accounting information; if the format is host%port, a tcp socket connection will be made to the port on the host. The as and ae strings will be printed to the specified destination. This connection will be passed to filters as file descriptor 3. The accounting file will not be created, it must exist for LPD to append data to it. ah D bool false auto-hold - job held until explicitly released all A str NULL a list of all printers; (see ALL PRINTERS) allow_duplicate_flags A bool false allow duplicate command line flags; last overwrites earlier LPRng LPRng-3.5.3 2 PRINTCAP(5) PRINTCAP(5) allow_getenv A bool (compile time) allows LPRng software to use the LPD_CONF environment variable to specify the location of a configuration file. This is for testing only. allow_user_logging A bool false if mail is requested using lpr -mhost%port,prot operations, and the allow_user_logging flag is true, then job logging information will be sent to host%port,prot. ar D bool true write remote transfer accounting (if af, and as/ae set) architecture A str (compile time) architecture the software was compiled for. (Obsolete.) as D str accounting format for start of job (see also af, la, ar and Accounting) be D str banner printing program for end (overrides bp, hl) bk R bool false Berkeley-compatible: be strictly RFC-compliant or more exactly, BSD LPR compatible when sending jobs. bkf R bool false use bk_filter_options and bk_of_filter_options when invoking print filter. bk_filter_options D str (see source code) when bk flag set, options for non OF print filters bk_of_filter_options D str (see source code) when bk flag set, options for OF print filters bl D str banner line - sent to banner printer program default: $-'C:$-'n Job: $-'J Date: $-'t expands to: Class:User Job: job Date: date This is to force compatibility with vintage print filters that require a non-standard banner string. Usually used with :sb: option. bp D str banner printing program (see hl) (default: configuration variable default_banner_printer) bq D str NULL specifies the next destination for jobs sent to this queue. Job data files are first sent through any filters listed in printcap entry before transfer. (See Bounce Queues) br D num none if lp is a tty, set the baud rate (see ty) break_classname_priority_link A flag false Normally, lpr sets the priority to the first letter of the class specified with -C. When non-zero, forces the class and priority to be disjoint. bs D str banner printing program for start (overrides bp, hl) cd D str NULL control information directory for LPD server cf D str NULL cifplot data filter check_for_nonprintable R bool true lpr checks f and p formats for printable files check_idle D str NULL program to use to check for idle printer conditions before processing jobs. class_in_status A bool false lpq will report full class name when flag is set. classname_length A num 31 overrides the RFC1179 limitations on the control file CLASS entry. Default is 31 characters. cm A str NULL comment identifying printer (LPQ) co D num 20 cost in dollars. Obsolete. LPRng LPRng-3.5.3 3 PRINTCAP(5) PRINTCAP(5) config_file A str /etc/lpd.conf:/usr/etc/lpd.conf location of LPRng configuration information. Compile time option only - see allow_getenv. connect_grace A num 0 time between jobs to allow printer recovery connect_interval A num 10 time between open or connection attempts connect_timeout A num 10 timeout value for connection or open control_filter D str NULL Filter for control file. Used when sending job to remote spool queue. db A str NULL LPD debug options when serving this queue. See lf (log file) entry as well. default_auth R str NULL default client to server authentication type used when specificially requested by user. default_format R str f default format for printing jobs default_logger_port D str 2001 default remote port for logging information default_logger_protocol D str UDP default protocol for logging information. TCP selects TCP/IP default_permission D str A default permission for operation default_printer A str lp default printer for printing jobs default_priority R str A default priority for printing jobs default_remote_host A str localhost default remote host for printing operations default_tmp_dir A str /tmp default temporary directory destinations D str NULL names of printers that lpq/lprm should talk to find a job that has been processed by a router script (see README.routing) df D str NULL tex data filter (DVI format) direct_read D bool false if true, filters are given direct access to file. This means no progress indication possible. fc D num OBSOLETE if lp is a tty, clear flag bits (see STTY) fd D bool false if true, no forwarded jobs accepted ff D str ``\f'' string to send for a form feed (see INITIALIZATION) filter_ld_path D str (see source) the LD_LIBARY_PATH environment variable value for filters filter_options D str (see source code) when bk flag clear, options for non OF print filters filter_path D str (see source) the PATH environment variable value for filters fix_bad_job D bool false fix a bad job file - usually by ignoring multiple U (unlink) entries, badly formatted file names, or other common botches produced by various PC based LPRng LPRng-3.5.3 4 PRINTCAP(5) PRINTCAP(5) LPR clients. fo D bool false print a form feed when device is opened force_fqdn_hostname A bool FALSE Force a fully qualified host name in control file force_localhost A bool FALSE Forces the clients programs (lpr, lpc, etc.) to send all print jobs and requests to the server running on the localhost entry for action. This flag effectively forces BSD LPR behaviour. force_queuename A str NULL When :qq: flag or use_queuename configuration is enabled, specifies the queuename to be used for control file Q information. forward_auth A str NULL Do server to server authentication when non-null. Use this value for the remote host authentication information. fq D bool false print a form feed when device is closed full_time D bool detailed time format specification in log messages fs D num OBSOLETE like `fc' but set bits (see STTY) fx A str ``flp'' valid output filter formats generate_banner D bool false force banner generation gf D str NULL graph data filter (plot (3X) format) hl D bool false print banner after job instead of before ignore_requested_user_priority D bool false Ignore the requested user priority when ordering jobs. Prevents students... um... users from queue jumping. if D str NULL filter command, run on a per-file basis kerberos_* D str Kerberos authentication support. See KERBEROS. kerberos_keytab D str /etc/lpd.keytab Kerberos lpd server keytab file kerberos_life D str NULL Kerberos lpd server key lifetime kerberos_renew D str NULL Kerberos lpd server key renewal time kerberos_server_principle D str NULL Kerberos remote lpd server principle kerberos_service D str lpr Kerberos service used in principle requests la D bool true write local printer accounting (if af is set) ld D str NULL leader string printed on printer open (see INITIALIZATION) lf D str ``log'' error and debugging log file (LPD) lk D bool false lock the lp device to force arbitration localhost A str localhost localhost named used for localhost lookup lockfile D str /var/spool/lpd/lpd.lock.%h lpd lock file (used only in lpd.conf) logfile D str /var/spool/lpd/lpd.log.%h lpd log file (used only in lpd.conf) logger_destination D str NULL destination for logging information. Format is host[%port][,(TCP|UDP)] longnumber D bool false use 6 digit job numbers lp D str NULL device name or pipe to send output to LPRng LPRng-3.5.3 5 PRINTCAP(5) PRINTCAP(5) lpd_force_poll A bool FALSE Forces lpd to periodically poll lpd queues. lpd_poll_time A num 600 After this amount of idle time, lpd will poll queues lpd_port D str printer integer or port from /etc/services for lpd server to accept connections. lpd_printcap_path D str (see source) printcap path for lpd, in addition to normal one (configuration value only) lpr_bounce R bool true LPR will do bounce queue filtering. mail_from D str NULL specifies the user part of email From: address mail_operator_on_error D str NULL send mail to this user when LPD encounters printing error. max_connect_interval A num 60 maximum time between connection attempts max_log_file_size D num 0 maximum log file size in K bytes (0 is unlimited) spool queue log file truncated to min_log_file_size when value is nonzero and limited exceeded. max_servers_active D num 0 maximum servers that LPD will allow to be active at one time. 0 selects the system default, which is usually pretty small, perhaps 10. (configuration value only). max_status_line D num 79 maximum number of characters on an LPQ status line max_status_size D num 10 maximum size (Kbytes) of status file mc R num 1 maximum copies allowed mi D str 0 minimum space (Kb), to be left in spool filesystem You can also use nnnM for nnn megabytes. Alias for minfree min_log_file_size D num 0 minimum size (Kbytes) of log file min_status_size D num 2 minimum size (Kbytes) of status file minfree D str 0 alias for mi ml R num 32 minimum printable characters for printable check ms D str NULL alias for ty ms_time_resolution D bool false log time in milliseconds mx R num 1000 maximum job size (1Kb blocks, 0 = unlimited) nb D num 0 if non-zero, do a nonblocking open on lp device nf D str NULL DITROFF data filter network_connect_grace A num 0 time between attempts to send jobs to spooler Useful when dealing with network printer using LPD interface to allow a bit of time between jobs. nw A bool false spool dir is on an NFS file system (take precautions when reading/writing files) of D str NULL output filter, run once for all output (used for banner printing, form feeds between files) of_filter_options D str (see source code) when bk flag clear, options for OF print filters originate_port A str 512 1023 when originating a connection, use ports in this range. oh A str NULL Specific printcap entry for host; (printcap entry ignored unless IP address of host and LPRng LPRng-3.5.3 6 PRINTCAP(5) PRINTCAP(5) entry value match. Entry is used first to do glob style match against the host's fully qualified domain name, and then interpreted as a general IP address) pass_env A str PGPPASS,PGPPATH if not the LPD server, sanitize and put these variables in a filter environment variable list. perms_path A str /etc/lpd.perms:/usr/etc/lpd.perms location of perms file (used in lpd.conf) pl D num 66 page length (in lines) pr D str ``/bin/pr'' pr program for p format printcap_path A str /etc/printcap:/usr/etc/printcap location of printcap file (used in lpd.conf) ps A str ''status'' printer status file name pw D num 132 page width (in characters) px D num 0 page width in pixels (horizontal) py D num 0 page length in pixels (vertical) qq A bool false LPR - puts in the queue name (Q entry) in the job control file when spooled or transferred. LPD - when receiving or transferring a job, if the queue name (Q entry) in the job control file is not present, puts in the queue name. remote_user A str NULL when doing authentication, use this entry for the remote user or remote end of the connection. This allows you to specify a key or other information. remote_support A str NULL if non-null, specifies allowed operations to remote queue. R=lpr, M=lprm, Q=lpq, V = lpq -v, C=lpc. For example, remote_support=RM would only allow LPR and LPRM operations. report_server_as A str NULL use the str value as the name of the server when reporting LPQ or LPC status. retry_econnrefused A bool true if set, retry a connection to a remote system when an ECONNREFUSED error is returned. retry_nolink D bool true if LPD is sending a job or opening a device for printing and the value is true, then the connection or device open is repeated indefinately. return_short_status D str NULL Some legacy (non-LPRng) LPQ programs expect 'short' status to be returned. This option allows you to specify which hosts will get it. The value is a list of hosts and/or IPaddresses and masks to which the LPD server will provide short status. For example: return_short_status=192.8.0.0/16 will make LPD return short status to all requests from hosts in subnet 192.8.0.0. (See short_status_length) reuse_addr A bool false if set, use SO_REUSEADDR on outgoing connection ports. This reduces the problems with exhausting port numbers. (usually only in lpd.conf) reverse_lpq_status D str NULL When a lpq status request arrives from one of the specified hosts or IP addresses, then the LPQ status format is inverted. LPRng LPRng-3.5.3 7 PRINTCAP(5) PRINTCAP(5) For example, if reverse_lpq_status=host*,127.0.0.0/8, then when a LONG status request arrives from host1 or from ip address 127.0.0.1, the SHORT status will be returned. rf D str NULL filter for printing FORTRAN style text files rm A str NULL remote-queue machine (hostname) (with rp) router D str NULL script that dynamically re-routes a job (see README.routing) rp A str NULL remote-queue printer name (with rm) rt A num 3 number of times to try printing (0=infinite) see send_failure_action, send_job_rw_timeout, send_try rw D bool false open the printer for reading and writing safe_chars D str NULL additional safe characters for control file contents save_on_error D bool false Save job when an error occurs to allow post-mortem diagnostics or reprinting. This should only be set on print queues. It is also a diagnostic aid. save_when_done D bool false Save job when done (printed, transferred) to allow retry at a later time. This should only be set on print queues. It is also a diagnostic aid. sb D bool false short banner (one line only) sc R bool false suppress multiple copies sd A str NULL spool directory (only ONE printer per directory!) send_block_format A bool false Use the LPRng extended 'block job' job transmission method to send a job to a remote site. send_data_first A bool false send data files then control files when sending a job to a remote host. send_failure_action D str "abort" Action on print or transmission failure after send_try attempts; use the following codes: 'success' (JSUCC) - treat as successful 'abort' (JABORT) - abort printer 'retry' (JRETRY) - retry job 'remove' (JREMOVE)- remove job 'hold' (JHOLD) - hold job If the value is "|/filter", the filter will be run and the number of attempts can be read from standard input. The filter should exit with one of the error codes listed above to cause the appropriate action. send_job_rw_timeout A num 6000 timeout on read/write operations when sending job to printer or remote host (0 value is no timeout) send_query_rw_timeout A num 6000 timeout on read/write operations when performin a status operation (0 value is no timeout) send_try A num 3 alias for rt - numbers of times to try sending or printing a job. 0 is infinite. sendmail D str /usr/sbin/sendmail -oi -t sendmail command to send mail to user. Flags must be set so that address and other information is taken from standard input. server A bool false printcap entry for server only LPRng LPRng-3.5.3 8 PRINTCAP(5) PRINTCAP(5) server_auth_command A str NULL authentication command for server program server_tmp_dir D str /tmp temporary directory for server to create files when there is no spool directory. server_user D str daemon server user name used in authentication operations sf D bool false suppress form feeds separating jobs sh D bool false suppress headers and/or banner page short_status_length D num 1 If the return_short_status value is used and has a match against a requesting address, this amount of status is set by the short_status_length option. For most legacy systems a 1 is suitable (1 line of status). socket_linger A num 10 if nonzero, forces a SO_LINGER operation to be done on all TCP/IP connections. This usually corrects a problem with missing last data transmissions to remote hosts. spool_dir_perms D num 042700 permissions for spool directory spool_file_perms D num 0600 permissions for spool file spread_jobs D num 0 spread job numbers to avoid collisions ss D str NULL name of queue that server serves (with sv) stalled_time D num 120 Time after which to report an active job as stalled stop_on_abort D bool true Stop processing queue when print filter aborts. sv D str NULL names of servers for queue (with ss) sy D str NULL alias for ty sync_lpr D bool false suppress socket close until end of lpr operation syslog_device D str /dev/console name of syslog device to use if no syslog facility tc A str NULL reference to a printcap entry to include as part of the current entry. tf D str NULL troff data filter (C/A/T phototypesetter) tr D str NULL trailer string to print when queue empties translate_format D str NULL translate job format (similar to tr(1) utility) only valid when transferring to remote spool queue. Example: translate_format=pfml p format changed to f, m format to l ty D str NULL stty commands to set output line characteristics alias is sy, ms use_identifier R bool false add job identifier lines ('A') in the control file use_info_cache D bool true cache printcap information use_queuename A str NULL if no Q information in control file, use this value and place in control file. use_shorthost R bool false use only the hostname for job control and data file names. Host information in job file will still be fully qualified domain name. user D str daemon LPD effective user (EUID) for SUID operations user_auth_command A str NULL authentication command for user (client program) user_lpc D str NULL LPRng LPRng-3.5.3 9 PRINTCAP(5) PRINTCAP(5) list of lpc subcommands allowed to be executed by user A matching value enables SERVICE=U permissions checking. vf D str NULL (Versatek) raster image filter xc D num 0 if lp is a tty, clear local mode bits (see STTY) xs D num 0 like `xc' but set bits (see STTY) EENNTTRRIIEESS BBYY FFUUNNCCTTIIOONN See the alphabetical listing for detailed information. FFiilltteerrss aanndd PPaaggee FFoorrmmaattss Xf D str NULL output filter for format X (used by lpd) cf D str NULL cifplot data filter control_filter D str NULL Filter for control file. Used when sending job to remote spool queue. df D str NULL tex data filter (DVI format) direct_read D bool false if true, filters are given direct access to file. This means no progress indication possible. fx A str ``flp'' valid output filter formats gf D str NULL graph data filter (plot (3X) format) if D str NULL filter command, run on a per-file basis lpr_bounce R bool false LPR will do bounce queue filtering. nf D str NULL DITROFF data filter of D str NULL output filter, run once for all output pl D num 66 page length (in lines) pr D str ``/bin/pr'' pr program for p format pw D num 132 page width (in characters) px D num 0 page width in pixels (horizontal) py D num 0 page length in pixels (vertical) rf D str NULL filter for printing FORTRAN style text files translate_format D str NULL translate job format (similar to tr(1) utility) only valid when transferring to remote spool queue. Example: translate_format=pfml p format changed to f, m format to l tf D str NULL troff data filter (C/A/T phototypesetter) vf D str NULL (Versatek) raster image filter BBaannnneerrss ab D bool false always print banner, ignore lpr -h option be D str banner printing program for end (overrides bp, hl) bp D str banner printing program (use hl to print banner at end) bs D str banner printing program for start (overrides bp, hl) hl D bool false print banner after job instead of before sb D bool false short banner (one line only) sh D bool false suppress headers and/or banner page, overrides ab AAccccoouunnttiinngg ae D str accounting format for end of job (see also af, la, ar and Accounting) af D str NULL name of accounting file (see also la, ar) LPRng LPRng-3.5.3 10 PRINTCAP(5) PRINTCAP(5) ar D bool true write remote transfer accounting (if af, and as/ae set) as D str accounting format for start of job (see also af, la, ar and Accounting) la D bool true write local printer accounting (if af is set) QQuueeuuee ccoonnttrrooll ac A str NULL allowed classes to be printed (default is all classes) ah D bool false auto-hold - job held until explicitly released bk R bool false backwards-compatible: be strictly RFC-compliant bkf R bool false backwards-compatible filter: use Berkeley filter options bqfilter D bool false if a bounce queue (sends jobs to remote site) then when bqfilter true and a format filter is specified, sends data files through format filter before transfer. See also 'qq'. cd D str NULL control information directory for LPD server cm A str NULL comment identifying printer (LPQ) fd D bool false if true, no forwarded jobs accepted lf D str ``log'' error and debugging log file (LPD) longnumber D bool false use 6 digit job numbers mc R num 1 maximum copies allowed mi D str 0 minimum space (Kb) to be left in spool filesystem You can also use nnnM for nnn megabytes. ml R num 32 minimum printable characters for printable check mx R num 1000 maximum job size (1Kb blocks, 0 = unlimited) ps A str ''status'' printer status file name nw A bool false spool dir is on an NFS file system (take precautions when reading/writing files) qq A bool false place queue information in control file. See alphabetical for details. rm A str NULL remote-queue machine (hostname) (with rp) rp A str NULL remote-queue printer name (with rm) sd A str NULL spool directory (only ONE printer per directory!) ss D str NULL name of queue that server serves (with sv) sv D str NULL names of servers for queue (with ss) sc R bool false suppress multiple copies use_identifier R bool false add job identifier lines ('A') in the control file use_shorthost R bool false use only the hostname for job control and data file names. Host information in job file will still be fully qualified domain name. CCoonnnneeccttiioonn aanndd IInntteerrffaaccee ttoo PPrriinntteerr db A num 0 debug level when using this printer connect_interval A num 10 time between open or connection attempts connect_timeout A num 10 timeout value for connection or open (0 is infinite number) ff D str ``\f'' string to send for a form feed (see INITIALIZATION) fix_bad_job D bool false fix a bad job file - usually by ignoring multiple U (unlink) entries, badly formatted file names, or other common botches produced by various PC based LPRng LPRng-3.5.3 11 PRINTCAP(5) PRINTCAP(5) LPR clients. fo D bool false print a form feed when device is opened fq D bool false print a form feed when device is closed ld D str NULL leader string printed on printer open (see INITIALIZATION) lp D str NULL device name or pipe to send output to lk D bool false lock the lp device to force arbitration max_connect_interval A num 60 maximum time between connection attempts nb D num 0 if non-zero, do a nonblocking open on lp device retry_econnrefused A bool true if set, retry a connection to a remote system when an ECONNREFUSED error is returned. retry_nolink D bool true if LPD is sending a job or opening a device for printing and the value is true, then the connection or device open is repeated indefinately. rs D num 300 number of seconds between spool queue status scans rt D num 3 number of times to try printing (0=infinite). rw D bool false open the printer for reading and writing save_on_error D bool false See above. save_when_done D bool false See above. send_failure_action D str abort See above. send_try alias for rt sf D bool false suppress form feeds separating jobs socket_linger A num 10 if nonzero, forces a SO_LINGER operation to be done on all TCP/IP connections. This usually corrects a problem with missing last data transmissions to remote hosts. tr D str NULL trailer string to print when queue empties SSeerriiaall LLiinnee SSeettuupp br D num none if lp is a tty, set the baud rate (see ty) fc D num OBSOLETE if lp is a tty, clear flag bits (see STTY) fs D num OBSOLETE like `fc' but set bits (see STTY) ms D str NULL alias for ty sy D str NULL alias for ty ty D str NULL stty commands to set output line characteristics alias is sy, ms xc D num OBSOLETE if lp is a tty, clear local mode bits (see STTY) xs D num 0 like `xc' but set bits (see STTY) MMiisscceellllaanneeoouuss all A str NULL a list of all printers; (see ALL PRINTERS) destinations D str NULL names of printers that lpq/lprm should talk to find a job that has been processed by a router script (see README.routing) forward_auth D str NULL server to server authentication type, e.g. pgp, kerberos force_localhost A bool FALSE LPRng LPRng-3.5.3 12 PRINTCAP(5) PRINTCAP(5) Forces the clients programs (lpr, lpc, etc.) to send all print jobs and requests to the server running on the localhost entry for action. This flag effectively forces BSD LPR behaviour. force_queuename A str NULL See above. logger_destination D str NULL destination for logging information. Format is host[%port][,(TCP|UDP)] oh D str NULL Specific printcap entry for host. See above. remote_support A str RMQC if non-null, specifies allowed operations to remote queue. R=lpr, M=lprm, Q=lpq, C=lpc router D str NULL script that dynamically re-routes a job (see README.routing) server A bool false printcap entry for server only server_auth_command D str NULL authentication command for server to use. tc A str NULL reference to a printcap entry to include as part of the current entry. use_auth D str NULL client to server authentication type, e.g. pgp, kerberos user_auth_command R str NULL authentication command for user (client program) FFIILLTTEERRSS By convention, all output filter names have the form XXff,, where XX is the lower case letter corresponding to the lpr formatting option. The iiff and ooff filters are the standard output filters. The ooff filter is started for each job and is used to print the banner page and any FF separators between individual files of the job. It is sent a special stop sequence by the lpd server, and must suspend opera­ tions until sent a SIGCONT signal. An iiff filter is run separately for each file; at the end of the job the ooff filter is restarted and used to print the trailing banner (if any) and FF separators. Filters are invoked with a standard set of options defined by the bk_filter_options (backwards compatible), bk_of_filter_options (backwards compatible OF filter), and filter_options configuration variables. See the lpd(8) manual page for details. If the first characters of the filter specification are -$, i.e.- Xf=-$ filter, then the command line options are not added. Currently, the options are: bk_filter_options $P $w $l $x $y $F $c $L $i $J $C $0n $0h $-a bk_of_filter_options $w $l $x $y filter_options $C $F $H $J $L $P $Q $R $Z $a $c $d \ $e $f $h $i $j $k $l $n $s $w $x $y $-a SSPPOOOOLL QQUUEEUUEESS Printcap entries which have a spool directory value (sd) LPRng LPRng-3.5.3 13 PRINTCAP(5) PRINTCAP(5) are called spool queues. Jobs sent to a printer with a spool queue are place in the spool directory. When check­ ing the spool queue for jobs, the server will check to see if there is a printcap file in the directory with the name pprriinnttccaapp..host. If there is, the additional printcap information is processed and used by the server. If the spool directory is NFS exported, then remote hosts can manipulate the spool entries directly; this can have catastrophic effects, especially in systems where the NFS implementation has defects. The printcap information is particularly vulnerable to exploitation, as well as sym­ bolic links, jobs which cannot be removed, etc. In order to support systems which require NFS exported spool directories, the LPRng system has the following options. The NFS (nw) printcap flag is an indication that the spool directory is NFS exported and/or mounted. The server will not read the directory for printcap informa­ tion. The next step up in security is to specify a sepa­ rate control directory (cd) for the non-job control and data files. If this is done, then only job control files and job data files will be read from the spool directory. In addition, if there are any problems with a job, a spe­ cial error file will be written in the control directory, preventing run away activity on a suspicious job. LLOOCCAALL PPRRIINNTTEERRSS Local printers have an llpp entry, which is the device that output should be sent to, usually a serial port tty. PLP supplements this by using the lp field to indicate a remote printer, or by allowing communication with the printer using a separate program, known as an _l_p_-_p_i_p_e_, instead of a serial line. If the printcap llpp entry con­ tains a string of the form pprriinntteerr@@hhoosstt,, jobs are for­ warded to the specified remote printer on the host. If the printcap llpp entry contains a string of the form || ccoomm­­ mmaanndd aarrggss , the command ccoommmmaanndd is run, with the arguments aarrggss .. This can be used to communicate with printers con­ nected to network terminal servers, some TCP/IP-capable printers, and just about anything you can hack up a commu­ nication program for. Read the PLP Manual for more details. TTYY ((SSTTTTYY)) OOPPTTIIOONNSS The ttyy (stty) printcap parameter recognises a set of _s_t_t_y(1) options that can be used to set serial line char­ acteristics for the printer. However, due to the differ­ ences between implementations of UNIX, there are several sets of ttyy options supported. Invoke _l_p_d(8) with the ``-v'' command-line option to see which set your installa­ tion is using. Systems using the _s_g_t_t_y tty manipulation interface may use LPRng LPRng-3.5.3 14 PRINTCAP(5) PRINTCAP(5) the following _s_t_t_y(1) options: bs0 bs1 [-]cbreak cooked cr0 cr1 cr2 cr3 [-]decctlq [-]echo [-]even ff0 ff1 [-]lcase [-]litout nl0 nl1 nl2 nl3 [-]nl [-]noflsh new [-]nohang old [-]odd [-]raw start stop tab0 tab1 tab2 [-]tabs [-]tandem tek ti700 [-]tilde tn300 tty33 tty37 vt05 [-]evenp [-]oddp [-]pass8 Systems using _t_e_r_m_i_o may use the following options: [-]ignbrk [-]brkint [-]ignpar [-]parmrk [-]inpck [-]istrip [-]inlcr [-]igncr [-]icrnl [-]iuclc [-]ixon [-]ixany [-]ixoff [-]decctlq [-]tandem [-]imaxbel [-]opost [-]olcuc [-]onlcr [-]ocrnl [-]onocr [-]onlret [-]ofill [-]ofdel [-]cstopb [-]cread [-]parenb [-]parodd [-]hupcl [-]clocal [-]loblk [-]parity [-]evenp [-]oddp [-]stopb [-]hup [-]crtscts [-]isig [-]noisig [-]icanon [-]cbreak [-]xcase [-]echo [-]echoe [-]echok [-]crterase [-]lfkc [-]echonl [-]noflsh [-]tostop [-]echoctl [-]ctlecho [-]echoprt [-]prterase [-]echoke [-]crtkill [-]lcase [-]nl [-]litout [-]pass8 [-]raw [-]sane [-]cooked [-]nopost fill nl0 nl1 cr0 cr1 cr2 cr3 tab0 tab1 tab2 tab3 bs0 bs1 vt0 vt1 ff0 ff1 cs5 cs6 cs7 cs8 nul-fill del-fill -tabs And systems using _t_e_r_m_i_o_s may use the following options: [-]ignbrk [-]brkint [-]ignpar [-]parmrk [-]inpck [-]istrip [-]inlcr [-]igncr [-]icrnl [-]iuclc [-]ixon [-]ixany [-]ixoff [-]imaxbel [-]pass8 [-]opost [-]olcuc [-]onlcr [-]ocrnl [-]onocr [-]onlret [-]ofill [-]ofdel [-]tabs nl0 nl1 cr0 cr1 cr2 cr3 tab0 tab1 tab2 tab3 bs0 bs1 vt0 vt1 ff0 ff1 cs5 cs6 cs7 cs8 [-]cstopb [-]cread [-]parenb [-]parodd [-]hupcl [-]clocal [-]crtscts [-]evenp [-]parity [-]oddp [-]pass8 [-]isig [-]icanon [-]xcase [-]echo [-]echoe [-]echok [-]echonl [-]noflsh [-]tostop [-]iexten [-]echoctl [-]ctlecho [-]echoprt [-]prterase [-]echoke [-]crtkill [-]flusho [-]pendin The ffcc , ffss , xxcc , and xxss printcap entries are obsolete, and if present with non-zero values will abort print job processing. LPRng LPRng-3.5.3 15 PRINTCAP(5) PRINTCAP(5) IINNIITTIIAALLIIZZAATTIIOONN Many printers require an initialization string to be sent to them in order to configure their operation. The leader (ld) and trailer (tr) strings are sent at the start and end of job processing. These strings are interpreted using the C language conventions for character representa­ tion: \nnn is replaced with a character with the value nnn, \n with a new line, \r with a carriage return, and so forth. AALLLL PPRRIINNTTEERRSS The LPRng software has the capability to use a remote database for obtaining printcap and other information. One of the difficulties arises when a list of all printers available is needed. By convention, the special printer name aallll is reserved for this information; the aallll field is a list of printers separated by spaces or punctuation. For example: #all printers all:all=lp1,lp2,lp3,lp4 ®.fi AACCCCOOUUNNTTIINNGG Accounting is done by writing information to an accounting file, filter, or remote connection specified by the af printcap entry. If af has the form |filter, a filter is started and all accounting information is passed through the filter. The filter is passed the options specified by the filter_options configuration variable. The special form |-$ filter will suppress adding options. If af has the form host%port, then a tcp socket is opened to the specified port on the remote host and all accounting information is sent on the socket. If the achk flag is set, then after the string specified by the as field has been sent a reply of the form ACCEPT will be expected, otherwise the job will not be printed. The printcap as and ae specify the format of the account­ ing information sent at the start and end of job printing respectively, or filters to be used to generate and/or report accounting information. If as and ae specify fil­ ters, the filters are opened with STDIN set to /dev/null and STDOUT set to the device, and are passed the command line options specified by the filter_options configuration variable (see lpd.conf(5)). The special form |-$ filter will suppress adding options. The as filter should exit with 0 (JSUCC) status if successful and the job can be printed, nonzero status JABORT for abnormal queue termina­ tion, JREMOVE if the job cannot be printed, and JRETRY if the job should be retried. The filter's STDERR is set to the printer error logging file. LPRng LPRng-3.5.3 16 PRINTCAP(5) PRINTCAP(5) BBOOUUNNCCEE QQUUEEUUEESS AANNDD PPRRIINNTT FFOORRMMAATTSS Bounce queues are designed to allow users to have their files preprocessed by a set of filters before being sent to the final destination. If a queue is being used as a bounce queue, then the lp printcap entry mmuusstt be set to the name of the printer on the server, and the bq entry mmuusstt be the destination after filtering. This will cause all jobs to be sent to the bounce queue, rather than directly to the final destination. For example, pr:lp=pr@host:bq=destpr@desthost. The filters used by the bounce queue are those that would normally be used by the LPD server for printing a job. For example, the :if: entry would specify the filter for the f format. Each job file is processed individually. The lpr -p option will cause the LPD server to process job files by the program specified by the pr printcap entry (default is /bin/pr) and then pass through the if filter. However, if a bounce queue is used the format of the out­ put data may be changed. To accomodate this action, the translate_format value can be used to reconfigure the for­ mat. The value has the form SdSdSd..., where S is the original format and d is the final format. This is simi­ lar to the format used by the UNIX tr(1) utility. For example, the value pfml would convert format specifica­ tions p to f and m to l, but only in the job information sent to a remote destination. Note that the original for­ mat would still be supplied to any filters, and that the p filter would need to provide any options and/or values to be used to do formatting. The llpprr__bboouunnccee printcap flag can be used to cause LPR to do bounce queue filtering, rather than the server. This should be used with caution, as missing filters can cause unexpected behaviour. KKEERRBBEERROOSS,, PPGGPP,, AANNDD OOTTHHEERR AAUUTTHHEENNTTIICCAATTIIOONN MMEETTHHOODDSS LPRng supports built in kerberos authentication. To enable this, the LPD protocol has been extended to provide a way to transfer authenticated and/or encrypted jobs and commands. The details are covered in other LPRng documen­ tation. FFIILLEESS The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values. /etc/lpd.conf LPRng configuration file /etc/printcap printer description file /etc/lpd.perms printer permissions /var/spool/printer* spool directories /var/spool/printer*/printer lock file for queue control /var/spool/printer*/control.printer queue control /var/spool/printer*/active.printer active job LPRng LPRng-3.5.3 17 PRINTCAP(5) PRINTCAP(5) /var/spool/printer*/log.printer log file SSEEEE AALLSSOO lpd.conf(5), lpc(8), lpd(8), lpr(1), lpq(1), lprm(1), printcap(5), lpd.perms(5), pr(1). DDIIAAGGNNOOSSTTIICCSS Most of the diagnostics are self explanatory. If you are puzzled over the exact cause of failure, set the debugging level on (-D5) and run again. The debugging information will help you to pinpoint the exact cause of failure. HHIISSTTOORRYY LPRng is a enhanced printer spooler system with function­ ality similar to the Berkeley LPR software. In 1988 Patrick Powell released the PLP (Public Line Printer) software, which went through several evolutions. Justin Mason (jmason@iona.ie) generated PLP4.0 from several older releases of PLP. In 1992 Patrick Powell release LPRng, a completely redesigned and newly written version of the software. The LPRng mailing list is plp@iona.ie; subscribe by send­ ing mail to plp-request@iona.ie with the word subscribe in the body. The software is available from ftp://iona.ie/pub/LPRng. LPRng is distributed under the GNU software license for non-commercial use, the Artistic License for limited com­ mercial use. Commerical support and licensing is avail­ able through Patrick Powell . LPRng LPRng-3.5.3 18