System Administration Guide: Printing

Chapter 12 Printing in the Oracle Solaris Operating System (Reference)

This chapter provides the following reference information for the following features:

Solaris Print Manager

This sections provides additional reference information that applies to setting up and administering printers by using Solaris Print Manager.

Solaris Print Manager and Special Characters

Solaris Print Manager checks user input for the various text fields in the input screens. There are two types of checking: general illegal input and input that is illegal for specific fields.

Solaris Print Manager does not accept the following characters as input, except for the help screens:

Printer Definitions

The following sections describe each printer definition you can set with Solaris Print Manager:

Printer Name

When adding a printer to a system, you specify a printer name for the printer.

A printer name must adhere to these guidelines:

Establish a naming convention that works for your site. For example, if you have different types of printers on the network, including the printer type as part of the printer name can help users choose an appropriate printer. For instance, you could identify PostScript printers with the letters PS. However, if all of the printers at your site are PostScript printers, you would not need to include the initials PS as part of the printer name.

Printer Server

The print server is the system that has a local printer connected to it and makes the printer available to other systems on the network.

Printer Description

You can assign a description to a printer by using the lpadmin -D command or by using Solaris Print Manager. The printer's description should contain information that helps users identify the printer. You might include the room number where the printer is located, the type of printer, the manufacturer, or the name of the person to call if printing problems occur.

Users can view a printer description by using the following command:


$ lpstat -D -p printer-name

Printer Port

When you initially install a printer, or later change its setup, you can specify the device, or the printer port, to which the printer is connected. You can use either Solaris Print Manager or the lpadmin -p printer-name -v device-name command to specify the device or printer port.

Most systems have two serial ports, plus a parallel port or USB ports. Unless you add ports, you cannot directly connect more than two serial printers and a parallel printer, or two USB printers, to one system.

You can select the following printer port types by using Solaris Print Manager. These options give you as much flexibility as using the lpadmin command.

Printer Port Type 

Corresponding Device Name Options 

Serial 

/dev/term/a

Serial 

/dev/term/b

Parallel 

/dev/printers/0 —> /dev/ecpp0

USB 

/dev/printers/[1–9]

Specify any port name that the print server recognizes 

Other

The LP print service initializes the printer port by using the settings from the standard printer interface program. For more information about printer interface programs, see Administering Print Filters. If you have a parallel printer or a serial printer for which the default settings do not work, see Adjusting Printer Port Characteristics.


x86 only –

If you use multiple ports on an x86 based system, only the first port is enabled by default. The second port, and any subsequent ports, are disabled by default. To use more than one port, you must manually edit the device driver port configuration file for each additional asy (serial) port or ecpp (parallel) port. The path names for the x86 port configuration files are the following:

/kernel/drv/asy.conf

/kernel/drv/ecpp.conf


Printer Type

The printer type is a generic name for a type of printer. Printer type identifies the terminfo database entry that contains various control sequences for the printer. By convention, printer type is usually derived from the manufacturer's model name. For example, the printer type name for the DECwriter printer is decwriter. However, the common printer type PS does not follow this convention. PS is used as the printer type for many models of PostScript printers, such as the Apple LaserWriterI and Apple LaserWriterII printers. For more information about the terminfo database, see The terminfo Database.

You can specify the printer type by using the lpadmin -T command or Solaris Print Manager.

File Content Type

In this Oracle Solaris release, to assign the file content type printer definition by using Solaris Print Manager, first deselect the Use PPD files default attribute in the Print Manager drop-down menu in Solaris Print Manager. You cannot select a file content type if you use PPD files. The default file content type for printers that are associated with PPD files is PostScript. This file content type is automatically set by the tool. You can also specify file content type by using the lpadmin -I command.

Print filters convert the content type of a file to a content type that is acceptable to the destination printer. The file content type tells the LP print service the type of file contents that can be printed directly, without any filtering. To print without filtering, the necessary fonts must also be available in the printer. You must set up and use filtering for other types of files.

Most printers can print directly the following types of files:

When submitting a file for printing, the user can indicate the content type of the file by using the lp -T content-type command. If no file content type is supplied when the request is submitted, the LP print service checks the first file in the request to determine the content type. If the file begins with ^D%! or %!, the request is considered to contain PostScript data. Otherwise, the request is assumed to contain simple (ASCII) text. The LP print service uses the file content type to determine which filters to use to convert the file contents into a type the printer can handle.

When you are not specifying PPD files, Solaris Print Manager provides a list of file content types from which you can choose when you install or modify an attached or network-attached printer. The choices are translated to the names that the LP print service uses. The following table describes the file content types that you can choose with Solaris Print Manager.

