System Administration Guide: Advanced Administration

Chapter 2 Managing Printing Services (Overview)

This chapter provides information about managing printers in the Solaris Operating System (Solaris OS).

This is a list of overview information in this chapter.

What's New in Printing?

This section describes expanded printer support that is available in the Solaris 9 9/04 release.

For information about the procedures associated with expanded printer support, see the following task-related information:

Expanded Printer Support

In this Solaris release, modifications have been made to incorporate support for a wide array of printers. This functionality differs greatly from previous Solaris software releases. In previous releases, you could only print to printers that understood PostScriptTM natively, or you could only print plain ASCII text. The list of supported printer types, and information about whether these printer types accepted PostScript or ASCII text, was limited. Now, through the use of additional transformation software, raster image processor (RIP), and PostScript Printer Description (PPD) files, you can print to a wider range of printers.

Specific modifications have been made to incorporate the RIP feature and PPD files into the Solaris print subsystem. Two new interface scripts, standard_foomatic, and netstandard_foomatic, were created. These interface scripts provide the generic Solaris interface between the Solaris spooler and the back-end process of the Solaris print server.

The following are examples of the types of printers that can now be supported:

Expanded printer support that is available in this Solaris release includes the following features:

Raster Image Processor Support

The RIP enables you to print to printers that do not have resident PostScript processing capabilities. The Solaris printing software now 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.

Support for PostScript Printer Description Files

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

The following new software packages are associated with this feature:

Modifications to Solaris Print Manager Printer Definition Screens

The Solaris Print Manager printer definition screens have been modified to accommodate the new expanded printer support feature. In this release, you can no longer use Solaris Print Manager to assign the following printer defintions:

The following Solaris Print Manager screens have been modified:

For these screens, Printer Type and File Content Type have been replaced with the following options:

The following table describes the printer definitions that are used by Solaris Print Manager and their availability, depending on which Solaris software release you are running.

Table 2–1 Printer Definitions Used by Solaris Print Manager

Printer Definition 

Available in releases prior to Solaris 9 9/04 

Available in Solaris 9 9/04 release 

Printer Name

Yes 

Yes 

Printer Server

Yes 

Yes 

Description

Yes 

Yes 

Printer Type

Yes 

No, not by default 

File Contents

Yes 

No, not by default 

Printer Make

No 

Yes 

Printer Model

No 

Yes 

Printer Driver

No 

Yes 

Fault Notification

Yes 

Yes 

Options

Yes 

Yes 

User Access List

Yes 

Yes 

Default Printer

Yes 

Yes 

Always Print Banner

Yes 

Yes 

For a detailed description of the printer make, printer model, and printer driver printer definitions, see Setting Definitions for Printers.


Note –

Using PPD files is a per-queue configuration option, and is not a requirement. PPD files are not required for printers that already contain the RIP feature. You can continue to configure these printers the same way that you did for previous Solaris releases.


Reverting to Previous Solaris Print Manager Printer Definition Screens

To maximize performance, Solaris Print Manager only recognizes those PPD files that are in the ppdcache file. If you prefer, you can revert to the previous printer definition screen options used by Solaris Print Manager. To do so, rename the ppdcache file that is located in the /usr/lib/lp/model/ppd/ directory. You must become superuser or assume an equivalent role before renaming this file.

Because the ppdcache file is required by Solaris Print Manager to display the new printer definition screen options, renaming the file reverts Solaris Print Manager to its previous behavior and restores the previous screens.


Note –

You can use the new version of Solaris Printer Manager to modify printers that were added by using the previous version of Solaris Print Manager. However, if you rename the ppdcache file, you cannot modify any printers that were added by using the version of Solaris Print Manager that is included in this Solaris release.


New -n Option to the lpadmin Command

The lpadmin command has a new -n option. This option enables you to specify the PPD file that you want to use to create a new print queue or modify an existing print queue.

For example, if you wanted to add the queue, foobar, to a Lexmark printer, you would type the following command:


# lpadmin -p foobar -v device -I postscript -m standard_foomatic \
-n /usr/lib/lp/model/ppd/Lexmark/Lexmark-Optra_E312-Postscript.ppd.gz

When using the -n option to the lpadmin command, specify the full path and file name to the PPD file, as shown in the previous example.

For more information, see the lpadmin(1M) man page.

Where to Find Information About Supported Printers

Information about supported printers is located in the /usr/lib/lp/model/ppd directory. If the file that is 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. However, if you use Solaris Print Manager to create the print queue. the PPD file must have an entry in the ppdcache file.

