System Administration Guide: Printing

Chapter 1 Introduction to Printing in the Oracle Solaris Operating System

This chapter provides an introduction to printing in the Oracle Solaris operating system (OS). Conceptual information about printing services, tools, and protocols is described. Each of the subsequent chapters in this book describe how to use these tools, protocols, and technologies to administer printing services and printers.

Several terms and concepts that are introduced in this chapter are used frequently throughout this book. To fully grasp printing concepts, a basic understanding of these concepts and terms is essential. For a complete listing of all the printing concepts and terms, see Glossary.

This is a list of the information that is in this chapter.

What's New in Printing?

This section describes new and changed printing features in this Oracle Solaris release. For a complete listing of new features and a description of Oracle Solaris releases, see Oracle Solaris 10 9/10 What’s New.

Privilege Requirements for Using Print Commands

The design of the Open Standard Print API (PAPI) implementation in the Oracle Solaris release makes it no longer necessary for applications, toolkits, and print commands to run with elevated privilege to interact with print services.

As a result, the following print commands are no longer installed SUID root:

Previously, these commands were installed SUID root because the commands required an elevated privilege for the following purposes:

This functionality is now localized in a small helper application, /usr/lib/print/lpd-port. As a result, any applications that use the RFC-1179 PAPI support no longer require elevated privilege. The lpd-port helper application contains minimal support for passing RFC-1179 protocol requests on a reserved port and allocating sequential job-id numbers. Although the helper application is installed SUID root, all elevated privileges are dropped until they are required. When necessary, the privilege is elevated for the required operation and then permanently dropped if the elevated privilege is no longer required. In the Oracle Solaris release, this process is accomplished through the use of privileges. On other platforms, the process is accomplished by using the setuid, seteuid, or setreuid functions.

If you have local printers that you do not want to share on the network, you can safely disable the printing network listeners. If you are running the Oracle Solaris release, or a CUPS server, the lpstat command provides you with more information about remote print queues and print jobs, as well as their capabilities when using IPP to communicate with those servers.

When IPP is in use, and with the proper authorization, the following operations can be performed on remote print queues and print jobs:

Also, you can now move print requests between queues on a print server and modify print requests remotely when IPP is in use.

For more information, see the privileges(5) man page. For step-by-step procedures, see Administering Printers on a Network When Using the Internet Printing Protocol (Task Map).

PPD File Management Utility

Solaris 10 5/08: The PPD File Manager, /usr/sbin/ppdmgr, is a utility for administering PostScriptTM Printer Description (PPD) files that are used with the print subsystem. When you add a PPD file to the system by using the ppdmgr utility or the lpadmin command with the -n option, a cache of PPD file information is automatically updated. This cache is used by Solaris Print Manager.

For more information, see Administering PPD Files by Using the PPD File Management Utility (Task Map) and the ppdmgr(1M) man page.

Overview of the Oracle Solaris Printing Architecture

At the core of the print system is a UNIX System V (R4) based spooler. In addition to the spooler are client applications that are used to make requests of and manage the spooler. filters that perform document translation, back end processing software that performs final document transformation , and device (printer) communication. To utilize the complete functionality of the print system, all these resources are required.

Printing in the Oracle Solaris OS consists of the software to support the following:

The following figure is a high level diagram that represents the print system components.

Figure that
shows LP client-server relationship, with applications that use the
print service. The surrounding text provides details.

Recent changes in Oracle Solaris printing include the integration of IPP client-side support, implemented through the PAPI. The Berkeley Software Distribution (BSD) and System V (SysV) commands, as well as some applications, are layered on top of the PAPI interface. See Implementation of the Open Standard Print API.

Available Printing Tools and Services

The following tools can be used to set up and manage printers in the Oracle Solaris 10 OS:

The following interfaces, protocols, and technologies are supported in the Oracle Solaris release:

Implementation of the Open Standard Print API

The Oracle Solaris implementation of the Open Standard Print API, also referred to as PAPI, makes it possible to layer applications, toolkits and print commands on top of a print service, protocol neutral interface. This implementation can be used with RFC-1179, IPP-based, and LP-based printing services. Printer, server, and job attributes, as well as job submission and queries to a printer, are among the supported PAPI functions. This support enables the print client, be it an application, or the print commands themselves, to query the print system about the characteristics of a printer and to request information.

For more information, see the following references:

Print Client Commands

Historically, printing commands have been tied to a specific print system because they have been implemented on top of print system specific protocols and interfaces. Examples include the IPP, BSD, LPR, SysV LP, and LPRng, printing protocols. The introduction of the PAPI, makes it possible to layer these print commands on top of a print service, protocol neutral, interface

The PAPI provides applications a single interface for print service interaction. This means that applications can be written to use this interface and work with a variety of print services without requiring changes to the applications. Applications are no longer tied to a particular print service, such as the LP print service or CUPS. Instead, print services can easily be replaced on a system without impacting the protocol or application layers above. Ultimately, print services can be both developed and selected based on specific needs.

The PAPI implementation in the Oracle Solaris OS provides both server-side and client-side support for IPP, which is layered on top of the PAPI. IPP is implemented as a set of protocol-specific libraries and an Apache module. Like the command implementations, the IPP Listening Service can be used with any printing service that supports the PAPI. Server-side support for the RFC-1179 protocol is also available.

Definition of a Print Server and a Print Client

A print server is a system on which a print queue is configured and makes the printer available to other systems on the network. A print client is a system that utilizes configured print queues.

Printers can also be divided into two categories, local and remote. A local printer refers to a print queue that has been defined on a system that is local to you. A remote printer refers to a print queue that is defined anywhere but your local system. These terms do not have anything to do with whether the printer is physically attached to a system or to the network, but rather where the print queue was configured. Where the print queue is configured determines the server for that printer. Often, the print server supporting a building full of printers is the same system.

Another way to view printers and printer setup is how they are connected to the world. Some printers are directly attached to the print server by a wire. These printers are referred to as attached printers. If a printer is attached to the network, rather than to a desktop or server, it is referred to as a network—attached printer. The terms local and remote refer to print queue configuration. The terms directly attached and network-attached refer to the physical connection of the printer hardware. Referring to a printer as an attached or a network-attached printer defines the way the printer is physically connected. When you are referring to a local or a remote printer, you are referring to how the print queue for that printer was defined. Sometimes, the use of these terms can be confusing, because a printer that is physically attached to a system also most likely has a print queue that was defined on a local system. Similarly, print queues for network printers are more than likely defined on a system that is remote to your local system. This is the reason that attached and network printers are often referred to as local and remote printers.

Description of the Internet Printing Protocol

IPP is a fairly recent industry standard network printing protocol that is used for client-to-server and server-to-printer communications. This protocol provides a basic model that includes printers and jobs, standard attributes for these printers and jobs, and a set of standard operations that can be performed against these printers and jobs. Because the objects, attributes, and operations are standardized, IPP is a method for communicating between client and server systems. In the Oracle Solaris OS, server-side support for this protocol is provided by an IPP listening service. IPP client-side support in the Oracle Solaris OS is implemented through the PAPI. IPP printer support is available through the URI interface script.

For step-by-step procedures and additional background information that is in this document, see Configuring the Internet Printing Protocol and Appendix A, Using the Internet Printing Protocol.

Description of the RFC-1179 Printing Protocol

Also referred to as the BSD protocol, the RFC-1179 protocol is an existing over-the-wire protocol that is widely used for communicating between print clients and servers and network-attached printers that are configured by using the LP print service or Solaris Print Manager. The Request for Comments (RFC) 1179 describes the protocol that a line printer daemon client uses to control printing. Developed originally for BSD UNIX, the RFC-1179 printing protocol has long been the cross-platform standard for printing. You can use this protocol to perform basic printing tasks, such as submitting and canceling print jobs, and obtaining print job status. The RFC-1179 protocol is able to communicate with LPD-based print servers and any other print server that accepts the BSD printing protocol. Many network-attached printers offer this protocol as an option for transferring job data.

IPP Compared to the RFC-1179 Protocol