Table 12–1 Choosing File Content Type With Solaris Print Manager When Not Using PPD Files

File Contents Choice 

LP Print Service Name 

Description 

PostScript 

postscript

PostScript files do not require filtering.  

ASCII 

simple

ASCII files do not require filtering. 

Both PostScript and ASCII 

simple, postscript

PostScript files and ASCII files do not require filtering. 

None 

""

All files require filtering, except those files that match the printer's type. 

Any 

any

No filtering is required. If the printer cannot handle a file content type directly, the file will not be printed. 

Choose the file content type that best matches the printer's capabilities. PostScript is the default choice in Solaris Print Manager and is probably correct most of the time. PostScript means that filtering is not needed for PostScript files.

Printer Make

When you set up a printer with PPD files, the printer make is the name of the manufacturer of the printer. The printer make is found on the printer itself, and on the packaging materials and documentation that is shipped with the printer.

The following are examples of printer makes that are available in this release:

Printer Model

The printer manufacturers produce several types and models of printers. When you set up a printer with PPD files, the printer model defines the printer precisely. The model is usually stamped on the front or top of the printer. This information is also displayed on the packaging materials and documentation that is shipped with the printer.

The following are examples of printer models that are available in this release:

Printer Driver

The printer driver is determined when you select the PPD file for the specified printer make and printer model.

Printer Destination

This printer definition specifies the host name, IP address, or URI of the target printer. This definition applies to network-attached printers only.

Printer URIs can be specified by using the following formats:

Network Protocol

This printer definition specifies the protocol to be used between the print server and the printer. The current choices are the BSD, TCP and URI network protocols. This printer definition applies to network-attached printers only.

Fault Notification

This printer definition is used to specify whether a notification is sent when a printer fault is detected, and how the notification should be sent.

Default Printer

The default printer is the printer that the print system commands use when a printer is not specified on the command line or in by using a printing tool. For more information about using LP print commands to set up a default printer destination, see Setting Up a Default Printer Destination by Using LP Print Commands.

Banner Page

The banner page is the first sheet that is printed when on a print job is requested. The banner page can be set to always print, optionally print, or never print. For more information about using LP print commands to specify banner page options, see Printing Banner Pages by Using LP Print Commands.

User Access List

The user access list specifies a list of users are allowed to print from the specified print server. For more information about using LP print commands to limit user access to a printer, see Limiting User Access to a Printer by Using LP Print Commands.

Printer Class

A printer class is a collection of printers. Print requests that go to a class of printers are handled by the first available printer in that class. For more information about using LP print command to define printer classes, see Setting Up Printer Classes by Using LP Print Commands.

Fault Recovery

You can find out about printing faults so that you can correct the problem. Fault recovery options are defined by using the lpadmin command with the -F option. For more information about using LP print commands to set up fault recovery, see Setting Up Printer Fault Recovery by Using LP Print Commands.

LP Print Service

This section describes the directory structure, files, and logs of the LP print service.

LP Print Service Commands


Note –

The LP Print Service client commands have been modified to be a consumer of the FSG OpenPrinting Open Standard Print API (PAPI). These print commands are layered on top of the PAPI. See How the PAPI Is Implemented in the Oracle Solaris OS for more information.


The following table lists frequently used LP print service commands.

Table 12–2 LP Print Service Commands

Command 

Task 

Man Page 

enable

Activate a printer 

enable(1)

cancel

Cancel a print request 

cancel(1)

lp

Send one or more file or files to a printer 

lp(1)

lpstat

Report the status of the LP print service 

lpstat(1)

disable

Deactivate on or more printers 

enable(1)

accept

Permit print requests to be queued for a specific destination 

accept(1M)

reject

Prevent print requests from being queued for a specific destination 

accept(1M)

lpadmin

Set up or change a printer configuration 

lpadmin(1M)

lpfilter

Set up or change filter definitions 

lpfilter(1M)

lpforms

Set up or change preprinted forms 

lpforms(1M)

lpadmin

Mount a form 

lpadmin(1M)

lpmove

Move output requests from one destination to another destination 

lpmove(1M)

lpsched

Start the LP print service scheduler 

lpsched(1M)

lpshut

Stop the LP print service scheduler 

lpshut(1M)

lpusers

Set or change the default priority and priority limits that can be requested of the LP print service by users  

lpusers(1M)

For information about print commands that have been modified for use with the PAPI, see How the PAPI Is Implemented in the Oracle Solaris OS.

Functions of the LP Print Service

The LP print service performs the following functions:

Daemons and LP Internal Files

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

Table 12–3 Contents of the /usr/lib/lp Directory

File 

Type 

Description 

bin

Directory 