A list of supported manufacturers is located in the /usr/lib/lp/model/ppd/manufacturer directory. The output of the ls command lists all the PPD files for a particular printer manufacturer. The names of the files reflect the printer model that is supported.

Specifying Your Own PPD Files

When you use the lpadmin command with the -n option to specify a PPD file, you are required to provide the full path to the PPD file. If you choose to use a PPD file that is located in a different directory, you must specify the full path to that file.

For example, to specify the xyz.pdd PPD file that is located in the user's home directory, you would type the following command:


# lpadmin -p foo -n /home/user/stuff/xyz.ppd -m \
standard_foomatic -I postscript -v /device

Changes to lpstat Command Output When Using PPD Files

If a PPD file was used to create a print queue, the PPD file that the specified queue is configured to use is now listed in the lpstat command output. If you do not specifiy a PPD file when creating a new print queue, the lpstat command continues to display the same output as it did previously.

Compare the differences in the lpstat command output that is shown in the following two examples.

In this example, a PPD file was not specified when the print queue was created. Note that the PPD entry is none.


# lpstat -l -p luna
printer luna is idle. enabled since Wed Apr 14 13:45:24 2004. available.
        Form mounted: 
        Content types: any
        Printer types: unknown
        Description: 
        Connection: direct
        Interface: /usr/lib/lp/model/standard
        PPD: none
        On fault: write to root once
        After fault: continue
        Users allowed:
                (all)
        Forms allowed:
                (none)
        Banner required
        Character sets:
                (none)
        Default pitch:
        Default page size:
        Default port settings:

In this example, the lpstat command output indicates that the print queue was configured by using the PPD file, Mitsubishi-CP50_Color_Printer-cp50.ppd.gz.


# lpstat -l -p paper
printer paper is idle. enabled since Tue 30 Mar 2004 01:48:38 PM PST
			available.
        Form mounted: 
        Content types: any
        Printer types: unknown
        Description: 
        Connection: direct
        Interface: /usr/lib/lp/model/standard_foomatic
        PPD: 
/usr/lib/lp/model/ppd/Mitsubishi/Mitsubishi-CP50_Color_Printer-cp50.ppd.gz
        After fault: continue
        Users allowed:
                (all)
        Forms allowed:
                (none)
        Banner required
        Character sets:
                (none)
        Default pitch:
        Default page size:
        Default port settings# lpstat l p <queue> 

You can use Solaris Print Manager to modify queues that were created without the use of PPD files. In such cases, Solaris Print Manager uses the previous printer definition screen options, which do not contain the printer make, model, and driver.

Limitations of Expanded Printer Support

In some instances, even though you have selected the correct printer make, model, and driver, the output of a print job might be garbled. This problem might occur when you print through a /dev/lp parallel port on a Solaris x86 system. To correct the problem, run the following command:


# lpadmin -p printer -H nopush

Where to Find Printer Tasks

Printer Task 

For More Information 

Set up printers by using Solaris Print Manager and the lp commands.

Chapter 4, Setting Up Printers (Tasks)

Administer printers by using lp commands after the printers are setup.

Chapter 5, Administering Printers (Tasks)

Manage character sets, filters, forms, and fonts. 

Chapter 6, Managing Character Sets, Filters, Forms, and Fonts (Tasks)

Customize the LP print service. 

Chapter 7, Customizing the LP Print Service (Tasks)

Printing in the Solaris Operating System

The Solaris printing software provides an environment for setting up and managing client access to printers on a network.

The Solaris printing software contains these components:

Even if you do use Solaris Print Manager to set up printing, you will have to use some of the LP commands to completely manage printing in the Solaris environment. For more information, see Chapter 5, Administering Printers (Tasks).

The limitations of Solaris print software include the following:

Solaris Print Manager

Solaris Print Manager is a Java-based graphical user interface that enables you to manage local and remote printer configuration. This tool can be used in the following name service environments: NIS, NIS+, NIS+ with Federated Naming Service (xfn), and files. You must be logged in as superuser to use this tool.

Using Solaris Printer Manager is the preferred method for managing printer configuration information. Solaris Printer Manager is preferred over Admintool: Printers because it centralizes printer information when used in conjunction with a name service. Using a name service for storing printer configuration information is desirable because a name service makes printer information available to all systems on the network. This method provides easier printing administration.

Solaris Print Manager recognizes existing printer information on the printer servers, print clients, and in the name service databases. No conversion tasks are required to use Solaris Print Manager as long as the print clients are running either the Solaris 2.6, 7, 8, or 9 releases.

