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
Answertopia.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

Using the PPD File Manager (ppdmgr) Utility

How to Add a PPD File to a System by Using the ppdmgr Utility

This procedure describes how to use the ppdmgr utility to add a new PPD file to the system. You can also specify a PPD file label, PPD repository, or the source path of the PPD file, by using the appropriate arguments with the ppdmgr -a command. Note that when you add a PPD file to the system by using the ppdmgr command, the file is copied to the label and repository that you specify and then compressed.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Add the PPD file to the system.
    # ppdmgr -a ppd-file-path [ -L label ] [ -R repository ] [-w]
    -a

    Copies the PPD file that is specified in ppd-file-path to the PPD repository, then updates the information in the cache file to reflect the change.

    If the -L option is not specified, the default label that is assigned to the PPD file is user.

    If the -R option is not specified, the default repository that is assigned to the PPD file is user.

    ppd-file-path

    Specifies the source path to the PPD file and the name of that file. This file is used with the -a option to add a copy of ppd-file-path to the specified label within the specified repository with the specified label. The ppdmgr utility accepts a valid PPD file that has either a .ppd or .ppd.gz extension.

    -L label

    Specifies a PPD file label. The default label is user. Label names must contain characters that are in the portable file name character set. Label names must not begin with a hyphen (-) or contain a semicolon (:). Label names cannot be a reserved label name.

    The following label names are reserved and cannot be used with the -a option:

    • caches

    • ppdcache

    • manufaliases

    • all

    -R repository

    Specifies the name of a PPD file repository that represents one of the PPD file installation locations. When using this option, one of the following PPD file repositories can be specified:

    • user (default)

    • admin

    -w

    Displays the full path where the PPD file was copied. The -w option is only valid if it is used with the -a option. Otherwise, this option is ignored.

  3. Verify that the PPD file was added by using one of the following methods:
Example 9-1 Adding a PPD File to a System by Using the ppdmgr utility

This example shows how to add a PPD file, myHPprinter.ppd, to the system.

Note that in this example and the examples that follow the path that is specified varies.

# ppdmgr -a /net/somesystem/myHPprinter.ppd

The path to where the copy of the PPD file can be found on the system is /var/lp/ppd/user/HP/myHPprinter.ppd.gz.

Using this command, with the -a option, copies the file to the user label within the user repository.

Example 9-2 Adding a PPD File to a System With a Specified Label by Using the ppdmgr utility

This example shows how to add the PPD file myHPprinter.ppd, with the specified label, Photos, to the system.

# ppdmgr -a /net/somesystem/myHPprinter.ppd -L Photos

The path to where the copy of the PPD file can be found on the system is /var/lp/ppd/Photos/HP/myHPprinter.ppd.gz.

Using this command, with the -a and the -L options, copies the PPD file to the Photos label within the user repository.

Example 9-3 Adding a PPD File to a System to a Specified Repository by Using the ppdmgr Utility

This example shows how to add a PPD file, myHPprinter.ppd, to the admin repository on a system.

# ppdmgr -a /net/somesystem/myHPprinter.ppd -R admin

The path to where the copy of the PPD file can be found on the system is /usr/local/share/ppd/user/HP/myHPprinter.ppd.gz.

Using this command with the -a and -R options, copies the file to the user label directory within the admin repository.

Example 9-4 Adding a PPD File to a System With a Specified Label to a Specified Repository by Using the ppdmgr Utility

This example shows how to add a PPD file, myHPprinter.ppd, to a system, specifying the Photos label and the admin repository.

# ppdmgr -a /net/somesystem/myHPprinter.ppd -L Photos -R admin

The path to where the copy of the PPD file can be found on the system is /usr/local/share/ppd/Photos/HP/myHPprinter.ppd.gz.

Using this command with the -a, -L and -R options copies the file to the Photos label within the admin repository.

Example 9-5 Adding a PPD File to a System and Displaying the Full Path to Where the File Was Copied by Using the ppdmgr Utility

