This chapter provides information about planning for printer setup by using Solaris Print Manager or the LP print service.
This is a list of the information that is in this chapter:
The following sections describe printing services, tools, and protocols that you might choose to use for setting up and administering printers in the Oracle Solaris release. Each tool, service, and protocol has advantages and disadvantages. Some tools and services are more appropriate for specific uses, while others can be used for all, or most, printing tasks that you might perform. Unless otherwise mentioned, the following printing tools are available in the Oracle Solaris 10 and compatible Oracle Solaris releases. Also, all of these printing services and tools use LDAP, NIS, and NIS+.
This section describes the tools you can use to perform printer setup and related tasks.
The following tools are available in the Oracle Solaris release:
Solaris Print Manager
PPD File Manager (ppdmgr)
Solaris Print Manager
Solaris Print Manager, /usr/sbin/printmgr, is a Java technology-based GUI that you use to perform setup tasks for local and remote printers, either directly attached and network-attached.
For directly attached and network-attached printers, you can perform the following tasks:
Create a print queue.
Modify a print queue.
Delete a print queue.
For remote printers, you can use Solaris Print Manager to define access to the print queue. Note that a remote printer is a printer that has a print queue that is defined on a system other than the local system. For more information about terminology that is commonly used in this book, see Glossary.
The lpadmin command, /usr/sbin/lpadmin, is a command-line tool that you can use to perform all of the tasks that you can perform by using Solaris Print Manager performs. Several additional tasks that cannot be performed by using Solaris Print Manager can be performed by using the lpadmin command. For more information, see Printer Definitions.
PPD File Manager
You can use the PPD File Manager utility, /usr/sbin/ppdmgr, to administer PPD files on Oracle Solaris systems. The PPD File Management utility is the preferred method for adding PPD files to a system's PPD file repository. For more information, see Chapter 11, Administering Printers by Using the PPD File Management Utility (Tasks).
For printer setup, the Solaris Print Manager tool is easier and more convenient to use than the lpadmin command. These tools provide sufficient printer attributes in most situations. However, you might need to use the lpadmin command when setting up printers with printer attributes that cannot be defined by using Solaris Print Manager.
For more information about setting up printers, see Chapter 4, Setting Up and Administering Printers by Using Solaris Print Manager (Tasks) and Chapter 5, Setting Up Printers by Using LP Print Commands (Tasks).
Planning for printer setup and administration includes the following activities:
Defining attributes of printers, such as printer name, printer description, printer port
Selecting a printer make, model, and driver (for setting up printers with PPD files)
Selecting a printer type and file content type (for setting up printers without PPD files)
Determining which PPD file to use (for setting up printers with PPD files)
Setting up a default printer destination
Determining whether you want to print banner pages
Limiting user access to printer
Setting up printer classes
Setting up fault notification
Setting up fault recovery
The goal of setting up printers on a network is to give users access to one or more printers. As an administrator, you must determine whether each printer would be best used if it is dedicated to one system or available to many systems. In a network environment, distribute your printers on several print servers. The advantage of setting up several print servers is that when one print server has a problem, you can route print requests to other print servers.
If you use a centralized print configuration, you can still connect printers to user systems for convenience or for improved response. A printer that is connected to a user system is still available to other systems on the network.
The following figure shows an example of how you can have a centralized print configuration and still connect printers to users' systems.
The printing software uses certain resources to locate printer names and printer configuration information. The printer software may be configured to use a naming service to advertise the printers. The naming service can be used for storing printer configuration information for all printers on the network. The naming service, LDAP, NIS, or NIS+, simplifies printer configuration maintenance. When you add a printer in the naming service, all print clients on the network can access the printer.
The printers database in /etc/nsswitch.conf, the naming 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 naming 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, or NIS+ environments are described in the following table.
naming service Type
Default printers Entry
printers: user files
printers: user files ldap
printers: user files nis
For example, if your naming service is NIS, printer configuration information on print clients is searched for in the following sources in this order:
user – Represents the user's $HOME/.printers file
files – Represents the /etc/printers.conf file
nis – Represents the printers.conf.byname table
For more information, see the nsswitch.conf(4) man page and System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).
Adding printer information to a naming service makes access to printers available to all systems on the network. Doing so makes printer administration easier because all of the information about printers is centralized.
Naming Service Configuration
Actions to Centralize Printer Information
Use a naming service
Adding the printer to the LDAP, NIS, or NIS+ database makes the printer available to all systems on the network.
Do not use a naming service
Adding the printer adds the printer information to the printer server's configuration files only. Print clients will not automatically know about the printer.
You will have to add the printer information to every print client that needs to use the printer.
Keep the following in mind when you manage printer information in the LDAP naming service:
Solaris Print Manager uses the ldapclient command to determine the default LDAP server name. If more than one server is specified, the first server is automatically selected. For more information, see ldapclient(1M).
Solaris Print Manager always displays printer entries from the current LDAP server. If the current LDAP server is not the domain's LDAP master server, the list of printers displayed might not be the current list of printers. The LDAP replica server might not have been updated by the master server, and as a result, is out of sync with the master. Replica servers can have various update replication agreements. For example, a change is made on the master, and the replica servers can be updated immediately or once a day.
If the selected LDAP server is an LDAP replica server, any updates are referred to the master server and are done there. This situation again means that the printer list could be out of sync with the master server. For example, a deleted printer might still appear in the displayed printer list until the replica is updated from the master server.
Users can use the LDAP command-line utilities, ldapadd and ldapmodify, to update printer entries in the directory. However, this method is not recommended. If these utilities are used, the user must ensure that the printer-name attribute value is unique within the ou=printers container. If the printer-name attribute value is not unique, the result of modifications done by Solaris Print Manager, or by the lpset command, might not be predictable.
The following figure highlights the part of the print process in which the printing software checks a hierarchy of printer configuration resources to determine where to send the print request.
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 this example:
% lpr -P galaxy:neptune filename
Context-based style, as shown in this example:
% lpr -d thisdept/service/printer/printer-name filename
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 naming 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
You must decide which systems will have local printers physically attached to them. You must also decide which systems will use printers on other systems. A system that has a local printer attached to it and makes the printer available to other systems on the network is called a print server. A system that sends its print requests to a print server is called a print client.
The LP print service software provides printing services in the Oracle Solaris OS. Besides physically connecting a printer to a system, you must define the printer server characteristics to the LP print service. Once you have print servers set up, you can set up other systems as print clients.
Print servers and print clients can run different versions of the Oracle Solaris release and different versions of the UNIX operating system. Print clients running the Solaris 9 release and compatible versions can print to print servers that are running an LPD-based print service, such as the SunOS 4.1, BSD UNIX, and Linux releases. In addition, print clients running an lpd-based print service can print to print servers running the Solaris 9 release and compatible versions.
You can attach a printer to a stand-alone system or to any system on the network. Any networked system with a printer can be a print server, as long as the system has adequate resources to manage the printing load.
Spooling space is the amount of disk space that is used to store and process requests in the print queue. Spooling space is the single most important factor to consider when deciding which systems to designate as print servers. When users submit files for printing, the files are stored in the /var/spool/lp directory until the files are printed. The size of the /var directory depends on the size of the disk and how the disk is partitioned. Spooling space can be allocated in the /var directory on the print server, or mounted from a file server and accessed over the network.
When evaluating systems as possible print servers, consider their available disk space. A large spool directory can consume 600 Mbytes of disk space. Evaluate the size and division of disk space on systems that can be designated as print servers.
Also, carefully evaluate the printing needs and use patterns of print client systems. For example, assume that users in a small group typically print only short email messages, which are simple ASCII files without sophisticated formatting requirements. In this example, a print server with 20 to 25 Mbytes of disk space allocated to the /var directory is probably sufficient. If, however, many print client users are printing large documents, bit mapped images, or raster images, the users will likely fill the spooling space quite frequently. When users cannot queue their jobs for printing, work flow is interrupted. Requests for more spooling space can force you to either add disk space for spooling or designate a different system as the print server.
If the print server has a /var directory that is too small, and a larger file system is available, you can mount the larger file system on the /var directory for additional spooling space. For information about mounting file systems and editing the vfstab file, see Mounting File Systems in System Administration Guide: Devices and File Systems.
A print server does not require additional memory. However, you might find that more memory improves performance in managing print requests.
The swap space allocation on the print server should be sufficient to handle LP print service requirements. For information about how to increase swap space, see Chapter 20, Configuring Additional Swap Space (Tasks), in System Administration Guide: Devices and File Systems.
For optimal performance, the print server should have a hard disk and a local /var directory. You should mount spooling space for a print server on a local hard disk. If a print server has its own hard disk and a local /var directory, printing is much faster. And, you can more accurately predict the time needed to process print requests.