The RFC-1179 protocol has served for decades as the standard network printing protocol. The protocol was originally designed to perform a very limited set of operations. The RFC-1179 protocol lacks a common representation for status information. In addition, this protocol offers only basic print job options. Conversely, the design of IPP includes features that are lacking in the RFC-1179 and BSD protocols. With IPP, a broad set of operations can be performed. These operations make use of a core set of common attributes by using a common representation and encoding method. Also, IPP enables encryption and authentication to be used between a print client and a print server. Finally, IPP provides a means for extending operations and attributes, while maintaining backward compatibility and interoperability. One of the results of the evolution of the RFC-1179 protocol is that it has several conflicting vendor extensions to overcome, making IPP the preferred choice of printing protocols.

For more information about using IPP to set up and administer printers, see Configuring the Internet Printing Protocol and Appendix A, Using the Internet Printing Protocol.

Description of the SMB Protocol

The SMB protocol is an application-level network protocol that is primarily used for sharing printers, access to files, serial ports, and miscellaneous communications between nodes on the network. Mainly used by Windows systems, SMB is an authenticated inter-process communication mechanism. In the Oracle Solaris OS, the SMB protocol is used primarily for sharing printers. All of these processes take place over the network. SMB can run over multiple protocols.

SMB works through a peer-to-peer approach. A client makes a specific requests to a server, and the server responds accordingly. SMB servers make their file systems and other resources available to clients on the network. In the Oracle Solaris OS, SMB includes Samba server-side support that is managed by the Service Management Facility (SMF) and Samba smbclient client-side support. To access a Windows hosted printer, setup of a local print queue is required. This requirement is due to differences in UNIX and Windows printing models.

What Is Samba?

Samba is an open-source SMB server freeware application that uses the SMB protocol. Samba provides Windows clients access to UNIX servers and UNIX clients access to Windows servers. The access that is provided is for both files and other services, including printer sharing. Samba's design, as well as constraint, is to operate on top of a variety of existing UNIX systems. Samba runs as a set of daemons and services, without any need for modification of existing kernels. More information about Samba can be found at http://www.samba.org.

Using Printing Protocols in the Oracle Solaris Release

The printing architecture in the Oracle Solaris OS uses network printing protocols to communicate with print services in following ways:

The Oracle Solaris software provides applications, toolkits, printing commands, and an application programming interface that interacts with print services. This API is called the PAPI. The PAPI consists of a front-end API implementation that dynamically loads back end print service or protocol modules that communicate directly with print services. These print services contain the print job or print queue that is being acted upon. Client-to-server communications include the RFC-1179 and IPP protocols, as well as support for communicating with a local LP print service. For server-to-printer communications, the network printing protocol support enables the print service to transmit print jobs directly to network-attached printers.

Server-to-printer communications for the LP print service and Solaris Print Manager include support for the following network protocols:

Determining Which Printing Protocol to Use

The print System uses two over-the-wire protocols for sending print requests from a print client to the print server. The following table describes the printing protocols that can be used for printing in the Solaris OS.

Table 1–1 Supported Printing Protocols

Network Printing Protocol 

Server-Side Support? 

Client-Side Support? 

For More Information 

Internet Printing Protocol (IPP) 

Server-side support for the IPP listening service is available, starting with the Oracle Solaris 10 release. 

Supported in some Oracle Solaris releases. 

Configuring the Internet Printing Protocol

RFC-1179 protocol 

Supported in all Oracle Solaris releases. 

Supported in all Oracle Solaris releases. 

Description of the RFC-1179 Printing Protocol

SMB protocol, through Samba 


Note –

The SMB protocol, through Samba, is an implementation that enables interoperability between Linux and UNIX servers, and Windows-based clients.


Supported, starting with the Solaris 9 OS. 

Supported, starting with the Solaris 9 OS. 

Description of the SMB Protocol

Selecting the Client-To-Server Network Printing Protocol

Applications, toolkits, and printing commands select the protocol to use for client-to-server communications, based on the value of the printer-uri-supported attribute that is found in the printers.conf database entry for the specified print queue. This value is automatically generated and populated when access to a remote print queue is configured by using the lpadmin command or when an application uses the interface that is being referenced to perform an action or actions.

For example, when printing a document while using Mozilla, the path that is followed to gain access to the printer is:

Mozilla -> lp -> PAPI

For more information, see the printers.conf(4)

The lpadmin command generates printer-uri-supported values using the following format:

{ipp|lpd}://server/printers/queue

