Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Solaris Printing
Previous Next

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.

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 11-9 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 Solaris OS.

PPD files that are delivered by Sun 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 the Solaris OS 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 - 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 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:

  • caches

  • ppdcache

  • manufaliases

  • all

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 Sun, 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:

  • Label verification – A label name must not be a reserved label name.

    The following label names are reserved:

    • caches

    • ppdcache

    • manufaliases

    • all

  • PPD File Path verification – The specified ppd-file-path must be accessible and must contain either the .pdd or ppd.gz extension.

  • PPD file verification – The PPD file that is specified in ppd-file-path must be a valid PPD file.


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:

  • If needed, parent directories of the destination path are created.

  • If a version of the PPD file with a .gz extension already exists in the PPD file repository, and the gzipped versions are not duplicates, an error message is displayed.

  • The ppd-file-path is copied to the destination path.

  • To reflect the change in the ppdcache file, the update action is then applied.

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.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire