Previous Table of Contents Next


Within each of the printer-specific directories, the following files can describe the printer:

  alert.sh = Shell to execute in response to alerts
  alert.vars = Alert variables
  configuration = Configuration file
  users.deny = List of users to deny printer access
  comment = Printer description

A typical configuration file for the printer pinecone, /etc/lp/printers/ pinecone/configuration, would look like this:

Banner: on: Always
Content types: PS
Device: /dev/term/b
Interface: /usr/lib/lp/model/standard
Printer type: PS
Modules: default

Printer Definitions

The LP print service uses the terminfo database to initialize a local printer; to establish a selected page size, character pitch, line pitch, and character set; and to communicate the sequence of codes to a printer. The terminfo database directory is located in /usr/share/lib.

Each printer is identified in the terminfo database with a short name. If necessary, you can add entries to the terminfo database, but it is a tedious and time-consuming process. Describing how to add entries to the terminfo database is beyond the scope of this book.

Daemons and LP Internal Files

The /usr/lib/lp directory contains daemons and files used by the LP print service, as described in Table 6-6.

Table 6-6 Contents of the /usr/ lib/ lp Directory

File Type Description
bin Directory Contains files for generating printing alerts, slow filters, and queue management programs.
local*Directory Contains LP executables for the local system.
locale*Directory Contains locale information.
lpsched Daemon Manages scheduling of LP print requests.
model Directory Contains the standard printer interface program.
postscript Directory Contains all PostScript filter programs provided by the SunOS 5.0 LP print service. These filters come with descriptor files in the /etc/lp/fd directory that tell the LP print service the characteristics of the filters and where to locate them.


*New in Solaris 2.6. Note that the lpNet daemon and lpdata executable files are no longer a part of the /usr/lib/lp directory in the Solaris 2.6 printing environment. lpNet daemon and lpdata executable files are no longer a part of the /usr/lib/lp directory in the Solaris 2.6 printing environment.

LP Administrative Commands

The commands used to set up and administer the LP print service are in the /usr/sbin directory, as shown in Table 6-7.

Table 6-7 The LP Commands in the /usr/sbin Directory

Command Purpose
accept /reject Accepts print requests into the printer's queue or rejects print requests.
lpadmin Defines printer names, printer types, file content types, print classes, printer devices, and printer comments; removes printers or print classes; specifies fault recovery, interface programs (either custom or standard), printing options, banner/no banner; mounts forms; mounts printwheels or cartridges; defines allow and deny user lists.
lpfilter Adds, changes, deletes, and lists filters.
lpforms Adds, changes, deletes, and lists forms.
lpmove Moves queued print requests from one printer to another
lpshut Halts the LP print service ( the command lpsched, which starts the LP print service, is in the /usr/lib/lp directory)
lpsystem Registers print servers and print clients with the LP print service
lpusers Sets queue priorities for users

Log Files

The LP print service maintains two sets of log files: a list of current requests that are in the print queue (/var/spool/lp) and an ongoing history of print requests (/ var/lp/logs/requests).

Print Queue Logs

The scheduler for each system keeps a log of print requests in the directories /var/spool/lp/requests /system and /var/spool/lp/tmp/system. Each print request has two files (one in each directory) that contain information about the request. The information in the /var/spool/lp/requests/system directory can be accessed only by root or lp. The information in the /var/spool/lp/tmp/system directory can be accessed only by root, lp, or the user who submitted the request.

The following example shows the contents of the /var/spool/lp/tmp/pine directory. See Table 6-8 later in the chapter for an explanation of the LP requests log codes.

pine% ls /var/spool/lp/tmp/pine
2Ø-Ø 21-Ø
pine% cat 21-Ø
C 1
D slw2
F /etc/default/login
P 2Ø
t simple
U winsor
s Øx1ØØØ

These files remain in their directories only as long as the print request is in the queue. Once the request is finished, the information in the files is combined and appended to the file /var/lp/logs/requests, which is described in the next section.

Use the information in the /var/spool/lp logs if you need to track the status of a print request that is currently in the queue.


Previous Table of Contents Next