Contains files for generating printing alerts, slow filters, and queue management programs. 

model

Directory 

Contains the standard printer interface program. 

postscript

Directory 

Contains all PostScript filter programs provided by the LP print service. These filters come with descriptor files in the /etc/lp/fd directory. These files tell the LP print service the characteristics of the filters and where to locate them.

LP Print Service Directories

The files of the LP print service are distributed among the directories that are shown in the following table.

Table 12–4 Directories for the LP Print Service

Directory 

Contents 

/usr/bin

The LP print service user commands. 

/etc/lp

A hierarchy of LP server configuration files. 

/usr/share/lib

The terminfo database directory.

/usr/lib/print

The lp conversion scripts, in.lpd daemon, and the printd daemon. The printd daemon transfers all pending jobs in the/var/spool/print directory once per minute. When no jobs are remaining to transfer, the printd daemon exits.

/usr/sbin

The LP print service administrative commands. 

/usr/lib/lp

The lpsched program, binary files, PostScript filters, and the model directory, which contains the standard printer interface program.

/var/lp/logs

LP log files such as lpsched.n (which includes messages from lpsched) and requests.n (which includes information about completed print requests).

/var/spool/lp

The spooling directory where files are queued for printing. 

/var/spool/print

The staging area for LP print service client-side requests. 

/etc/lp/model/uri

The location of the interface script that process device-uri information.

LP Print Service Configuration Files

The lpsched daemon stores configuration information in the /etc/lp directory, as described in the following table.


Caution – Caution –

The configuration files listed in this table are private interfaces. These files are subject to change in future releases. You should not build software that relies on these files being in their current locations or that relies on the data being in the format currently used.


Table 12–5 Contents of the /etc/lp Directory

File 

Type 

Description 

classes

Directory 

Files identifying classes provided by the lpadmin -c command.

fd

Directory 

Description of existing filters. 

filter.table

File 

Print filter look-up table. 

forms

Directory 

Location to put files for each form. Initially, this directory is empty. 

interfaces

Directory 

Printer interface program files. 

logs

Link to /var/lp/logs

Log files of printing activities. 

model

Link to /usr/lib/lp/model

The standard printer interface program. 

printers

Directory 

Directories for each local printer. Each directory contains configuration information and alert files for an individual printer. 

pwheels

Directory 

Print wheel files or cartridge files. 

ppd

Directory 

Each local queue that is configured with a PPD file has a copy of the PPD file placed here. 

These configuration files serve a function similar to the /etc/printcap file on LPD-based print servers.


Note –

You can check the contents of the configuration files, but you should not edit these files directly. Instead, use the lpadmin command to make configuration changes. Your changes are written to the configuration files in the /etc/lp directory. The lpsched daemon administers and updates the configuration files.


The /etc/lp/printers directory has a subdirectory for each local printer that is known to the system. The following example shows the /etc/lp/printers subdirectories of printers sparc1 and luna.


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

The following table describes the files within each printer-specific directory.

File Name 

Description 

alert.sh

Shell to execute in response to alerts 

alert.vars

Alert variables 

configuration

Configuration file 

users.deny

List of users to whom printer access is denied 

comment

Printer description 

The configuration file for the printer luna, /etc/lp/printers/luna/configuration, would typically appear as follows:


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

The terminfo Database

The /usr/share/lib directory contains the terminfo database directory. This directory contains definitions for many types of terminals and printers. The LP print service uses information in the terminfo database to perform the following tasks:

Each printer is identified in the terminfo database with a short name. If necessary, you can add entries to the terminfo database, but doing so is tedious and time-consuming. For more information, see Adding a terminfo Entry for an Unsupported Printer.

Printer Names in the terminfo Database

Information about each printer type is stored in the terminfo database (/usr/share/lib/terminfo). This information includes the printer capabilities and initialization control data. The printer you install must correspond to an entry in the terminfo database.


$ pwd
/usr/share/lib/terminfo
$ ls
1  3  5  7  9  B  H  P  a  c  e  g  i  k  m  o  q  s  u  w  y
2  4  6  8  A  G  M  S  b  d  f  h  j  l  n  p  r  t  v  x  z
$ 

Each subdirectory contains compiled database entries for terminals or printers. The entries are organized by the first letter of the printer or terminal type. For example, if you have an Epson printer, look in the /usr/share/lib/terminfo/e directory to find your particular model of Epson printer.


$ cd /usr/share/lib/terminfo/e
$ ls
emots           ep2500+high   ep48            ergo4000      exidy2500
env230          ep2500+low    epson2500       esprit
envision230     ep40          epson2500-80    ethernet
ep2500+basic    ep4000        epson2500-hi    ex3000
ep2500+color    ep4080        epson2500-hi80  exidy
$ 