This example shows how to add a PPD file, myHPprinter.ppd, to a system, displaying the destination path of the PPD file. Use the ppdmgr command with this option to determine where on the system the PPD file was copied.

# ppdmgr -a /net/somesystem/myHPprinter.ppd -w

The path to where the copy of the PPD file can be found on the system is /var/lp/ppd/user/HP/myHPprinter.ppd.gz.

Using this command with the -a and -w options copies the specified file to the user label within the user repository.

The -w option is only valid when used in combination with the -a option. Otherwise, this option is ignored.

See Also

For a detailed description of the ppdmgr command-line options and for guidelines on adding PPD files, see Description of the Command-Line Options for the ppdmgr Utility.

How to Add a PPD File to a System by Using the lpadmin -n Command

This procedure shows how to use the lpadmin command to modify an existing print queue configuration to associate a specified PPD file with the print queue.

If you use the lpadmin command with the -n option to add a PPD file to a system, you cannot specify a label or a repository. Instead, the user label is assigned to the file, and the file is then copied to the user repository. If you want to specify a user-defined label or repository, use the ppdmgr utility to add the PPD file. See How to Add a PPD File to a System by Using the ppdmgr Utility.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Modify an existing print queue by associating it with a PPD file.
    # lpadmin -p print-queue -n ppd-file-path
    lpadmin

    Administrative command that is used to configure the LP print service.

    -p print-queue

    Specifies the print queue. Note that the print queue sometimes referred to as the printer-name.

    -n

    Copies the PPD file that is specified in the ppd-file-path to the default user label directory that is located within the default user PPD file repository.

    ppd-file-path

    Specifies the source path to the PPD file and the name of that file. This file is used with the -a option to add a copy of ppd-file-path to the system to the specified label within the specified repository. The ppdmgr utility accepts a valid PPD file with either a .ppd or .ppd.gz extension.

  3. Verify that the PPD file was added by using one of the following methods:
    • Check that the file is displayed in Solaris Print Manager:
      1. Launch Solaris Printer Manager. See How to Start Solaris Print Manager
      2. Select Modify Printer Attributes (attached or network).
      3. Select the print queue that you specified in Step 2 of this procedure.

        If the PPD file that is associated with the print queue was added successfully, it is displayed in the Printer Driver field. See Description of the Printer Driver Field in Solaris Print Manager.

    • Use the lpstat command to verify the PPD file was added:
      % lpstat -p print-queue -l

      If the PPD file was added to the print queue successfully, the PPD file name is included in the PPD field of the lpstat command's output.

Example 9-6 Adding a PPD File to an Existing Print Queue by Using the lpadmin -n Command

This example shows how to modify the print queue, printer1, to associate it with a copy of the specified PPD file.

# lpadmin -p printer1 -n /path/mynewHPppdfile.ppd

The specified PPD file is stored in /var/lp/ppd/user/HP/mynewHPppdfile.ppd.gz.

Updating the PPD Cache File

An update of the PPD cache file on a system updates the existing information in the PPD cache file.

You might the request and update of the PPD cache file on a system in the following instances:

  • If you add a PPD file to the system by using the pkgadd command.

  • If you copied a PPD file to a label directory, within a known PPD file repository manually.

Any changes that you make are reflected in Solaris Print Manager after the update has completed.

Rebuilding the PPD Cache File

A rebuild of the PPD cache file removes the existing cache and builds a completely new cache. This process can be time-consuming, especially if many PPD files are on the system. Therefore, only request a rebuild of the PPD cache file in troubleshooting situations. For guidelines that pertain to updating and rebuilding the PPD cache file, see Description of the Command-Line Options for the ppdmgr Utility.

How to Update or Rebuild the PPD Cache File by Using the ppdmgr Utility

