2 .\" Copyright 1989 AT&T Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LPADMIN 1M "May 24, 2006"
8 lpadmin \- configure the LP print service
12 \fBlpadmin\fR \fB-p\fR \fIprinter\fR {\fIoptions\fR}
17 \fBlpadmin\fR \fB-x\fR \fIdest\fR
22 \fBlpadmin\fR \fB-d\fR [\fIdest\fR]
27 \fBlpadmin\fR \fB-S\fR \fIprint-wheel\fR \fB-T\fR [\fB-A\fR \fIalert-type\fR] [\fB-W\fR \fIminutes\fR]
28 [\fB-Q\fR \fIrequests\fR]
34 \fBlpadmin\fR configures the LP print service by defining printers and devices.
35 It is used to add and change printers, to remove printers from service, to set
36 or change the system default destination, to define alerts for printer faults,
37 and to mount print wheels.
41 The \fBlpadmin\fR command has options for:
46 Adding or changing a printer
52 Removing a printer destination
58 Setting or changing the system default destination
64 Setting an alert for a print wheel
68 The options for each of the above categories are specified in the following
72 Several options support the use of lists. A list might contain, for example,
73 user names, printers, printer forms, or content types. A list of multiple items
74 can have the form of either comma-separated names or have the entire list
75 enclosed by double quotes with a space between each name. For example, both
76 lists below are acceptable:
85 .SS "Adding or Changing a Printer"
88 The first form of the \fBlpadmin\fR command (\fBlpadmin\fR \fB-p\fR
89 \fIprinter\fR {\fIoptions\fR}) configures a new printer or changes the
90 configuration of an existing printer. It also starts the print scheduler.
93 When creating a new printer, one of three options (\fB-v\fR, \fB-U\fR, or
94 \fB-s\fR) must be supplied. In addition, only one of the following can be
95 supplied: \fB-e\fR, \fB-i\fR, or \fB-m\fR; if none of these three options is
96 supplied, the model standard is used. The \fB-h\fR and \fB-l\fR options are
97 mutually exclusive. Printer and class names must be no longer than 14
98 characters and must consist entirely of the characters \fBA\fR-\fBZ\fR,
99 \fBa\fR-\fBz\fR, \fB0\fR-\fB9\fR, dash (\fB-\fR) and underscore (\fB_\fR). If
100 \fB-s\fR is specified, the following options are invalid: \fB-A\fR, \fB-e\fR,
101 \fB-F\fR, \fB-h\fR, \fB-i\fR, \fB-l\fR, \fB-M\fR, \fB-m\fR, \fB-o\fR, \fB-U\fR,
102 \fB-v\fR, and \fB-W\fR.
105 The following options can appear in any order.
109 \fB\fB-A\fR \fIalert-type\fR [\fB-W\fR \fIminutes\fR]\fR
113 The \fB-A\fR option is used to define an alert that informs the administrator
114 when a printer fault is detected, and periodically thereafter, until the
115 printer fault is cleared by the administrator. The \fIalert-types\fR are:
122 Send the alert message using mail (see \fBmail\fR(1)) to the administrator.
131 Write the message to the terminal on which the administrator is logged in. If
132 the administrator is logged in on several terminals, one is chosen arbitrarily.
141 Do not send messages for the current condition. An administrator can use this
142 option to temporarily stop receiving further messages about a known problem.
143 Once the fault has been cleared and printing resumes, messages are sent again
144 when another fault occurs with the printer.
150 \fB\fBshowfault\fR\fR
153 Attempt to execute a fault handler on each system that has a print job in the
154 queue. The fault handler is \fB/etc/lp/alerts/printer\fR. It is invoked with
155 three parameters: \fIprinter_name\fR, \fBdate\fR, \fIfile_name\fR. The
156 \fIfile_name\fR is the name of a file containing the fault message.
165 Do not send messages; any existing alert definition for the printer is removed.
166 No alert is sent when the printer faults until a different alert-type (except
167 \fBquiet\fR) is used.
173 \fB\fIshell-command\fR\fR
176 Run the \fIshell-command\fR each time the alert needs to be sent. The shell
177 command should expect the message in standard input. If there are blank spaces
178 embedded in the command, enclose the command in quotes. Notice that the
179 \fBmail\fR and \fBwrite\fR values for this option are equivalent to the values
180 \fBmail\fR \fIuser-name\fR and \fBwrite\fR \fIuser-name\fR respectively, where
181 \fIuser-name\fR is the current name for the administrator. This is the login
182 name of the person submitting this command unless he or she has used the
183 \fBsu\fR command to change to another user ID. If the \fBsu\fR command has been
184 used to change the user ID, then the \fIuser-name\fR for the new ID is used.
193 Display the type of the alert for the printer fault. No change is made to the
197 When a fault occurs, the printing subsystem displays a message indicating that
198 printing for a specified printer has stopped and the reason for the stoppage.
199 The message also indicates that printing will restart in a few minutes and that
200 you can enter an \fBenable\fR command if you want to restart sooner than that.
202 Following a fault that occurs in the middle of a print job, the job is
203 reprinted from the beginning. An exception to this occurs when you enter a
204 command, such as the one shown below, that changes the page list to be printed.
208 % \fB\fR\fBlp\fR\fB \fR\fB-i\fR\fB \fIrequest-id\fR \fR\fB-P\fR\fB ...\fR
213 For a given print request, the presence of multiple reasons for failure
214 indicate multiple attempts at printing.
216 The \fBLP\fR print service can detect printer faults only through an adequate
217 fast filter and only when the standard interface program or a suitable
218 customized interface program is used. Furthermore, the level of recovery after
219 a fault depends on the capabilities of the filter.
221 If, instead of a single printer, the keyword \fBall\fR is displayed in an
222 alert, the alert applies to all printers.
224 If the \fB-W\fR option is not used to arrange fault alerting for \fIprinter\fR,
225 the default procedure is to mail one message to the administrator of
226 \fIprinter\fR per fault. This is equivalent to specifying \fB-W\fR \fBonce\fR
227 or \fB-W\fR \fB0\fR. If \fIminutes\fR is a number greater than zero, an alert
228 is sent at intervals specified by \fIminutes\fR.
234 \fB\fB-c\fR \fIclass\fR\fR
238 Insert \fIprinter\fR into the specified \fIclass\fR. \fIclass\fR is created if
239 it does not already exist. This option requires the \fB-U\fR \fIdial-info\fR or
240 \fB-v\fR \fIdevice\fR options.
246 \fB\fB-D\fR \fIcomment\fR\fR
250 Save this \fIcomment\fR for display whenever a user asks for a full description
251 of \fIprinter\fR (see \fBlpstat\fR(1)). The LP print service does not interpret
258 \fB\fB-e\fR \fIprinter\fR\fR
262 Copy the interface program of an existing \fIprinter\fR to be the interface
263 program for \fIprinter\fR. (Options \fB-i\fR and \fB-m\fR must not be specified
270 \fB\fB-f\fR \fBallow\fR:\fIform-list\fR\fR
274 \fB\fB-f\fR \fBdeny\fR:\fIform-list\fR\fR
278 Allow or deny the forms in \fIform-list\fR to be printed on \fIprinter\fR. By
279 default no forms are allowed on a new printer.
281 For each printer, the \fBLP\fR print service keeps two lists of forms: an
282 ``allow-list'' of forms that can be used with the printer, and a ``deny-list''
283 of forms that cannot be used with the printer. With the \fB\fR\fB-f\fR\fB
284 allow\fR option, the forms listed are added to the allow-list and removed from
285 the deny-list. With the \fB-f\fR \fBdeny\fR option, the forms listed are added
286 to the deny-list and removed from the allow-list.
288 If the allow-list is not empty, only the forms in the list can be used on the
289 printer, regardless of the contents of the deny-list. If the allow-list is
290 empty, but the deny-list is not, the forms in the deny-list cannot be used with
291 the printer. All forms can be excluded from a printer by specifying \fB-f\fR
292 \fBdeny:all\fR. All forms can be used on a printer (provided the printer can
293 handle all the characteristics of each form) by specifying \fB-f\fR
296 The \fBLP\fR print service uses this information as a set of guidelines for
297 determining where a form can be mounted. Administrators, however, are not
298 restricted from mounting a form on any printer. If mounting a form on a
299 particular printer is in disagreement with the information in the allow-list or
300 deny-list, the administrator is warned but the mount is accepted. Nonetheless,
301 if a user attempts to issue a print or change request for a form and printer
302 combination that is in disagreement with the information, the request is
303 accepted only if the form is currently mounted on the printer. If the form is
304 later unmounted before the request can print, the request is canceled and the
305 user is notified by mail.
307 If the administrator tries to specify a form as acceptable for use on a printer
308 that does not have the capabilities needed by the form, the command is
311 Notice the other use of \fB-f\fR, with the \fB-M\fR option, below.
313 The \fB-T\fR option must be invoked first with \fBlpadmin\fR to identify the
314 printer type before the \fB-f\fR option can be used.
320 \fB\fB-F\fR \fIfault-recovery\fR\fR
324 This option specifies the recovery to be used for any print request that is
325 stopped because of a printer fault, according to the value of
326 \fIfault-recovery\fR:
333 Continue printing on the top of the page where printing stopped. This requires
334 a filter to wait for the fault to clear before automatically continuing.
340 \fB\fBbeginning\fR\fR
343 Start printing the request again from the beginning.
352 Disable printing on \fIprinter\fR and wait for the administrator or a user to
353 enable printing again.
355 During the wait, the administrator or the user who submitted the stopped print
356 request can issue a change request that specifies where printing should resume.
357 (See the \fB-i\fR option of the \fBlp\fR command.) If no change request is made
358 before printing is enabled, printing resumes at the top of the page where
359 stopped, if the filter allows; otherwise, the request is printed from the
372 Indicate that the device associated with the printer is hardwired. If neither
373 of the mutually exclusive options, \fB-h\fR and \fB-l\fR, is specified,
380 \fB\fB-i\fR \fIinterface\fR\fR
384 Establish a new interface program for \fIprinter\fR. \fIinterface\fR is the
385 pathname of the new program. (The \fB-e\fR and \fB-m\fR options must not be
386 specified with this option.)
392 \fB\fB-I\fR \fIcontent-type-list\fR\fR
396 Allow \fIprinter\fR to handle print requests with the content types listed in a
397 \fIcontent-type-list\fR.
399 The type \fBsimple\fR is recognized as the default content type for files in
400 the UNIX system. A \fBsimple\fR type of file is a data stream containing only
401 printable \fBASCII\fR characters and the following control characters:
408 Control Char Octal Value Meaning
409 BACKSPACE 10 Move back one char, except
411 TAB 11 Move to next tab stop
412 LINEFEED 12 Move to beginning of
414 FORMFEED 14 Move to beginning of
416 RETURN 15 Move to beginning of
420 To prevent the print service from considering \fBsimple\fR a valid type for the
421 printer, specify either an explicit value (such as the printer type) in the
422 \fIcontent-type-list\fR, or an empty list. If you do want \fBsimple\fR included
423 along with other types, you must include \fBsimple\fR in the
424 \fIcontent-type-list\fR.
426 In addition to content types defined by the print administrator, the type
427 \fBPostScript\fR is recognized and supported by the Solaris print subsystem.
428 This includes filters to support \fBPostScript\fR as the printer content type.
430 The type \fBany\fR is recognized as a special content type for files. When
431 declared as the input type for a printer, it signals the print sub-system not
432 to do any filtering on the file before sending it to the printer.
434 Except for \fBsimple\fR and \fBany\fR, each \fIcontent-type\fR name is
435 determined by the administrator. If the printer type is specified by the
436 \fB-T\fR option, then the printer type is implicitly considered to be also a
447 Indicate that the device associated with \fIprinter\fR is a login terminal. The
448 LP scheduler (\fBlpsched\fR) disables all login terminals automatically each
449 time it is started. (The \fB-h\fR option must not be specified with this
456 \fB\fB-m\fR \fImodel\fR\fR
460 Select \fImodel\fR interface program, provided with the \fBLP\fR print service,
461 for the printer. (Options \fB-e\fR and \fB-i\fR must not be specified with this
468 \fB\fB-M\fR \fB-f\fR \fIform-name\fR [\fB-a\fR [\fB-o\fR \fBfilebreak\fR]]
469 [\fB-t\fR \fItray-number\fR]]\fR
473 Mount the form \fIform-name\fR on \fIprinter\fR. Print requests that need the
474 pre-printed form \fIform-name\fR is printed on \fIprinter\fR. If more than one
475 printer has the form mounted and the user has specified \fBany\fR (with the
476 \fB-d\fR option of the \fBlp\fR command) as the printer destination, then the
477 print request is printed on the one printer that also meets the other needs of
480 The page length and width, and character and line pitches needed by the form
481 are compared with those allowed for the printer, by checking the capabilities
482 in the \fBterminfo\fR database for the type of printer. If the form requires
483 attributes that are not available with the printer, the administrator is warned
484 but the mount is accepted. If the form lists a print wheel as mandatory, but
485 the print wheel mounted on the printer is different, the administrator is also
486 warned but the mount is accepted.
488 If the \fB-a\fR option is given, an alignment pattern is printed, preceded by
489 the same initialization of the physical printer that precedes a normal print
490 request, with one exception: no banner page is printed. Printing is assumed to
491 start at the top of the first page of the form. After the pattern is printed,
492 the administrator can adjust the mounted form in the printer and press return
493 for another alignment pattern (no initialization this time), and can continue
494 printing as many alignment patterns as desired. The administrator can quit the
495 printing of alignment patterns by typing \fBq\fR.
497 If the \fB-o\fR \fBfilebreak\fR option is given, a formfeed is inserted between
498 each copy of the alignment pattern. By default, the alignment pattern is
499 assumed to correctly fill a form, so no formfeed is added.
501 If the \fB-t\fR \fItray-number\fR option is specified, printer tray
502 \fItray-number\fR is used.
504 A form is ``unmounted'' either by mounting a new form in its place or by using
505 the \fB-f\fR \fBnone\fR option. By default, a new printer has no form mounted.
507 Notice the other use of \fB-f\fR without the \fB-M\fR option above.
513 \fB\fB-M\fR \fB-S\fR \fIprint-wheel\fR\fR
517 Mount the \fIprint-wheel\fR on \fIprinter\fR. Print requests that need the
518 \fIprint-wheel\fR are printed on \fIprinter\fR. If more than one printer has
519 \fIprint-wheel\fR mounted and the user has specified \fBany\fR (with the
520 \fB-d\fR option of the \fBlp\fR command) as the printer destination, then the
521 print request is printed on the one printer that also meets the other needs of
524 If the \fIprint-wheel\fR is not listed as acceptable for the printer, the
525 administrator is warned but the mount is accepted. If the printer does not take
526 print wheels, the command is rejected.
528 A print wheel is ``unmounted'' either by mounting a new print wheel in its
529 place or by using the option \fB-S\fR \fBnone\fR. By default, a new printer has
530 no print wheel mounted.
532 Notice the other uses of the \fB-S\fR option without the \fB-M\fR option
539 \fB\fB-n\fR \fIppdfilename\fR\fR
543 Specify a \fBPPD\fR file for creating and modifying printer queues.
544 \fIppdfilename\fR is the full path and file name to the \fBPPD\fR file. Used in
545 conjunction with the \fB-p\fR, \fB-d\fR, \fB-x\fR, or \fB-S\fR options.
551 \fB\fB-o\fR \fIoption\fR\fR
555 The \fB-o\fR option defines default printer configuration values given to an
556 interface program. The default can be explicitly overwritten for individual
557 requests by the user (see \fBlp\fR(1)), or taken from a preprinted form
558 description (see \fBlpforms\fR(1M) and \fBlp\fR(1)).
560 There are several options which are predefined by the system. In addition, any
561 number of key-value pairs can be defined. See the section "Predefined Options
562 Used with the \fB-o\fR Option", below.
568 \fB\fB-P\fR \fIpaper-name\fR\fR
572 Specify a paper type list that the printer supports.
578 \fB\fB-r\fR \fIclass\fR\fR
582 Remove \fIprinter\fR from the specified \fIclass\fR. If \fIprinter\fR is the
583 last member of \fIclass\fR, then \fIclass\fR is removed.
589 \fB\fB-S\fR \fIlist\fR\fR
593 Allow either the print wheels or aliases for character sets named in \fIlist\fR
594 to be used on the printer.
596 If the printer is a type that takes print wheels, then \fIlist\fR is a comma or
597 space separated list of print wheel names. These are the only print wheels
598 considered mountable on the printer. (You can always force a different print
599 wheel to be mounted.) Until the option is used to specify a list, no print
600 wheels are considered mountable on the printer, and print requests that ask for
601 a particular print wheel with this printer are rejected.
603 If the printer is a type that has selectable character sets, then \fIlist\fR is
604 a list of character set name ``mappings'' or aliases. Each ``mapping'' is of
605 the form \fIknown-name=alias\fR The \fIknown-name\fR is a character set number
606 preceded by \fBcs\fR (such as \fBcs3\fR for character set three) or a character
607 set name from the \fBterminfo\fR database entry \fBcsnm\fR. See
608 \fBterminfo\fR(4). If this option is not used to specify a list, only the names
609 already known from the \fBterminfo\fR database or numbers with a prefix of
610 \fBcs\fR is acceptable for the printer. If \fIlist\fR is the word \fBnone\fR,
611 any existing print wheel lists or character set aliases are removed.
613 Notice the other uses of the \fB-S\fR with the \fB-M\fR option described above.
615 The \fB-T\fR option must be invoked first with \fBlpadmin\fR to identify the
616 printer type before the \fB-S\fR option can be used.
622 \fB\fB-s\fR \fIsystem-name\fR\fR
626 The \fB-s\fR option can be used for both remote or local printers. For remote
631 \fB\fB-s\fR \fIsystem-name\fR[\fB!\fR\fIprinter-name\fR] (UUCP format)\fR
635 \fB\fB-s\fR \fIprinter-name\fR\fB@\fR\fIsystem-name\fR (RCMD format)\fR
639 Make a remote printer (one that must be accessed through another system)
640 accessible to users on your system. \fIsystem-name\fR is the name of the remote
641 system on which the remote printer is located it. \fIprinter-name\fR is the
642 name used on the remote system for that printer. For example, if you want to
643 access \fIprinter1\fR on \fIsystem1\fR and you want it called \fIprinter2\fR on
648 \fB-p\fR \fIprinter2\fR \fB-s\fR \fIsystem1\fR\fB!\fR\fIprinter1\fR
656 \fB-p\fR \fIprinter2\fR \fB-s\fR \fIprinter1\fR\fB@\fR\fIsystem1\fR
666 \fB\fB-s\fR \fIscheme\fR\fB://\fR\fIend-point\fR (URI format)\fR
670 Make a remote printer (one that must be accessed through another system)
671 accessible to users on your system. The supported schemes include \fBlpd\fR and
672 \fBipp\fR. Specify URI's using the \fBlpd\fR format as follows:
676 \fBlpd://\fR\fIserver\fR/\fIprinters\fR/\fIqueue\fR\fB[#Solaris]\fR
681 URI's using the \fBipp\fR format are defined by the remote print server. They
682 are generally of the format:
686 \fBipp://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIqueue\fR
691 In either case, \fIserver\fR specifies the hostname or IP address of the remote
692 print server, \fIqueue\fR specifies the name of the print queue on the remote
693 print server, and the optional \fB#Solaris\fRspecifies that the remote print
694 server is a Solaris server when \fBlpd\fR URI format is being used.
700 \fB-p\fR \fIprinter\fR \fB-s\fR \fBlpd://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIqueue\fR\fB#Solaris\fR
701 \fB-p\fR \fIprinter\fR \fB-s\fR \fBipp://\fR\fIserver\fR\fB/\fR\fIprinters\fR\fB/\fR\fIqueue\fR
712 \fB\fB-s\fR "\fBlocalhost\fR"\fR
715 Use \fBlocalhost\fR for the \fIsystem-name\fR to be used by the print service.
716 In an environment where the nodename is variable, print queues are invalidated
717 when the nodename changes. Using \fBlocalhost\fR as the \fIsystem-name\fR
718 allows print queues to be maintained across changing nodenames. The
719 \fIsystem-name\fR, as used by the print service, is only set to \fBlocalhost\fR
720 when explicitely set with this option; by default, \fBlpadmin\fR sets
721 \fIsystem-name\fR to \fInodename\fR. For example, if you want to configure a
722 new printer on the local system, and want it called \fIprinter3\fR:
724 \fB-p\fR \fIprinter3\fR \fB-s\fR \fIlocalhost\fR \fB-v\fR \fIdevice\fR
726 This option should never be used when creating name service maps.
734 \fB\fB-T\fR \fIprinter-type-list\fR\fR
738 Identify the printer as being of one or more \fIprinter-type\fRs. Each
739 \fIprinter-type\fR is used to extract data from the \fBterminfo\fR database;
740 this information is used to initialize the printer before printing each user's
741 request. Some filters might also use a \fIprinter-type\fR to convert content
742 for the printer. If this option is not used, the default \fIprinter-type\fR is
743 \fBunknown\fR. No information is extracted from \fBterminfo\fR so each user
744 request is printed without first initializing the printer. Also, this option
745 must be used if the following are to work: \fB\fR\fB-o\fR\fB cpi\fR,
746 \fB\fR\fB-o\fR\fB lpi\fR, \fB\fR\fB-o\fR width, and \fB\fR\fB-o\fR\fB length\fR
747 options of the \fBlpadmin\fR and \fBlp\fR commands, and the \fB-S\fR and
748 \fB-f\fR options of the \fBlpadmin\fR command.
750 If the \fIprinter-type-list\fR contains more than one type, then the
751 \fIcontent-type-list\fR of the \fB-I\fR option must either be specified as
752 \fBsimple\fR, as empty (\fB\fR\fB-I\fR\fB ""\fR), or not specified at all.
758 \fB\fB\fR\fB-t\fR\fInumber-of-trays\fR\fR
762 Specify the number of trays when creating the printer.
768 \fB\fB-u\fR \fBallow:\fR\fIlogin-ID-list\fR\fR
772 \fB\fB-u\fR \fBdeny:\fR\fIlogin-ID-list\fR\fR
776 Allow or deny the users in \fIlogin-ID-list\fR access to the printer. By
777 default all users are allowed on a new printer. The \fIlogin-ID-list\fR
778 argument can include any or all of the following constructs:
791 \fB\fIsystem-name\fR\fB!\fR\fIlogin-ID\fR\fR
794 a user on system \fIsystem-name\fR
800 \fB\fIsystem-name\fR\fB!all\fR\fR
803 all users on system \fIsystem-name\fR
809 \fB\fBall!\fR\fIlogin-ID\fR\fR
812 a user on all systems
821 all users on all systems
824 For each printer, the \fBLP\fR print service keeps two lists of users: an
825 ``allow-list'' of people allowed to use the printer, and a ``deny-list'' of
826 people denied access to the printer. With the \fB\fR\fB-u\fR\fB allow\fR
827 option, the users listed are added to the allow-list and removed from the
828 deny-list. With the \fB\fR\fB-u\fR\fB deny\fR option, the users listed are
829 added to the deny-list and removed from the allow-list.
831 If the allow-list is not empty, only the users in the list can use the printer,
832 regardless of the contents of the deny-list. If the allow-list is empty, but
833 the deny-list is not, the users in the deny-list cannot use the printer. All
834 users can be denied access to the printer by specifying \fB\fR\fB-u\fR\fB
835 deny:all\fR. All users can use the printer by specifying \fB\fR\fB-u\fR\fB
846 The \fB-U\fR option allows your print service to access a remote printer. (It
847 does not enable your print service to access a remote printer service.)
848 Specifically, \fB-U\fR assigns the ``dialing'' information \fIdial-info\fR to
849 the printer. \fIdial-info\fR is used with the \fBdial\fR routine to call the
850 printer. Any network connection supported by the Basic Networking Utilities
851 works. \fIdial-info\fR can be either a phone number for a modem connection, or
852 a system name for other kinds of connections. Or, if \fB-U\fR \fBdirect\fR is
853 given, no dialing takes place, because the name \fBdirect\fR is reserved for a
854 printer that is directly connected. If a system name is given, it is used to
855 search for connection details from the file \fB/etc/uucp/Systems\fR or related
856 files. The Basic Networking Utilities are required to support this option. By
857 default, \fB\fR\fB-U\fR\fB direct\fR is assumed.
863 \fB\fB\fR\fB-v\fR \fIdevice\fR\fR
867 Associate a \fIdevice\fR with \fIprinter\fR. \fIdevice\fR is the path name of a
868 file that is writable by \fBlp\fR. Notice that the same \fIdevice\fR can be
869 associated with more than one printer.
875 \fB\fB-v\fR \fIscheme\fR\fB://\fR\fIend-point\fR\fR
879 Associate a network attached device with printer.
881 \fIscheme\fR is the method or protocol used to access the network attached
882 device and \fIend-point\fR is the information necessary to contact that network
883 attached device. Use of this device format requires the use of the \fBuri\fR
884 interface script and can only be used with the \fBsmb\fR scheme at this time.
890 # lpadmin \fB-p\fR \fIqueue\fR \fB-v\fR \fBsmb://smb-\fR\fIservice\fR\fB/\fR\fIprinter\fR \fB-m\fR \fBuri\fR
895 See the \fB/usr/sfw/man/man1m/smbspool.1m\fR man page for details.
898 .SS "Removing a Printer Destination"
901 The \fB-x\fR \fIdest\fR option removes the destination \fIdest\fR (a printer or
902 a class), from the \fBLP\fR print service. If \fIdest\fR is a printer and is
903 the only member of a class, then the class is deleted, too. If \fIdest\fR is
904 \fBall\fR, all printers and classes are removed. If there are no remaining
905 local printers and the scheduler is still running, the scheduler is shut down.
908 No other \fIoptions\fR are allowed with \fB-x\fR.
909 .SS "Setting/Changing the System Default Destination"
912 The \fB-d\fR [\fIdest\fR] option makes \fIdest\fR (an existing printer or
913 class) the new system default destination. If \fIdest\fR is not supplied, then
914 there is no system default destination. No other \fIoptions\fR are allowed with
916 .SS "Setting an Alert for a Print Wheel"
920 \fB\fB-S\fR \fIprint-wheel\fR [\fB-A\fR \fIalert-type\fR] [\fB-W\fR
921 \fIminutes\fR] [\fB-Q\fR \fIrequests\fR] \fB-T\fR\fR
925 The \fB-S\fR \fIprint-wheel\fR option is used with the \fB-A\fR
926 \fIalert-type\fR option to define an alert to mount the print wheel when there
927 are jobs queued for it. If this command is not used to arrange alerting for a
928 print wheel, no alert is sent for the print wheel. Notice the other use of
929 \fB-A\fR, with the \fB-p\fR option, above.
931 The \fIalert-types\fR are:
938 Send the alert message using the \fBmail\fR command to the administrator.
947 Write the message, using the \fBwrite\fR command, to the terminal on which the
948 administrator is logged in. If the administrator is logged in on several
949 terminals, one is arbitrarily chosen.
958 Do not send messages for the current condition. An administrator can use this
959 option to temporarily stop receiving further messages about a known problem.
960 Once the \fIprint-wheel\fR has been mounted and subsequently unmounted,
961 messages are sent againwhen the number of print requests reaches the threshold
962 specified by the \fB-Q\fR option.
971 Do not send messages until the \fB-A\fR option is given again with a different
972 \fIalert-type\fR (other than \fBquiet\fR).
978 \fB\fIshell-command\fR\fR
981 Run the \fIshell-command\fR each time the alert needs to be sent. The shell
982 command should expect the message in standard input. If there are blanks
983 embedded in the command, enclose the command in quotes. Notice that the
984 \fBmail\fR and \fBwrite\fR values for this option are equivalent to the values
985 \fBmail\fR \fIuser-name\fR and \fBwrite\fR \fIuser-name\fR respectively, where
986 \fIuser-name\fR is the current name for the administrator. This is the login
987 name of the person submitting this command unless he or she has used the
988 \fBsu\fR command to change to another user ID. If the \fBsu\fR command has been
989 used to change the user ID, then the \fIuser-name\fR for the new ID is used.
998 Display the type of the alert for the print wheel on standard output. No change
999 is made to the alert.
1002 The message sent appears as follows:
1006 The print wheel \fIprint-wheel\fR needs to be mounted
1008 \fIprinter\fR(\fIinteger1\fRrequests) \fIinteger2\fR print requests
1009 await this print wheel.
1014 The printers listed are those that the administrator had earlier specified were
1015 candidates for this print wheel. The number \fIinteger1\fR listed next to each
1016 printer is the number of requests eligible for the printer. The number
1017 \fIinteger2\fR shown after the printer list is the total number of requests
1018 awaiting the print wheel. It is less than the sum of the other numbers if some
1019 requests can be handled by more than one printer.
1021 If the \fIprint-wheel\fR is \fBall\fR, the alerting defined in this command
1022 applies to all print wheels already defined to have an alert.
1024 If the \fB-W\fR option is not given, the default procedure is that only one
1025 message is sent per need to mount the print wheel. Not specifying the \fB-W\fR
1026 option is equivalent to specifying \fB\fR\fB-W\fR\fB once\fR or \fB-W\fR
1027 \fB0\fR. If \fIminutes\fR is a number greater than zero, an alert is sent at
1028 intervals specified by \fIminutes\fR.
1030 If the \fB-Q\fR option is also given, the alert is sent when a certain number
1031 (specified by the argument \fIrequests\fR) of print requests that need the
1032 print wheel are waiting. If the \fB-Q\fR option is not given, or \fIrequests\fR
1033 is 1 or \fBany\fR (which are both the default), a message is sent as soon as
1034 anyone submits a print request for the print wheel when it is not mounted.
1037 .SH PREDEFINED OPTIONS USED WITH THE \fB-o\fR OPTION
1040 A number of options, described below, are predefined for use with \fB-o\fR.
1041 These options are used for adjusting printer capabilities, adjusting printer
1042 port characteristics, configuring network printers, and controlling the use of
1043 banner. The \fB-o\fR also supports an arbitrary \fB\fIkeyword\fR=\fIvalue\fR\fR
1044 format, which is referred to below as an undefined option.
1045 .SS "Adjusting Printer Capabilities"
1048 The \fBlength\fR, \fBwidth\fR, \fBcpi\fR, and \fBlpi\fR parameters can be used
1049 in conjunction with the \fB-o\fR option to adjust printer capabilities. The
1050 format of the parameters and their values is as follows:
1054 length=\fIscaled-decimal-number\fR
1055 width=\fIscaled-decimal-number\fR
1056 cpi=\fIscaled-decimal-number\fR
1057 lpi=\fIscaled-decimal-number\fR
1064 The term \fIscaled-decimal-number\fR refers to a non-negative number used to
1065 indicate a unit of size. The type of unit is shown by a ``trailing'' letter
1066 attached to the number. Three types of \fIscaled-decimal-numbers\fR can be used
1067 with the LP print service: numbers that show sizes in centimeters (marked with
1068 a trailing \fBc\fR); numbers that show sizes in inches (marked with a trailing
1069 \fBi\fR); and numbers that show sizes in units appropriate to use (without a
1070 trailing letter), that is, lines, characters, lines per inch, or characters per
1074 The option values must agree with the capabilities of the type of physical
1075 printer, as defined in the terminfo database for the printer type. If they do
1076 not, the command is rejected.
1079 The defaults are defined in the \fBterminfo\fR entry for the specified printer
1080 type. The defaults can be reset by:
1084 \fBlpadmin -p \fIprintername\fR -o length=
1085 lpadmin -p \fIprintername\fR -o width=
1086 lpadmin -p \fIprintername\fR -o cpi=
1087 lpadmin -p \fIprintername\fR -o lpi=\fR
1092 .SS "Adjusting Printer Port Characteristics"
1095 You use the \fBstty\fR keyword in conjunction with the o option to adjust
1096 printer port characteristics. The general form of the \fBstty\fR portion of the
1101 \fBstty="'\fR\fIstty-option-list\fR'"
1108 The \fIstty-option-list\fR is not checked for allowed values, but is passed
1109 directly to the \fBstty\fR program by the standard interface program. Any error
1110 messages produced by \fBstty\fR when a request is processed (by the standard
1111 interface program) are mailed to the user submitting the request.
1114 The default for \fBstty\fR is:
1118 stty="'9600 cs8 -cstopb -parenb ixon
1119 -ixany opost -olcuc onlcr
1121 -onlret -ofill nl0 cr0 tab0 bs0 vt0 ff0'"
1128 The default can be reset by:
1132 \fBlpadmin -p \fIprintername\fR -o stty=\fR
1137 .SS "Configuring Network Printers"
1140 The \fBdest\fR, \fBprotocol\fR, \fBbsdctrl\fR, and \fBtimeout\fR parameters are
1141 used in conjunction with the \fB-o\fR option to configure network printers. The
1142 format of these keywords and their assigned values is as follows:
1146 dest=\fIstring\fR protocol=\fIstring\fR bsdctrl=\fIstring\fR \e
1147 timeout=\fInon-negative-integer-seconds\fR
1154 These four options are provided to support network printing. Each option is
1155 passed directly to the interface program; any checking for allowed values is
1159 The value of \fBdest\fR is the name of the destination for the network printer;
1160 the semantics for value \fBdest\fR are dependent on the printer and the
1161 configuration. There is no default.
1164 The value of option \fBprotocol\fR sets the over-the-wire protocol to the
1165 printer. The default for option \fBprotocol\fR is \fBbsd\fR. The value of
1166 option \fBbsdctrl\fR sets the print order of control and data files (BSD
1167 protocol only); the default for this option is \fBcontrol file first\fR. The
1168 value of option \fBtimeout\fR sets the seed value for backoff time when the
1169 printer is busy. The default value for the \fBtimeout\fR option is \fB10\fR
1170 seconds. The defaults can be reset by:
1174 \fBlpadmin -p \fIprintername\fR -o protocol=
1175 lpadmin -p \fIprintername\fR \fR\fB-o bsdctrl=\fR
1176 lpadmin -p \fIprintername\fR -o timeout=
1181 .SS "Controlling the Use of the Banner Page"
1184 Use the following commands to control the use of the banner page:
1188 \fBlpadmin -p \fIprinter\fR -o nobanner\fR
1189 \fBlpadmin -p \fIprinter\fR -o banner\fR
1190 \fBlpadmin -p \fIprinter\fR -o banner=always\fR
1191 \fBlpadmin -p \fIprinter\fR -o banner=never\fR
1192 \fBlpadmin -p \fIprinter\fR -o banner=optional\fR
1199 The first and fifth commands (\fB-o\fR \fBnobanner\fR and \fB-o\fR
1200 \fBbanner=optional\fR) are equivalent. The default is to print the banner page,
1201 unless a user specifies \fB-o\fR \fBnobanner\fR on an \fBlp\fR command line.
1204 The second and third commands (\fB-o\fR \fBbanner\fR and \fB-o\fR
1205 \fBbanner=always\fR) are equivalent. Both cause a banner page to be printed
1206 always, even if a user specifies \fBlp\fR \fB-o\fR \fBnobanner\fR. The root
1207 user can override this command.
1210 The fourth command (\fB-o\fR \fBbanner=never\fR) causes a banner page never to
1211 be printed, even if a user specifies \fBlp\fR \fB-o\fR \fBbanner\fR. The root
1212 user can override this command.
1213 .SS "Undefined Options"
1216 The \fB-o\fR option supports the use of arbitrary, user-defined options with
1217 the following format:
1221 \fB\fIkey\fR\fB=\fR\fIvalue\fR\fR
1225 Each \fIkey\fR\fB=\fR\fIvalue\fR is passed directly to the interface program.
1226 Any checking for allowed values is done in the interface program.
1228 Any default values for a given \fIkey\fR\fB=\fR\fIvalue\fR option are defined
1229 in the interface program. If a default is provided, it can be reset by typing
1230 the key without any value:
1234 lpadmin -p \fIprintername\fR -o \fIkey\fR=
1244 \fB\fBlpadmin\fR \fB-p\fR \fIprinter\fR \fB-o\fR \fBfoo | nofoo\fR\fR
1248 Sets boolean values \fBfoo=true | foo=false\fR.
1254 In the following examples, \fIprtr\fR can be any name up to 14 characters and
1255 can be the same name as the \fBping\fR(1M) name.
1257 \fBExample 1 \fRConfiguring an HP Postscript Printer with a Jet Direct Network
1261 The following example configures an HP postscript printer with a jet direct
1267 example# \fBlpadmin -p \fIprtr\fR -v /dev/null -m netstandard \e
1268 -o dest=\fIping_name_of_prtr\fR:9100 -o protocol=tcp -T PS -I \e
1270 example# \fBenable \fIprtr\fR\fR
1271 example# \fBaccept \fIprtr\fR\fR
1277 \fBExample 2 \fRConfiguring a Standard Postscript Network Printer
1280 The following example configures a standard postscript network printer:
1285 example# \fBlpadmin -p \fIprtr\fR -v /dev/null -m netstandard \e
1286 -o dest=\fIping_name_of_prtr\fR -T PS -I postscript\fR
1287 example# \fBenable \fIprtr\fR\fR
1288 example# \fBaccept \fIprtr\fR\fR
1296 The following exit values are returned:
1303 Successful completion.
1319 \fB\fB/var/spool/lp/*\fR\fR
1337 \fB\fB/etc/lp/alerts/printer\fR\fR
1340 Fault handler for \fBlpadmin\fR
1346 \fB\fB/etc/printers.conf\fR\fR
1349 System printer configuration database
1355 See \fBattributes\fR(5) for descriptions of the following attributes:
1363 ATTRIBUTE TYPE ATTRIBUTE VALUE
1365 Interface Stability Obsolete
1371 \fBenable\fR(1), \fBlp\fR(1), \fBlpstat\fR(1), \fBmail\fR(1), \fBstty\fR(1),
1372 \fBaccept\fR(1M), \fBlpforms\fR(1M), \fBlpsched\fR(1M), \fBlpsystem\fR(1M),
1373 \fBping\fR(1M), \fBdial\fR(3NSL), \fBterminfo\fR(4), \fBattributes\fR(5)
1380 When using lpadmin to provide access to a remote printer, remote configuration
1381 data is stored in \fB/etc/printers.conf\fR. This data includes a \fBbsdaddr\fR
1382 and a \fBprinter-uri-supported\fR attribute. The data in this file can be
1383 shared through the use of a network name service or replicated across multiple
1384 systems. If the data is shared, it is important to make sure that the
1385 \fBbsdaddr\fR and \fBprinter-uri-supported\fR contain hostname information that
1386 is correctly resolved on all hosts sharing this data. Also, the
1387 \fBprinter-uri-supported\fR is the preferred means of accessing remote print
1388 service. The \fBbsdaddr\fR is supplied for backward compatability with Solaris