The entries for Epson printers begin with epson.

If you have an NEC printer, look in the /usr/share/lib/terminfo/n directory for your NEC printer model.


$ cd /usr/share/lib/terminfo/n
$ ls
ncr7900        ncr7900iv      netronics      network        nuc
ncr7900-na     ncr7901        netty          netx           nucterm
ncr7900i       nec            netty-Tabs     newhp
ncr7900i-na    net            netty-vi       newhpkeyboard
$ 

The nec entry in this directory is for the NEC printer.

Required terminfo Items For a Printer

The following three tables list the terminfo items that are required for a printer.

Table 12–6 Required terminfo Items for a Printer (Booleans)

Item 

 

Description 

Booleans: 

 

 

 

cpix

Changing character pitch changes resolution 

 

daisy

Printer requires an operator to change character set 

 

lpix

Changing line pitch changes resolution 

Table 12–7 Required terminfo Items for a Printer (Numbers)

Item 

 

Description 

Numbers: 

 

 

 

bufsx

Number of bytes buffered before printing 

 

cols

Number of columns in a line 

 

cps

Average print rate in characters per second 

 

it

Tabs initially every n spaces

 

lines

Number of lines on a page 

 

orc

Horizontal resolution, in units per character 

 

orhi

Horizontal resolution, in units per inch 

 

orl

Vertical resolution, in units per line 

 

orvi

Vertical resolution, in units per inch 

Table 12–8 Required terminfo Items for a Printer (Strings)

Item 

 

Description 

Strings: 

 

 

 

chr

Changes horizontal resolution 

 

cpi

Changes number of characters per inch 

 

cr

Carriage return 

 

csnm

List of character set names 

 

cudl

Moves carriage down one line 

 

cud

Moves carriage down n lines

 

cuf

Moves carriage to the right n columns

 

cvr

Changes vertical resolution 

 

ff

Ejects page 

 

hpa

Horizontal position absolute 

 

ht

Tabs to next 8-space tab stop 

 

if

Is the name of initialization file 

 

iprog

Is the path name of initialization program 

 

is1

Is a printer initialization string 

 

is2

Is a printer initialization string 

 

is3

Is a printer initialization string 

 

lpi

Changes number of lines per inch 

 

mgc

Clears all margins (top, bottom, and sides) 

 

rep

Repeats a character n times

 

rwidm

Disables double-wide printing 

 

scs

Selects character set 

 

scsd

Starts definition of a character set 

 

slines

Set page length to n lines per page

 

smgl

Sets left margin at current column 

 

smglp

Set left margin 

 

smgr

Sets right margin at current column 

 

smgrp

Sets right margin 

 

smglr

Sets both left and right margins 

 

msgt

Sets top margin at current line 

 

smgtp

Sets top margin 

 

smgb

Sets bottom margin at current line 

 

smgbp

Sets bottom margin 

 

smgtb

Sets both top and bottom margins 

 

swidm

Enables double-wide printing 

 

vpa

Sets vertical position to absolute 

LP Print Service Log Files

The LP print service maintains two sets of log files that are described in the following table.

Log File Name 

Description 

syslogd

Set lpr.debug in /etc/syslog.conf to enable LP print service logging

/var/spool/lp

A list of current requests that are in the print queue 

/var/lp/logs/requests

An ongoing history of print requests 

Print Queue Logs

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

The following example shows the contents of the /var/spool/lp/tmp/starbug directory:


$ ls /var/spool/lp/tmp/starbug
5     5-0
# cat 5-0
C 1
D print1
F /etc/profile
P 20
T /etc/profile
t simple
U root
s 0000
v 2

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

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

History Log Files

The LP print service records a history of printing services in two log files, lpsched and requests. These log files are located in the /var/lp/logs directory. You can use the information in these log files to diagnose and troubleshoot printing problems. An example of the contents of the /var/lp/logs directory is as follows:


# cd /var/lp/logs
# ls
lpsched.1    requests    requests.2
lpsched      lpsched.2   requests.1
# 

The two most important log files for troubleshooting are the following:

The requests log file has a simple structure so that you can extract data using common UNIX shell commands. Requests are listed in the order they are printed. They are also separated by lines showing their request IDs. Each line below the separator line, the line that starts with =, is marked with a single letter that identifies the kind of information contained in that line. Each letter is separated from the data by a single space.

The following example shows the contents of a requests log file:


# pwd
/var/lp/logs
# tail requests.2
= print1-3, uid 0, gid 1, size 206662, Wed Mar 14 08:56:30 MST 2003
z print1
C 1
D print1
F /usr/dict/words
P 20
T /usr/dict/words
t simple
U root
s 0x0014
v 2
#

