PRINTING
Default printer models: Local printer /etc/lp/model/standard
Remote printer /etc/lp/model/netstandard
infocmp printername Using the terminfo name of the printer, command can be used to display the
terminfo entry for that printer
/usr/share/lib/terminfo terminfo entries for terminals/printers are stored in separate filesunder one or
two levels of subdirectories. (Ex: HP Laserjet printer is stored in the usr/share/lib/terminfo/h/hplaserjet file)
Admintool
Adding a Local Printer Printer Name, Descripton, Printer Port, Printer Type, File Contents, Fault
Notification, Options (Default Printer, Always Print Banner), User Access List
Adding a Remote Printer Printer Name, Print Server, Description, Option (Default Printer)
Modifying Local Printer *Printer Name, *Printer Server, Description, Printer Port, Printer Type, File
Contents, Fault Notification, Options (Default Printer, Always Print Banner,
Accept Print Requests, Process Print Requests), User Access List
Modifying Remote *Printer Name, *Printer Server, Description, Option (Default Printer)
Printer
lp submitting print requests
arg purpose
-dlist specifies the destination printer
-q# assigns a priority (0-39 with 0 being highest priority)
-irequest_id specifies the print request ID
-Hkeyword special handling, keywords are: immediate, hold and resume
lpmove move print requests in a queue to a new printer queue
lpmove request-id(s) newprinter Moves some requests
lpmove oldprinter newprinter Moves all requests
cancel cancel one or more queues print requests
cancel request-id(s) Cancels specified print requests
cancel printername Cancels the request currently printing on specified printer
cancel u username(s) Cancels requests from specified user(s)
cancel u username(s) printername Cancels requests from specified user only on specified printer
reject & accept permit & inhibit spooling to a print queue, do not effect pending jobs
accept printername Opens the queue associated with the specified printer (or class)
reject printername Close the queue associated with the specified printer (or class)
reject r reason printername -r allows a reason for denying requests to display to users
disable & enable control the status of a particular printing device
enable printername Enables printing on specified printer
disable printername Disables printing on specified printer
disable r reason printername -r allows a reason for printer is down
disable c printername automatically cancels the job currently printing
lpstat information about printing queues & devices
arg example purpose
-alist lpstat a laser1 indicate if the queues for printers in list are accepting jobs
-clist lpstat c office display members of the listed classes
-olist lpstat o laser1 laser2 list print requests for list which can be printer, class or print request Ids
-plist lpstat p laser1 display the current status of specified printer
-ulist lpstat u guest display the list of print requests for the specified user
-vlist lpstat v laser1 display the special file used by the specified printer
-s lpstat s summary: list all classes & their members, all printers
-t lpstat t display all status information
-r lpstat r determine if the print scheduling daemon is running or not
Supports: Solaris 2.x & 7, SunOS 4.x & 5.x and HP-UX
Starting the print service: /etc/init.d/lp start or /usr/lib/lpsched
Stopping the print service: /etc/init.d/lp stop or /usr/lib/lpshut
lpadmin define and modify the characteristics of printer devices & classes
arg purpose
-plist used to define a printer
-vdevice identifies the device (port) for the printer (ex: /dev/term/a)
-clist used to define a printer class
-rlist remove a class or a printer from a class
-xlist remove a printer definition from the system
-dprinter define the system default printer
-ooption allows additional characteristics of the device to be specified (ex: width)
Define a printer lpadmin p laser1 v /dev/term/a
Define a printer with options lpadmin p laser2 v /dev/term/b o width=14i
Remove a printer lpadmin x laser1
Define a class lpadmin p laser1 laser2 c payroll
Remove a printer from a class lpadmin r laser2 c payroll
Remove a class lpadmin r payroll
Define system default printer lpadmin d laser2
System Default Printer:
Setting system default printer: lpadmin d or admintool
List system default printer: lpstat -d
Setting users default printer: LPDEST=laser; export LPDEST or set PRINTER variable
Precedence order used to determine the destination printer:
a. Printer specified on the lp command line using the d argument
b. Default printer defined by the LPDEST variable
c. Default printer defined by the PRINTER variable
d. System default printer