This procedure describes how to update or rebuild the PPD cache file by using either the -u or the -r option of the ppdmgr utility.

  • To update the PPD cache file, use the ppdmgr command with the -u option.

  • To rebuild the PPD cache file, use the ppdmgr command with the -r option.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Update or rebuild the PPD cache file to reflect any recent changes.
    # ppdmgr -u | -r [ -R repository ] [ -L label ]
    -u

    Updates the PPD cache file with information about the PPD file, or files, that are assigned to the specified label within the specified repository. The default label is user. The default repository is also user. If no changes are identified, no changes are made to the cache file.

    -r

    Removes the existing PPD cache file, then rebuilds the file with the PPD file information for the PPD file, or files, within the specified label.

    If no label is specified, the default label is user, within the specified repository. If a repository is not specified, the default repository is also user.

    Under normal circumstances, you do not need to request a rebuild of the PPD cache file. Use this option only if you suspect that the PPD cache file has become corrupted.

    -R repository

    Specifies a PPD file repository to update. You can specify one of the following PPD file repositories:

    • admin

    • all (Specifies all available PPD file repositories on a system)

    • system

    • user (default)

    • vendor

    -L label

    Specifies a PPD file label.

    The default label is user. Label names must contain characters that are in the portable file name character set. Label names must not begin with a hyphen (-) or contain a semicolon (:). Label names cannot be a reserved label name.

    The following label names are reserved:

    • caches

    • ppdcache

    • manufaliases

    • all

  3. Verify that the PPD file was added by using one of the following methods:
    • Check that the file is displayed in Solaris Print Manager:
      1. Launch Solaris Printer Manager. See How to Start Solaris Print Manager.
      2. Select Modify Printer Attributes (attached or network).
      3. Select the print queue for which you added the PPD file in Step 2 of this procedure.

        If the PPD file that you specified was added successfully, the information is displayed in the Printer Driver field. See Description of the Printer Driver Field in Solaris Print Manager.

    • Use the lpstat command to verify the PPD file was added:
      % lpstat -p printer-name -l

      If the PPD file was added to the system successfully, the PPD file name is included in the PPD field of the lpstat command's output.

Example 9-7 Updating the PPD Cache File by Using the ppdmgr Utility

This example shows how to update the PPD cache file to reflect information from the PPD files that are assigned in all the labels within the user repository.

# ppdmgr -u

This example shows how to update the PPD cache file to reflect information from the PPD files that are assigned in the Photos label within the user repository.

# ppdmgr -u -L Photos

This example shows how to update the PPD cache file to reflect the information from the PPD files that are assigned in all the labels within the admin repository.

# ppdmgr -u -R system

This example shows how to update the PPD cache file to reflect information from the PPD files that are assigned in the Photos label within the admin repository.

# ppdmgr -u -L Photos -R admin

Managing the ppd-cache-update Service

The Service Management Facility (SMF) service for updating the PPD cache file, application/print/ppd-cache-update, is run once during system reboot to ensure that modifications made to any PPD file repositories on a system are reflected in the ppdcache file. The service instance is svc:/application/print/ppd-cache-update. This service is enabled by default when you install the Solaris software. To enable or disable the service, use the svcadm command.


Note - During a software installation or an upgrade, the cache file entries are generated for all PPD files that are delivered to the system repository, /var/lp/ppd. As a result, when the system reboots, it might take longer for the service to make the transition to an online state.


For instructions, see How to Enable or Disable the ppd-cache-update Service. For information about using SMF and the svcadm command, see the smf(5) and svcadm(1M) man pages.

How to Enable or Disable the ppd-cache-update Service

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. To enable or disable the application/print/ppd-cache-update service, type:
    # svcadm enable|disable application/print/ppd-cache-update
  3. To verify that the service is enabled or disabled, type:
    % svcs application/print/ppd-cache-update

    If the service is enabled, the output is as follows:

    % svcs application/print/ppd-cache-update
    STATE          STIME    FMRI
    online         Apr_26   svc:/application/print/ppd-cache-update:default

    If the service is disabled, the output is as follows:

    % svcs application/print/ppd-cache-update
    STATE          STIME    FMRI
    diabled        Apr_26   svc:/application/print/ppd-cache-update:default
See Also

For step-by-step instructions on using the ppdmgr utility with the -u option to update the PPD cache file, see How to Update or Rebuild the PPD Cache File by Using the ppdmgr Utility.

Previous Next

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