The following table shows the letter codes and the content of their corresponding lines in the requests log file.

Table 12–9 Codes in the requests Log File

Letter 

Content of Line 

=

The separator line, which contains the following items: request ID, user ID (UID), and group IDs (GIDs) of the user, the total number of bytes in the original (unfiltered) file size, and the time when the request was queued. 

z

The name of the printer. 

C

The number of copies printed. 

D

The printer or class destination, or the word any.

F

The name of the file printed. The line is repeated for each file printed. Files were printed in the order shown. 

f

(Optional) The name of the form that is used. 

H

(Optional) One of three types of special handling: resume, hold, and immediate.  

N

(Optional) The type of alert used when the print request was successfully completed. The type is the letter M if the user was notified by email or W if the user was notified by a message to the terminal.

O

(Optional) The printer-dependent -o options. For example, nobanner.

P

The priority of the print request. 

p

The list of pages printed. 

r

(Optional) A single-letter line that is included if the user asked for “raw” processing of the files with the lp -r command.

S

(Optional) The character set, print wheel, or cartridge used. 

T

The title placed on the banner page. 

t

The type of content found in the files. 

U

The name of the user who submitted the print request. 

s

The outcome of the request, shown as a combination of individual bits expressed in hexadecimal format. Several bits are used internally by the print service. The bits and what they mean are described in the following table. 

v

  • 0 — Identifies that the print job originated from the in.1pd print daemon or another system on the network.

  • 2 — Identifies that the print job originated from the /usr/bin/lp or /usr/ucb/lpr commands.

  • 1 — Identifies that the print job originated from an older version of the printing software.

x

(Optional) The slow filter used for the print request. 

Y

(Optional) The list of special modes for the print filters used to print the request. 

z

(Optional) The printer used for the request. This printer differs from the destination (the D line) if the request was queued for any printer or a class of printers, or if the request was moved to another destination.

The following table shows the outcome codes in the LP requests log file and their descriptions.

Table 12–10 Outcome Codes in the requests Log File

Outcome Code 

Description 

0x0001

The request was held pending resume. 

0x0002

Slow filtering is running. 

0x0004

Slow filtering finished successfully. 

0x0008

The request is on the printer. 

0x0010

Printing finished successfully. 

0x0020

The request was held pending user change. 

0x0040

The request was canceled. 

0x0080

The request will print next. 

0x0100

The request failed filtering or printing. 

0x0200

The request is in transit to a remote printer (obsolete). 

0x0400

The user will be notified. 

0x0800

A notification is running. 

0x1000

A remote system has accepted the request (obsolete). 

0x2000

The administrator placed a hold on the request. 

0x4000

The printer had to change filters. 

0x8000

The request is temporarily stopped. 

Spooling Directories

Files queued for printing are stored in the /var/spool/lp directory until they are printed, which might be only seconds. The following table shows the contents of the /var/spool/lp directory.

Table 12–11 Contents of the /var/spool/lp Directory

File 

Type 

Description 

SCHEDLOCK

File 

Lock file for the scheduler. Check for this file if the scheduler terminates and will not restart. 

admins

Directory 

Link to /etc/lp.

bin

Directory 

Link to /usr/lib/lp/bin.

logs

Link 

Link to ../lp/logs where completed print requests are logged.

model

Link 

Link to /usr/lib/lp/model.

requests

Directory 

Directory that contains subdirectories for each configured printer where print requests are logged until printed. Users cannot access this log. 

system

Directory 

A print status file for the system. 

temp

Link 

Link to /var/spool/lp/tmp/hostname, which contains the spooled requests.

tmp

Directory 

Directory for each configured printer where print requests are logged until printed. Changes to existing print requests are also recorded in this directory. 

Filtering Print Files

Print filters are programs on the print server that convert the content of a queued file from one format to another format.

A print filter can be as simple or as complex as needed. The Oracle Solaris OS provides print filters in the /usr/lib/lp/postscript directory that cover most situations where the destination printer requires the data to be in PostScript format. If you need filters for nonPostScript printers, you have to create the filters and add them to the systems that need filters.

A set of print filter descriptor files are provided in the /etc/lp/fd directory. These descriptor files describe the characteristics of the filter (for example, fast or slow filter). These description files point to the filter program (for example, to /usr/lib/lp/postscript/postdaisy).

How the Printer Interface Program Works

The LP print service interacts with other parts of the Oracle Solaris OS. The print service uses a standard printer interface program to do the following:

The LP print service uses the standard interface program, found in the /usr/lib/lp/model directory, unless you specify a different program. You can create custom interface programs. However, you must make sure that the custom program does not terminate the connection to the printer or interfere with proper printer initialization.

Support for the Use of PPD Files To Set Up Printers

Support for setting up and administering printers with PPD files has been incorporated into the Oracle Solaris print subsystem. Two interface scripts, standard_foomatic, and netstandard_foomatic, are available. These interface scripts provide the generic interface between the Solaris spooler and the back-end process of the print server.

The following are examples of the types of printers that are supported:

Raster Image Processor Support

The raster image support in the Oracle Solaris OS (RIP) enables you to print to printers that do not have resident PostScript processing capabilities. Theprinting software provides the print server RIP and supporting technologies. The RIP occurs behind the scenes. However, to use the appropriate driver you need to configure each printer by using either Solaris Print Manager or the lpadmin -n command. For step-by-step instructions on using the lpadmin -n command, see How to Add a New Directly Attached Printer by Using LP Print Commands.

Support for PostScript Printer Description Files

The lpadmin and lpstat commands, as well as the Solaris Print Manager printer definition screens, support the use of PPD files.

The following new software packages are associated with this feature:

Where to Find Information About Supported Printers and Available PPD Files


Caution – Caution –

The location where the PPD files and the ppdcache file is stored are private, as is the contents of the ppdcache file. The placement of these files and the contents of the ppdcache are subject to change. Do not build software that relies on these files being in their current location or that relies on the data being in the format that is currently used.


If the file required by your printer is not available, you can add your own PPD file. If you use the lpadmin -n command to create a new print queue, you can store your own PPD files anywhere that you choose. If you are running the Oracle Solaris 10 OS, and you use Solaris Print Manager to create the print queue, the PPD file must have an entry in the ppdcache file.

If you are running a supported Oracle Solaris release, PPD files are located in any of following four repositories on the system:

/usr/share/ppd

Specifies the system repository.

/usr/local/share/ppd

Specifies the admin repository.

/opt/share/ppd

Specifies the vendor repository.

/var/lp/ppd

Specifies the user repository.

Copies of PPD files that are specified by using the lpadmin command with the -n option, or by using the -a option with the ppdmgr command are stored in the user repository under the same PPD file name.

If you use the ppdmgr utility with the -a and the -R options, a copy of the specified PPD file can be stored in the admin repository.

If you create a print queue with Solaris Print Manager, and no entry exists for the PPD file in the ppdcache file, you can use the ppdmgr utility to add the file to the system. The cache of PPD file information that Solaris Print Manager uses is then updated to reflect any changes you make by using either of these two methods.

In later Oracle Solaris releases, PPD files are located in the /usr/lib/lp/model/ppd/system directory or any alternate directory that you specify.

The output of the ls command lists all the PPD files for a particular printer manufacturer.

For additional task-related information, see Administering Printers That Are Associated With PPD Files (Task Map).

PPD File Management Utility

This section contains reference information for managing PPD files.

When the ppdmgr utility is used to add a PPD file to the system, a compressed (gzipped) copy of the specified PPD file is stored on the system. The purpose is to maintain a current cache of PPD file information from all known PPD files on the system.

The full path of the PPD file that is copied to the system follows:


repository/label/manufacturer/ppd-file-name
repository

Is the specified repository. If no repository is specified by using the -R option, the default repository is the user repository, /var/lp/ppd/.

label

Is the specified label. If no label is specified by using the -L option, the default label is user, within the user repository.

manufacturer

Is the manufacturer's name that is contained within the PPD file. This name might be modified according to the manufacturer aliases that are defined in the /var/lp/ppd/manufaliases file. See Manufacturer Aliases File.

ppd-file-name

Is the same as the original PPD file name that is specified with the ppdmgr utility. This file can also contain the .gz extension if the PPD file is compressed.

The following figures show the layout of a typical PPD file repository and the ppdmgr utility directory layout, which contains all relevant ppdmgr delivered and generated files, including the PPD user file repository.

Figure 12–1 PPD File Repository Layout

Graphic showing the directory layout of a PPD file repository
and the directory layout for delivered and generated ppdmgr files.

PPD File Repositories

The following table describes the PPD file repositories that are located on a system.

Table 12–12 Description of the PPD File Repositories

Repository 

Location 

Contents 

Method Used to Add or Modify 

admin

/usr/local/share/ppd/

This PPD file repository is used to store PPD files that are used by system administrators. 

PPD files can be added to this repository manually, by using either the ppdmgr utility or the pkgadd command.

all

Represents all of the PPD repositories on a system 

This repository represents all supported PPD repository locations on a system. 

You can only specify the all repository when requesting an update or rebuild of the PPD cache file by using the ppdmgr utility.