To determine which URI to use in the printers.conf database, the lpadmin command probes the remote print service. If the remote print service supports IPP, this protocol is preferred over the BSD protocol. However, you can override automatic protocol selection by specifying the -soption with the lpadmin command, then supplying a different URI. For more information, see the Printer URI Formats That Are Supported.

The LP print subsystem uses the BSD print protocol, also referred to as the RFC-1179 protocol, and raw Transmission Control Protocol (TCP), the basic communication language or protocol of the Internet, to communicate with the printer. If you are setting up a printer that includes printer vendor documentation, information about which protocol to use is provided. The TCP protocol is the protocol that is most often used for printing on the network.

Printer URI Formats That Are Supported

The following table describes supported printer URI formats:

Table 1–2 Supported URI Formats

Command 

URI Format 

lpsched

lpsched://localhost/printers/queue

This printer URI scheme can only be used to contact a local LP service to access the print queue that is specified in the URI. 

lpd

lpd://localhost/printers/queue[#extensions]

Use this URI format to contact local or remote print services for the purpose of accessing a print queue on the host that specified in the URI. An optional #extensions can be specified, for example, #solaris. When #solaris is specified, the host processes Solaris extensions to the RFC-1179 protocol during print job submissions.

Selecting the Server-To-Printer Network Printing Protocol

Network-attached printers often support more than one method of communicating with a print service. The most common method of communicating with the print service is through a raw TCP connection to a well-known port on the device. Other methods of communication include the RFC-1179 and IPP network protocols. You can select the server-to-printer communication protocol when adding a new print queue in one of following ways:

When determining which protocol to use for server-to-printer communication, consult the vendor printer documentation for more specific information. Documentation includes information such as TCP port numbers, RFC-1179 printer names, and the IPP printer URIs that are supported by the device. In most instances, a raw TCP socket communication is likely to provide the most reliable results.

Also, note that due to differences between printing services on UNIX and Windows platforms, Windows hosted printers should be configured as network-attached printers and administered as such. These types of printers require the creation of a print queue if you are using them on a Oracle Solaris system. These printers might also use the SMB protocol for server-to-printer communication. For more information about the SMB protocol, see Description of the SMB Protocol.

For more information about setting up printers and configuring print queues, see Setting Up Printers by Using Solaris Print Manager (Task Map) and Setting Up Printers by Using LP Print Commands (Task Map).

Description of Solaris Print Manager

Solaris Print Manager is a JavaTM technology-based GUI that enables you to manage local and remote printing configuration. This tool can be used in the files, LDAP, NIS, and NIS+ naming service environments.

To use this tool, you must meet the following requirements:

Solaris Print Manager centralizes printer information when the information is used in conjunction with a naming service. Using a naming service for storing printer configuration information is the preferred method, because a naming service makes printer information available to all systems on the network. This method provides easier printer administration. Solaris Print Manager recognizes existing printer information on print servers, print clients, and in the naming service databases. No conversion tasks are required to use Solaris Print Manager as long as the print clients are running at least the Solaris 2.6 release.

The Solaris Print Manager package is SUNWppm.

Description of the LP Print Service

The LP print service is a set of software utilities that enables users to print files while continuing to work. Originally, the print service was called the LP spooler. LP represents line printer, but the meaning now includes many other types of printers, such as laser printers. Spool is an acronym for Simultaneous Peripheral Operations Online.

The LP print service consists of the LP print service software, any print filters you might provide, and the hardware, such as the printer, system, and network connections.

Solaris 10 5/08: The LP print client commands make use of the PAPI to interact with Solaris LP (lpsched), RFC-1179 (BSD/LPD protocol), and IPP-based servers. IPP support is capable of interacting with CUPS servers by using its native IPP service. With the introduction of this API support, several common BSD and SysV printing commands use the PAPI interface. As a result, the new command implementations work with a number of existing print services. A portion of this development includes server-side support for IPP that is also layered on the API. This support is implemented as a set of protocol-specific libraries and as an Apache module, Versions 1 and 2. Similar to the print command implementation, the IPP listening service can be used with any print service that has PAPI support. The RFC-1179 server-side support is also layered on the PAPI.

For additional information about the LP print service, see LP Print Service.

The LP Print Client-Server Process

