LPR(1) LPR(1) NNAAMMEE lpr - off line print SSYYNNOOPPSSIISS llpprr [ --AA ] [ --BB ] [ --bb,,ll ] [ --CC _c_l_a_s_s ] [ --DD _d_e_b_u_g_o_p_t ] [ --FF _f_i_l_t_e_r_f_o_r_m_a_t ] [ --GG ] [ --hh ] [ --ii _i_n_d_e_n_t_c_o_l_s ] [ --kk ] [ --JJ _j_o_b ] [ --KK,,## _c_o_p_i_e_s ] [ --mm _m_a_i_l_T_o ] [ --PP _p_r_i_n_t_e_r ] [ --rr ] [ --RR _r_e_m_o_t_e_A_c_c_o_u_n_t ] [ --ss ] [ --TT _t_i_t_l_e ] [ --UU _u_s_e_r ] [ --VV ] [ --ww _w_i_d_t_h ] [ --XX _u_s_e_r_f_i_l_e ] [ --YY ] [ --ZZ _o_p_t_i_o_n_s ] [ --11,,22,,33,,44 _f_o_n_t ] [ ---- ] [ _f_i_l_e_n_a_m_e ... ] DDEESSCCRRIIPPTTIIOONN LLpprr uses a spooling daemon to print the named files when facilities become available. If no names appear, the standard input is assumed. OOPPTTIIOONNSS --AA The authentication type is set by the value of the AUTH environment variable. --BB Do filtering of job files by the filters specified by the printcap. Combine the output of the filtering operation into a single job file and then send the single file to the lpd print spooler. --bb,, --ll either of these flags specifies a binary or literal file, and no (or minimial) processing is to be done by the print spooling system. Printed using the _f format filter (:if=... or :filter=...). --CC _c_l_a_s_s Specify the job classification for use on the burst page and to set the priority. Priorities range from A (lowest) to Z (highest); the default priority is A. For example, lpr -C B foo.c sets the priority/class to B and the file foo.c is printed. --DD _d_e_b_u_g_o_p_t_i_o_n_s Debugging is controlled using the --DD option. This accepts a comma-separated list of debugging settings. These settings take one of two forms: ffaacciilliittyy_=_v_a_l_u_e_, or vvaalluuee to set an overall default value. --FF _f_i_l_t_e_r_f_o_r_m_a_t Filter or format specification. By default, input is assumed to a standard text file and the _f format is used; the output device is assmed to be a simple line printer. Other formats available are listed below. Not all formats may be available on all printers; see pprriinnttccaapp(5) for details. Formats are single lower case letters; the following are the valid arguments for --FF together with the assumed type of data. For compatibility with previous versions of llpprr, the for­ mat types can be used as options themselves (i.e. by omitting the FF) except where noted below, a warning may be issued in such cases. --GG Similar to the --BB option, but only processes individ­ ual files. --hh No banner or header for this job. --ii _i_n_d_e_n_t_c_o_l_s Indent input by indentcols. Note that this option is not supported on all printers. --JJ _j_o_b_n_a_m_e Specify the job name to print on the burst page; defaults to the name of files in the job or _(_S_T_D_I_N_) if input is from a pipe. --KK_c_o_p_i_e_s, --##_c_o_p_i_e_s Specify the number of copies of each file to be printed. You may or may not get the requested number of copies depending on the intelligence of the remote printing system. --kk llpprr normally creates a temporary file for the input read from stdin before sending it to the remote printer. The --kk (kut-through) option will simply copy from STDIN to the destination print spooling system. If you kill the job in the middle of cre­ ation then the partly transferred file will get printed. This option may not work with very large jobs, non-LPRng spoolers, or when you have encryption or authentication enabled. --mm _m_a_i_l_T_o Send mail upon unsuccessful completion to user _m_a_i_l_T_o. The mailTo value has been used to do such things as specify email (user@host), paging (page:user@host), both (user@host,page:user@host) and all sorts of other notifier information. See the LPRng HOWTO for details on how this is implemented. --PP _p_r_i_n_t_e_r By default, the destination printer is taken from the command line _-_P _p_r_i_n_t_e_r value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configura­ tion file, and then the compile time default. --RR _r_e_m_o_t_e_A_c_c_o_u_n_t Specify accounting information to be used by a remote system that prints your output. This parameter can be used to specify a billing code to be charged for the printing. --rr The DREADED RREEMMOOVVEE AAFFTTEERR PPRRIINNTTIINNGG option. Beware, for _l_p_r will delete the files after spooling them. Present by demand from users for compatibility with other Berkeley lpr implementation, but really should NOT be present. --TT _t_i_t_l_e Specify the title used by pprr(1); defaults to the file name. --UU _u_s_e_r_n_a_m_e The --UU option is used to specify a user name for the job. This is available only to ROOT or users listed in the _a_l_l_o_w___u_s_e_r___s_e_t_t_i_n_g configuration option. This is obviously a security loophole, but it is present to allow systems such as SAMBA to submit jobs on behalf of users. See AAuutthheennttiiccaatteedd TTrraannssffeerrss below. --VV Verbose mode. Additional -V flags increase verbosity. Use debug flags for extreme verbosity. --ww _w_i_d_t_h Specify the page width for printing the job. --XX _p_a_t_h User specified filter for job files. Processing is done on the client host. --YY Make a direct connection to the printer device and do not spool. --ZZ _o_p_t_i_o_n_s Pass the specified options to the print spooler. Used when additional or specialized information must be provided to the spooler. OOBBSSOOLLEETTEE OOPPTTIIOONNSS LLoowweerr ccaassee --cc,, --dd,, --gg,, --nn,, --tt,, --vv Used to indicate: --cc is data produced by cciiffpplloott(l), --dd is tteexx(l) (DVI format from Stanford), --gg is stan­ dard plot data as produced by the pplloott(3X) routines, --nn and --tt is output from (device independent) ttrrooffff, --vv a raster image for devices like the Benson Varian. TThheessee aarree oobbssoolleettee.. These are retained for histori­ cal compatibility, but most of their functionality has been replaced by the abilities of the printer support system to determine the file type and do the appropriate conversions. OOBBSSOOLLEETTEE OOPPTTIIOONN --pp TThhiiss iiss oobbssoolleettee.. This option is retained for his­ torical compatibility, but this functionality should be implemented on the client system before sending the job to the printer. Use pprr(1) to format the files, then print using _f format. This may not be supported on the print system. OOBBSSOOLLEETTEE --ss This flag is included for compatibility with other versions of llpprr. In these versions it will create a symbolic link to the files to be printed. LLpprr now sends files directly to the server and it is irrele­ vant. OOBBSSOOLLEETTEE OOPPTTIIOONNSS --11,,22,,33,,44_f_o_n_t_n_a_m_e Specify a font to be mounted on font position _i for TROFF printing (Obsolete). FFIILLEENNAAMMEESS By default, if no filenames are specified llpprr will read stdin and print it. AAUUTTHHEENNTTIICCAATTEEDD TTRRAANNSSFFEERRSS The original LPR network protocol defined in RFC1179 did not provide for user to server authentication. This is now supported by LPRng. See the LPRng support documenta­ tion for details on its operation and support. CCOOMMPPAATTIIBBIILLIITTYY The LPRng version of llpprr attempts to be functionaly com­ patible with common implementations of llpprr. However, there are some commands and functionality that are delib­ erately missing. --ss Symbolic Links (Berkeley LPR) This option specified that a symbolic link to the original data file rather than a copy of the data file was to be used when spooling jobs. This opens up a variety of security problems, as well as being ineffective when printing to a remote host. TTHHEE --BB,, --YY,, --XX ffiilltteerr UULLTTRRAA--LLIIGGHHTTWWEEIIGGHHTT PPRRIINNTTIINNGG OOPPTTIIOONNSS LPRng supports ultra-lightweight printing by eliminating the need for a print spooler. This is quite dangerous, but makes the lpr client very lightweight. The --YY command line option and the ::ddiirreecctt printcap option enables lpr to connect directly to a specified port or use a program to send a job. This filter also enables client side filter­ ing, so if there are any filters specified in the print­ cap entry they will be used. For example: lpr -Y -Phost%port file1 file2 ... approximately equivalent to: for i in file1 file2 ...; do ${filter} <$i; # ${filter} is filter from printcap done >host%port (TCP/IP connection) lpr -Y -Phost%port -X userfilter file1 file2 ... approximately equivalent to: for i in file1 file2 ...; do userfilter <$i; done >host%port (TCP/IP connection) Summary: -P host%port > TCP/IP connection to host%port -P /dev/lp > /dev/lp -P '|/program' | /program SPECIAL CASE lpr -Y -Ppr@host -X userfilter file1 file2 ... approximately equivalent to: for i in file1 file2 ...; do userfilter <$i >temp.$i; done lpr -Ppr@host temp.file1 temp.file2 The --BB option or the :lpr_bounce is used to filter and make a single file out of a set of print files and then forward them. lpr -B -Ppr@host approximately equivalent to: lpr -Y -P/tmp/tempfile file1 file2 ... lpr -Ppr@host /tmp/tempfile You can also use a printcap entry and the ::ddiirreecctt options. Printcap: lp:direct:lp=h14%9100:remote_support=R lpr -Plp file1 file2 Same as: lpr -Plp -Y -Ph14%9100 file1 file2 The ::rreemmoottee__ssuuppppoorrtt option is used to prevent the llppqq and llppcc program from attempting to send jobs to the device. EENNVVIIRROONNMMEENNTT By default, the destination printer is taken from the com­ mand line _-_P _p_r_i_n_t_e_r value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configuration file, and then the compile time default. EEXXIITT SSTTAATTUUSS The following exit values are returned: zzeerroo ((00)) Successful completion. nnoonn--zzeerroo ((!!==00)) An error occurred. PPRRIINNTTCCAAPP IINNFFOORRMMAATTIIOONN The printer names and other information is obtained by using a printcap file or some other database. The ${HOME}/.printcap file can be used to specify user level options and configuration information. See printcap(5) for more information. 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/lprng/lpd.conf LPRng configuration file ${HOME}/.printcap user printer description file /etc/lprng/printcap printer description file /etc/lprng/lpd.perms permissions /var/run/lprng/lpd lock file for queue control /var/spool/lpd spool directories /var/spool/lpd/QUEUE/control queue control /var/spool/lpd/QUEUE/log trace or debug log file /var/spool/lpd/QUEUE/acct accounting file /var/spool/lpd/QUEUE/status status file SSEEEE AALLSSOO llppdd..ccoonnff(5), llppcc(8), llppdd(8), cchheecckkppcc(8), llppqq(1), llpprrmm(1), cchheecckkppcc(8), pprriinnttccaapp(5), llppdd..ppeerrmmss(5), pprr(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. The LPRng mailing list is lprng@lprng.com; subscribe by sending mail to lprng-request@lprng.com with the word subscribe in the body. The software is available from ftp://ftp.lprng.com/pub/LPRng. AAUUTTHHOORR Patrick Powell . LPRng LPRng-3.9.0 LPR(1)