system

/usr/share/ppd/

This repository contains PPD files that are delivered with Oracle Solaris. 

PPD files that are delivered by Oracle can be added to the system repository by using the pkgadd and patchadd commands.

A PPD file in this repository should not be modified manually or by using the ppdmgr utility. If you modify this repository manually, your changes might be lost.

user

/var/lp/ppd

This repository is used, as needed, by administrators and users with appropriate privileges (Printer Management). 

PPD files that are added to the system by using the ppdmgr command with the -a option are added to this repository unless otherwise specified.

vendor

/opt/share/ppd/

This repository is a central location for storing PPD files that are delivered to Oracle Solaris by vendors. 

The pkgadd command is used to add PPD files to this repository


Note –

This repository cannot be modified by using the ppdmgr utility.



Caution – Caution –

The location of the PPD files and the ppdcache file is private and is therefore subject to change. Do not build software that relies on these files being in their current location or the data being in its current format.


PPD File Labels

On a system that is running the Oracle Solaris software, PPD files can be stored default label directories. You can also specify a label of your own choosing to organize PPD files, as long as the label is not reserved by the system.

The following label names are reserved:

With the exception of the all label name, these label names cannot be specified by using either the -L or -R options of the ppdmgr utility. However, you can specify the all label name with the -L or the -R option when using the -r and -u options. Any label name that begins with SUNW is reserved for use by Oracle, but is not prohibited.

If you add a PPD file to a system and specify a label that does not exist, a directory with that label name is created in the specified repository. By default, if no PPD file repository is specified, this directory is /var/lp/ppd/label. For more information about specifying labels when you add PPD files to a system, see Description of the Command-Line Options for the ppdmgr Utility.

Description of the Printer Driver Field in Solaris Print Manager

The Printer Driver field in Solaris Print Manager is displayed when you select the Add New Printer (attached or network) or Modify Printer Attributes (attached or network) menu options. This field contains printer driver descriptions from the PPD cache file, based on the printer model that you select. To distinguish between duplicate printer driver descriptions that have different labels within the PPD file repositories, the label and abbreviation of the PPD file repository name is also displayed.

The format that is used for the printer driver description is as follows:

label(repository-letter): driver-description

For example, the following PPD file is located in the PHOTOS label within the user PPD file repository:

/var/lp/ppd/PHOTOS/HP/HP-PhotoSmart_P1100-hpijs.ppd.gz

This PPD file would appear in Solaris Print Manager's Printer Driver field selection list as follows:

PHOTOS(U): Foomatic/hpijs (recommended)

In the following example, the following PPD file is located in the SUNWfoomatic label within the system PPD file repository:

This PPD file would appear in Solaris Print Manager's Printer Driver field selection list as follows:

SUNWfoomatic(S): Foomatic/hpijs (recommended)

The following table describes the PPD file repository letters, the repositories they represent and the location of the repositories a the system.

Repository Abbreviation 

Repository Name 

Repository Location 

A

admin

/usr/local/share/ppd

S

system

/usr/share/ppd

U

user

/var/lp/ppd

V

vendor

/opt/share/ppd

Manufacturer Aliases File

Manufacturer directories, one for each manufacturer, are located in the PPD repositories on a system. When PPD files are added to a system, the manufacturer name that is contained in the PPD file is used to determine which manufacturer directory to copy the PPD file to. A private file, /var/lp/ppd/manufaliases, contains aliases for all the manufacturer entries in a PPD file. The manufaliases file is referenced to determine which manufacturer directory to copy the PPD file to. This process ensures that there is one directory per manufacturer, rather than one directory per manufacturer alias. For example, if a PPD file contains the manufacturer name, Hewlett-Packard, and an HP alias for Hewlett-Packard is listed in the manufaliases file, the PPD file is stored in the HP directory. This strategy applies to all PPD files that are added to a system by using the ppdmgr utility and the lpadmin -n command.


Note –

The manufaliases file is a private file. Do not edit this file. Do not build software that relies on the file being in its current location or the data being in its current format.


PPD File Caches

Private PPD file caches are maintained in the /var/lp/ppd/caches/ directory, one for each label within each repository.

The format of the cache file name that is used follows:

PPD-repository: label

The information about PPD files that is in the PPD cache files is maintained by using the ppdmgr utility. Do not edit the PPD cache files manually. Note that the cache files in the /var/lp/ppd/caches directory are used to generate the private PPD cache file, /var/lp/ppd/ppdcache. This file is used by the printmgr utility. For more information, see the printmgr(1M) man page.


Note –

