Previous Table of Contents Next


Understanding the Structure of the LP Print Service

The following sections explain the structure and directory hierarchy for the LP print service. The many files of the LP print service are distributed among seven directories, as shown in Table 6-3.

Table 6-3 Directories for the LP Print Service

Directory Description
/usr/bin The lp, lpstat, enable, and disable commands
/etc/lp A hierarchy of LP configuration files
/usr/share/lib The terminfo database directory
/usr/sbin The LP commands
/usr/lib/lp The LP daemons, directories for binary files and PostScript filters, and the model directory (which contains the standard printer interface program)
/var/lp/logs The logs for LP activities
lpsched.n Messages from lpsched
/var/spool/lp The spooling directory where files are queued for printing
requests.n*Information about completed print requests


*Moved from /var/lplogs in the Solaris 2.6 release. Note that the lpNet log was removed completely from the /var/lp/logs directory because the lpNet daemon is replaced by inetd in the Solaris 2.6 release.

User Commands

The /usr/bin directory contains the lp and lpstat commands, with which users submit and monitor print requests. The directory also contains the enable and disable commands, with which printers are enabled and disabled.

Users can customize their print requests by using options for the lp command, specifying forms, character sets, filters, titles, banners, and so forth. Table 6-4 summarizes the frequently used options for the lp command. These options can be used individually or combined in any order on the command line. When combining options, use a space between options and repeat the dash (-). For example, the following command specifies a destination printer, requests e-mail notification, and prints six copies of a file:

% lp -d printer-name -m -n6 filename
Table 6-4 Summary of Frequently Used lp Command Options

Option Name Description
-d Destination Specifies a destination printer by name.
-m Mail Sends e - mail to the user who submitted the print request when the file has been printed successfully.
-n Number Specifies the number of copies to be printed.
-t Title Specifies a title for a print request (printed only on the banner page).
-o nobanner Option Suppresses printing of the banner page for an individual request.
-h Header Puts a header on each page of the print request.
-c Copy Copies the file before printing.
-w Write Writes a message to root's terminal when the file has printed successfully.

See the lp(1) manual page for a complete list of options.

LP Configuration Files

The scheduler stores configuration information in LP configuration files located in the /etc/lp directory. These configuration files serve the function of the /etc/printcap file in SunOS 4.1. You can check the contents of these files, but you should not edit them directly. The LP administrative commands provide input for the configuration files in the /etc/lp directory. The lpsched daemon administers and updates the configuration files. You should use the administrative commands any time you need to update any configuration file. Table 6-5 describes the contents of the /etc /lp directory.

Table 6-5 Contents of the /etc/ lp Directory

File Type Description
alerts*Directory Contains form, jobdone, printer, and sendMsg scripts for sending print system alerts to users.
classes Directory Contains files that identify classes provided by the lpadmin -c command.
fd Directory Contains descriptions of existing filters.
filter.table*File Print filter lookup table.
forms Directory Location to put files for each form. Initially, this directory is empty.
interfaces Directory Contains printer interface program files.
logs Link to /var/lp/logs Contains log files of printing activities.
model Link to /usr/lib/lp/model Contains the standard printer interface program.
printers Directory Contains directories for each (remote or local) printer setup. Each directory contains configuration information and alert files for an individual printer.
pwheels Directory Contains printwheel or cartridge files.


*New in Solaris 2.6. Note that the Systems ASCII file is no longer a part of the /etc/lp directory in the Solaris 2.6 printing environment /etc/lp directory in the Solaris 2.6 printing environment

The printers directory has a subdirectory for each printer ( local or remote) known to the system. This example shows the subdirectories for the printers pinecone and sparc1:

%ls -l /etc/lp/printers
drwxrwxr-x 2 lp lp 512 Jan 23 23:53 pinecone
drwxrwxr-x 2 lp lp 512 Jan 11 17:50 sparc1


Previous Table of Contents Next