The Solaris Print Manager package is SUNWppm.

For step-by-step instructions on setting up new printers with Solaris Print Manager, see Chapter 4, Setting Up Printers (Tasks).

Printing Support in the Name Service Switch

The printers database in /etc/nsswitch.conf, the name service switch file, provides centralized printer configuration information to print clients on the network.

By including the printers database and corresponding sources of information in the name service switch file, print clients automatically have access to printer configuration information without having to add it to their own systems.

The default printers entry in the /etc/nsswitch.conf file for files, LDAP, NIS, and NIS+ environments are described in the following table. The nisplus keyword represents the printers.org_dir table. The xfn keyword represents the FNS printer contexts.

Name Service Type 

Default printers Entry

files

printers: user files

ldap

printers: user files ldap

nis

printers: user files nis

nis+

printers: user nisplus files xfn

For example, if your name service is NIS, printer configuration information on print clients is looked in the following sources in this order:

For more information, see nsswitch.conf(4) and System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).

Choosing a Method to Manage Printers

Adding printer information to a name service makes access to printers available to all systems on the network and generally makes printer administration easier because all the information about printers is centralized.

Name Service Configuration 

Actions to Centralize Printer Information 

Use a name service 

Adding the printer to the LDAP, NIS, NIS+, or NIS+ (xfn) database makes the printer available to all systems on the network. 

Don't use a name service 

Adding the printer adds the printer information to the printer server's configuration files only. Print clients will not know about the printer automatically. 

You will have to add the printer information to every print client that needs to use the printer. 

The following table describes the major printer-related tasks and the tools available to perform the printing tasks.

Table 2–2 Solaris Printing Component Features

Component 

Availability 

Graphical User Interface? 

Configures Network Printers? 

Manages Print Clients and Servers? 

Uses LDAP, NIS, NIS+, or NIS+ (xfn)? 

Solaris Print Manager 

Solaris 9 and compatible versions and Solaris Easy Access Server 3.0 

Yes 

Yes 

Yes 

Yes 

Admintool 

Solaris 9 and compatible versions 

Yes 

No 

Yes 

No 

lp commands

Solaris 9 and compatible versions 

No 

Yes 

Yes 

Yes 

After using the preceding table to determine which printing tool is best for your network environment, see Chapter 4, Setting Up Printers (Tasks) for printer setup information.

Most printing configuration tasks can be accomplished by using Solaris Print Manager. However, if you need to write interface scripts or add your own filters, use the LP print service commands. These commands underlie Solaris Print Manager. Performing printing administration tasks by using lp commands are described in Chapter 5, Administering Printers (Tasks).

The LP Print Service

The LP print service is a set of software utilities that enables users to print files while the users continue to work.

For background information about the LP print service, see Chapter 8, LP Print Service (Reference).

Other LP print service topics covered and their chapter references are described in the following sections.

Managing Network Printers

A network printer is a hardware device that is connected directly to the network. A network printer transfers data directly over the network to the output device. The printer or network connection hardware has its own system name and IP address.

Network printers often have software support provided by the printer vendor. If your printer has printer vendor supplied software, then use the printer vendor software. If the network printer vendor does not provide software support, Sun supplied software is available. This software provides generic support for network attached printers, but is not capable of providing full access to all possible printer capabilities.

For step-by-step instructions on setting up a network printer, see Chapter 4, Setting Up Printers (Tasks).

Administering Printers

After you set up print servers and print clients, you might need to perform a number of administration tasks frequently:

For step-by-step instructions on how to perform the printer administration tasks, see Chapter 5, Administering Printers (Tasks).

Setting Definitions for Printers

Establishing definitions for the printers on your network is an ongoing task that lets you provide a more effective print environment for users. For example, you can assign printer descriptions for all your site's printers to help users find where a printer is located. Or, you can define a class of printers to provide the fastest turnaround for print requests.

For information on setting up printer definitions, see Chapter 3, Planning Printers on Your Network (Overview).

Administering Character Sets, Filters, Forms, and Fonts

Depending on your site's requirements and the types of printers you have on the network, you might have to set up and administer printer-specific features of the LP print service. For example, you can assign different print wheels, filters, and forms to different printers. For background information and step-by-step instructions on how to set up character sets, print filters, forms, and fonts, see Chapter 6, Managing Character Sets, Filters, Forms, and Fonts (Tasks).

Customizing the LP Print Service

Although the LP print service is designed to be flexible enough to handle most printers and printing needs, the LP print service does not handle every possible situation. You might have a print request that is not accommodated by the standard features of the LP print service. Or, you can have a printer that does not quite fit into the way the LP print service handles printers.