The location of the ppdcache and it's contents is private. Do not build software that relies on this file being in its current location or on the data being in its current format. This information applies to any private files that are generated or delivered for use by the ppdmgr utility.


Description of the Command-Line Options for the ppdmgr Utility

In this section, the command-line options for the ppdmgr utility are described. Additional information about processes, guidelines, and restrictions for administering PPD files by using the ppdmgr utility are also described.

The PPD Manager (ppdmgr) utility is located in /usr/sbin/ppdmgr.

To add a PPD file to a system, you would use the following syntax:


ppdmgr -a ppd-file-path

The -a option copies the PPD file that is specified in ppd-file-path to the PPD repository, then updates the PPD cache file to reflect the change. If you do not specify a PPD file repository by using the -R option, the PPD file is stored in the user PPD file repository. If you do not specify a label by using the -L option, the PPD file is stored in the user label directory.

The following verifications are performed when you use the -a option with the ppdmgr utility:


Note –

If you provide information that does not pass the various verification checks, or if any of the actions that are performed by the ppdmgr utility are unsuccessful, an error message is displayed, and the utility exits.


Additional Actions Performed:

To specify PPD file repository, you would use the following syntax:


ppdmgr -R repository

The -R option with repository is used to identify one of the supported PPD file repositories. When the -R option is not specified, the default repository is user. When the -R option is specified with the -a option, the valid repository names are user and admin. See PPD File Repositories for more information about all of the supported repository names and their locations.

To specify a label, you would use the following syntax:


ppdmgr -L label-name

The -L option with the label-name is used to identify a grouping of PPD files within a PPD file repository. The label is also the name of the directory that is located in the PPD file repository. The label can be comprised of any characters from the portable character set. However, the label cannot contain a semicolon (;).

When the -L option is not specified, the following are the defaults that are used for specifying a label name.

ppdmgr Command-Line Option

Default Label 

-a

Defaults to the label in ppd-file-path, if the ppd-file-path is located within a supported repository. Otherwise label defaults to user.

-r

Defaults to the all label.

-u

Defaults to the all label.

To request an update of the PPD cache file, you would use the following syntax:


ppdmgr -u

This option updates the cache file to reflect modifications within PPD file repositories. The PPD cache file is updated only if modifications are detected.


Note –

When the -a option is specified, an update of the PPD cache file occurs automatically to reflect the change in the label directory within the repository where the PPD file was copied.


When the -R or -L option is not specified, the PPD cache file is updated to reflect modifications in the all label directory within the user repository.

To request a rebuild of PPD cache file, you would use the following syntax:


ppdmgr -r

The -r option rebuilds the cache by removing and regenerating any intermediary cache files that are associated with the specified label within the specified PPD file repository. This action results in an update of the PPD cache file, /var/lp/ppd/ppdcache, if any intermediary cache files are removed. Because a regeneration of the specified label within the specified PPD file repository is required, the regeneration of the PPD cache information can be very time-consuming. The time that it takes to rebuild the PPD cache file depends upon the number of PPD files that are affected, Therefore, the -r option should only be used when PPD cache file corruption is suspected.

When the - R or - L option is not specified, intermediary cache files that are associated with all of the labels within the user PPD file repository are removed. These modifications are then reflected in the PPD cache file.

To display the full path of PPD File in the repository, you would use the following syntax:


ppdmgr -a ppd-file-path -w

The -w option must be specified with the -a option, and the PPD file is added to the system successfully, the full destination path of the PPD file is displayed on stdout. Otherwise, this option is ignored.

How the PAPI Is Implemented in the Oracle Solaris OS

This section contains additional background information about the FSG OpenPrinting Open Standard Print Application Programming Interface (PAPI), a print service-independent interface for accessing printing support on a local host or a network.

The PAPI contains a set of printing related objects or data structures and a set of operations or functions to manipulate the objects.

The following are supported tasks:

Modified Print Commands

Table Table 12–13 describes the print commands that have been modified for use with the PAPI.

Table 12–13 Modified Print Commands

Command 

Origin 

Function 

lpr

BSD 

Submit print jobs. 

lpq

BSD 

Query print queues and print jobs. 

lprm

BSD 

Remove print jobs. 

lpc

BSD 

Control print jobs: 

accept, reject, enable, disable, clear, topq

lp

SysV 

Submit print jobs. 

lpstat

SysV 

Query print server (print queues, print jobs, other). 

cancel

SysV 

Remove print jobs. 

lpmove

SysV 

Move jobs between local print queues. 

accept

SysV 

Enable queueing of print jobs on a print queue. 

reject

SysV 

Disable queueing of print jobs on a print queue. 

enable

SysV 

Enable job processing on a print queue. 

disable

SysV 

Disable job processing on a print queue.