This section provides an overview of the print client-server process that is used by the LP print service.

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 1–1 The Print Server Sends a Print Request to the Printer

Figure that shows a
print server sending a print request in 5 steps. See the following description
of these 5 steps.

  1. The 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.

Using Print Clients

A print client is a system that can send print requests to a print server.

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

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

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

Print Client Process Used by the LP Print Service

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 1–3 Overview of the Print Client Process

Figure that
shows 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 Berkley Software Distribution (BSD) printing protocol, including System V Release 4 (SVR4), or LP print servers and BSD LPD-based print servers, as well as servers that accept IPP.

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

  5. The print request is printed.

How Local Printing Works

The print request follows the same path it would if the client and server were separate systems. Requests always flow from client to server following the same path.

The following figure shows what happens when a user submits a request to print a PostScript file on a local printer, which is a printer connected to the user's system. The lpsched daemon on the local system does all processing.

This processing might include the following:

The printer interface program does the following:

Figure 1–4 Local Printing Process

Figure is described in the surrounding text.

How the LP Print Service Administers Files and Schedules Local Print Requests

The LP print service has a scheduler daemon called lpsched. The scheduler daemon updates the LP system files with information about printer setup and configuration.

The lpsched daemon schedules all local print requests on a print server, as shown in the following figure. Users can issue the requests from an application or from the command line. Also, the scheduler tracks the status of printers and filters on the print server. When a printer finishes a request, the scheduler schedules the next request n the queue on the print server, if a next request exists.

Figure 1–5 LP Print Service Print Scheduling Process

Graphic is described in the surrounding text.

Without rebooting the system, you can stop the scheduler with the svcadm disable application/print/server command. Then, restart the scheduler with the svcadm enable application/print/server command. The scheduler for each system manages requests that are issued to the system by the lp command.

How Remote Printing Works

The following figure shows what happens when a user on a print client submits a print request to an LPD-based print server. The command opens a connection and handles its own communications with the print server directly.

Figure
that shows how a print client sends a print request to
an LPD-based print server where it is accepted, spooled, and scheduled for
printing.

The following figure shows an LPD-based print client submitting a print request to a print server. The lpd daemon handles the local part of the print request and the connection to the print server. On the print server, the inetd process waits for network printing requests and starts a protocol adaptor to service the request. The protocol adaptor communicates with the lpsched daemon, which processes the request on the print server.

Figure 1–6 Remote Print Process

Figure is described in surrounding text.

The following figure shows what happens when a user on a print client submits a print request to a Solaris print server. The print command on the print client handles the local part of each print request by communicating directly with the print server.

Figure 1–7 How a Print Request Is Processed

Figure is described in surrounding text.

The inetd process on the print server monitors network printing requests and starts a protocol adaptor to communicate with the lpsched daemon on the print server, which processes the print request.

Where to Find Printing Tasks

Table 1–3 Printing Tasks

Printing Task 

Topics Covered 

For More Information 

Set up and administer network printing protocols. 

Setting up the IPP, RFC-1179, and SMB network printing protocols. 

Chapter 3, Setting Up Network Printing Services (Tasks)

Set up and administer printers by using Solaris Print Manager. 

Setting up print servers, adding directly attached and network-attached printers, and adding print clients. 

Chapter 4, Setting Up and Administering Printers by Using Solaris Print Manager (Tasks)

Set up and administer printers by using LP print commands. 

Setting up print servers, adding directly attached and network-attached printers, and adding print clients. 

Chapter 5, Setting Up Printers by Using LP Print Commands (Tasks)

Administer printers. 

Administering printers and print requests. 

Chapter 6, Administering Printers by Using LP Print Commands (Tasks)

Customize printing services and printers. 

Customizing printing services. Administering character sets, print forms, print filters, and print fonts. 

Chapter 7, Customizing LP Printing Services and Printers (Tasks)

Administer printers on a network. 

Administering printers and print jobs that use the IPP, the RFC-1179, and the SMB network protocols. 

Chapter 9, Administering Printers on a Network (Tasks)

Administer PPD files by using the PPD File Manager (ppdmgr).

Administering PPD Files on a system by using the ppdmgr utility.

Chapter 11, Administering Printers by Using the PPD File Management Utility (Tasks)