You can customize the LP print service in the following ways:

For detailed descriptions and step-by-step instructions to customize the LP print service, see Chapter 7, Customizing the LP Print Service (Tasks).

The Solaris Print Client-Server Process

This section provides an overview of how Solaris printing works.

The Print Client Process

The following figure illustrates the path of a print request from the time the user initiates the request until the print request is printed.

Figure 2–1 Overview of the Print Client Process

Illustration of the print client process in 5 steps. See the following description of these 5 steps.

  1. A user submits a print request from a print client.

  2. The print command checks a hierarchy of print configuration resources to determine where to send the print request.

  3. The print command sends the print request directly to the appropriate print server. A print server can be any server that accepts BSD printing protocol, including SVR4 (LP) print servers and BSD lpd-based print servers.

  4. The print server sends the print request to the appropriate printer.

  5. The print request is printed.

Using Print Clients

This section of the overview focuses on the print client, a system that can send print requests to a print server, and print commands, which enable the print client to initiate print requests.

The following figure highlights the part of the print process in which the user submits a print request from a print client.

Figure 2–2 The User Submits a Print Request from a Print Client

Illustration of what happens when a user submits a print request. See the following section for a description of these 5 steps.

What is a Print Client?

A system becomes a print client when you install the Solaris print software and enable access to remote printers on the system.

The Solaris print software checks the following resources to locate printers and printer configuration information:

The print client sends its requests to the print server's queue. The client does not have a local queue. The client writes the print request to a temporary spooling area only if the print server is not available or if an error occurs. This streamlined path to the server decreases the print client's use of resources, reduces the chances for printing problems, and improves performance.

Printer Configuration Resources

This section describes the resources that the print software uses to locate printer names and printer configuration information.

The print software can use a name service, which is a network (shared) resource for storing printer configuration information for all printers on the network. The name service, LDAP, NIS, NIS+, or NIS+ (xfn), simplifies printer configuration maintenance. When you add a printer in the name service, all print clients on the network can access the printer.

How the Print Software Locates Printers

The following figure highlights the part of the print process in which the print software checks a hierarchy of printer configuration resources to determine where to send the print request.

Figure 2–3 How the Print Client Software Locates Printers

Illustration of the steps the print client software uses to locate printers. Also shows the various printer sources. See the following description.

  1. A user submits a print request from a print client by using the lp or lpr command. The user can specify a destination printer name or class in any of three styles:

    • Atomic style, which is the lp command and option followed by the printer name or class, as shown in this example.


      % lp -d neptune filename
      
    • POSIX style, which is the print command and option followed by server:printer, as shown in the following example.


      % lpr -P galaxy:neptune filename
      
    • Context-based style, as shown in the following example:


      % lpr -d thisdept/service/printer/printer-name filename
      
  2. The print command locates a printer and printer configuration information as follows:

    • The print command checks to see if the user specified a destination printer name or printer class in one of the three valid styles.

    • If the user didn't specify a printer name or class in a valid style, the command checks the user's PRINTER or LPDEST environment variable for a default printer name.

    • If neither environment variable for the default printer is defined, the command checks the sources configured for the printers database in the /etc/nsswitch.conf file. The name service sources might be one of the following:

      • LDAP directory information tree in the domain's ou=printers container

      • NIS printers.conf.byname map

      • NIS+ printers.conf_dir map

      • NIS+ xfn (FNS) printing contexts

Using Print Servers

The print server is a system that has a local printer connected to it and makes the printer available to other systems on the network. The following figure highlights the part of the print process in which the print server sends the print request to the printer.

Figure 2–4 The Print Server Sends a Print Request to the Printer

Illustration of a print server sending a print request in 5 steps. See the following description of these 5 steps.

  1. Print client submits a print request.

  2. The print request is processed on the print client.

  3. The print request goes to the print server.

  4. The print request goes to the printer.

  5. The print output is produced on the printer.

The BSD Printing Protocol

The print commands use the BSD printing protocol. One of the big advantages of this protocol is that it can communicate with a variety of print servers:

The BSD printing protocol is an industry standard that is widely used because it provides compatibility between different types of systems from various manufacturers. Sun has chosen to support the BSD printing protocol to provide interoperability in the future.

Where to Go From Here

Go to Chapter 4, Setting Up Printers (Tasks) for step-by-step instructions on setting up new printers by using Solaris Print Manager. If you need printer planning information, see Chapter 3, Planning Printers on Your Network (Overview).