This chapter provides information about planning for printer setup. Also include is information about distributing printers across your network to gain the best efficiency.
This is a list of overview information 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 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, all of the following printing tools are available in the Solaris Express, Solaris 10, and compatible 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:
Solaris Print Manager
lpadmin command
PPD File Manager (ppdmgr)
OpenSolaris Print Manager (in the GNOME Desktop Environment)
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.
lpadmin Command
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 Setting Printer Definitions.
PPD File Manager
You can use the PPD File Manager utility, /usr/sbin/ppdmgr, to administer PPD files on 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 9, Administering Printers by Using the PPD File Management Utility (Tasks).
OpenSolaris Print Manager GUI
The OpenSolaris Print Manager GUI is available in the GNOME Desktop Environment. When you initiate your desktop session, the tool is started. The tool monitor printing events, such as when a printer is attached to a system or detached from a system. When you connect a new printer, the system discovers the device through the Hardware Abstraction Layer (HAL) and begins the print queue configuration process. A dialog that contains preconfigured printer information is displayed, enabling you to configure the new printer or reconfigure a print queue for an existing printer. For more information, see Automatic Printer Discovery and Configuration in the Desktop Environment.
To use all of the features of the Print Manager tool, you must be running at least the Solaris Express 1/08 release. For more information about this support, see Chapter 10, Setting Up and Administering Printers From the Desktop (Tasks).
For printer setup, the GNOME Desktop tools and the Solaris Print Manager tools are 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 or GNOME Desktop tools.
For more information about setting up printers, see Chapter 4, Setting Up Printers (Tasks).
The Solaris 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 2–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 Solaris 10 release. |
IPP client-side support is available, starting with the Solaris Express 8/06 release. | |
RFC-1179 protocol |
Supported in all Solaris releases. |
Supported in all Solaris releases. | |
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. |
This section provides an overview of planning for printing that includes the following:
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
Setting definitions for printers is an ongoing task that lets you provide a more effective print environment for users. For example, you can assign parameters 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.
The following table describes printer definitions that you can set by using the lpadmin command. Also included is information about whether you can set these printer definitions by using Solaris Print Manager. For more information about setting up printers, see Chapter 4, Setting Up Printers (Tasks)
Definition |
Description |
Example |
Default |
Required? |
Available in Solaris Print Manager? |
---|---|---|---|---|---|
Printer Name |
Name of printer |
laser1 |
N/A |
Required to install an attached or network printer and to add access to a print queue |
Available |
Print server |
Name of print server |
venus |
Use localhost for Printer Server attribute check box selected by default |
Required to install an attached or network printer and to add access to a printer — this field is filled in by the tool. |
Available |
Description |
User defined string |
laser printer near breakroom |
N/A |
Optional |
Available |
Printer Port |
Device that the printer is attached to |
/dev/term/a |
/dev/term/a |
Required to install an attached printer |
Available |
Printer Type |
Type of printer |
unknown |
PostScript |
Required to install an attached printer or a network printer without PPD files |
Available |
File Content Type |
Content to be printed |
any |
PostScript |
Required to install an attached printer or a network printer without PPD files |
Available |
Printer Make |
Make of printer |
Lexmark |
N/A |
Required to install an attached printer or a network printer with PPD files |
Available |
Printer Model |
Model of printer |
Lexmark Optra E312 |
N/A |
Required to install an attached printer or a network printer with PPD files |
Available |
Printer Driver |
Driver that is used by specifying PPD file |
Foomatic/PostScript |
N/A |
Required to install an attached printer or a network printer with PPD files |
Available |
Destination |
Destination name for the network printer |
For examples, see Selecting the Destination Name (Also Called the Network Printer Access Name) |
N/A |
Required to install a network printer |
Available |
Protocol |
Protocol used to communicate with the printer |
TCP, URI |
BSD |
Required to install a network printer |
Available |
Fault Notification |
Specifies how to notify user of errors |
Mail to superuser |
Write to superuser |
Optional |
Available |
Default Printer |
Identifies the default printer |
N/A |
N/A |
Optional |
Available |
Banner Page |
Specifies to print a banner page |
N/A |
Set to On, unless otherwise specified |
Optional |
Available |
User Access List |
List of users allowed to print on the print server |
rimmer,lister |
All users can print |
Optional |
Available |
Printer Class |
Specifies a class of printers by printer type, location, or work group or department. |
lpadmin -p luna -c roughdrafts |
N/A |
Optional |
Not Available |
Fault Recovery |
Defines recovery options for printers. |
lpadmin -p mars -A 'mail joe' -W 5 |
N/A |
Optional |
Not Available |
For more information about using LP print commands to set or reset printer definitions, see Setting Printer Definitions by Using LP Print Commands.
When adding a printer to a system, you specify a printer name for the printer.
A printer name must adhere to these guidelines:
The printer name must be unique among all printers within the bounds of an administrative domain.
The printer name can have a maximum of 14 alphanumeric characters, which can include dashes and underscores.
Printer names can now include a dot (.) and be up to 255 characters in length.
The printer name should be easy to remember and can identify the type of printer, its location, or the print server name.
Establish a naming convention that works for your site. For example, if you have different types of printers on the network, including the printer type as part of the printer name can help users choose an appropriate printer. For instance, you could identify PostScript printers with the letters PS. However, if all of the printers at your site are PostScript printers, you would not need to include the initials PS as part of the printer name.
The print server is the system that has a local printer connected to it and makes the printer available to other systems on the network.
You can assign a description to a printer by using the lpadmin -D command or by using Solaris Print Manager. The printer's description should contain information that helps users identify the printer. You might include the room number where the printer is located, the type of printer, the manufacturer, or the name of the person to call if printing problems occur.
Users can view a printer description by using the following command:
$ lpstat -D -p printer-name |
When you initially install a printer, or later change its setup, you can specify the device, or the printer port, to which the printer is connected. You can use either Solaris Print Manager or the lpadmin -p printer-name -v device-name command to specify the device or printer port.
Most systems have two serial ports, plus a parallel port or USB ports. Unless you add ports, you cannot directly connect more than two serial printers and a parallel printer, or two USB printers, to one system.
You can select the following printer port types by using Solaris Print Manager. These options give you as much flexibility as using the lpadmin command.
Printer Port Type |
Corresponding Device Name Options |
---|---|
Serial |
/dev/term/a |
Serial |
/dev/term/b |
Parallel |
/dev/printers/0 —> /dev/ecpp0 |
USB |
/dev/printers/[1–9] |
Specify any port name that the print server recognizes |
Other |
The LP print service initializes the printer port by using the settings from the standard printer interface program. For more information about printer interface programs, see Administering Print Filters. If you have a parallel printer or a serial printer for which the default settings do not work, see Adjusting Printer Port Characteristics.
If you use multiple ports on an x86 based system, only the first port is enabled by default. The second port, and any subsequent ports, are disabled by default. To use more than one port, you must manually edit the device driver port configuration file for each additional asy (serial) port or ecpp (parallel) port. The path names for the x86 port configuration files are the following:
/kernel/drv/asy.conf
The printer type is a generic name for a type of printer. Printer type identifies the terminfo database entry that contains various control sequences for the printer. By convention, printer type is usually derived from the manufacturer's model name. For example, the printer type name for the DECwriter printer is decwriter. However, the common printer type PS does not follow this convention. PS is used as the printer type for many models of PostScript printers, such as the Apple LaserWriterI and Apple LaserWriterII printers. For more information about the terminfo database, see The terminfo Database.
You can specify the printer type by using the lpadmin -T command or Solaris Print Manager.
In this Solaris release, you can assign a printer type with Solaris Print Manager if you deselect the Use PPD files default attribute in the Print Manager drop-down menu in Solaris Print Manager. This printer definition is not available when the Use PPD files attribute is selected. When you add a printer with PPD files, the printer make, model, and driver printer definitions replace the printer type definition.
For a local PostScript printer, use a printer type of either PostScript (PS) or Reverse PostScript (PSR). If your printer supports PostScript, choose PS or PSR, even if the specific printer type is listed in the terminfo database.
If your PostScript printer prints pages face up, documents appear to be printed backwards. As such, the first page is at the bottom of the stack and the last page is on the top. If you specify the printer's type as PSR, the LP print service reverses the order of the pages before sending the pages to the printer. The last page is printed first, and the pages are stacked in forward order. However, the LP print service can reliably change the page order only for PostScript files that conform to the Adobe® Technical Note #5001, PostScript Language Document Structuring Conventions Specification. This document is available on the Adobe Developer Relations web site.
If a printer can emulate more than one kind of printer, you can assign several printer types by using the lpadmin -T command. If you specify more than one printer type, the LP print service uses the printer type that is appropriate for each print request.
You might not find the printer type in the appropriate terminfo directory. The type of printer is not necessarily linked to the manufacturer's name on the printer. For example, for any type of PostScript printer, you can use the PS or PSR entry, found in the /usr/share/lib/terminfo/P directory, instead of an entry specific to the manufacturer or product name.
If you have an unusual type of printer, you might need to try different entries before you can determine whether a particular terminfo entry works for your type of printer. If possible, find an entry in the terminfo database that works for your printer. Trying to use an existing entry is much easier than trying to create an entry. If you must create your own entry, Adding a terminfo Entry for an Unsupported Printer contains some useful tips.
In this Solaris release, to assign the file content type printer definition by using Solaris Print Manager, first deselect the Use PPD files default attribute in the Print Manager drop-down menu in Solaris Print Manager. You cannot select a file content type if you use PPD files. The default file content type for printers that are associated with PPD files is PostScript. This file content type is automatically set by the tool. You can also specify file content type by using the lpadmin -I command.
Print filters convert the content type of a file to a content type that is acceptable to the destination printer. The file content type tells the LP print service the type of file contents that can be printed directly, without any filtering. To print without filtering, the necessary fonts must also be available in the printer. You must set up and use filtering for other types of files.
Most printers can print directly the following types of files:
The same type as the printer type. For example, PS for a PostScript printer.
The simple type. For example, an ASCII text file.
When submitting a file for printing, the user can indicate the content type of the file by using the lp -T content-type command. If no file content type is supplied when the request is submitted, the LP print service checks the first file in the request to determine the content type. If the file begins with ^D%! or %!, the request is considered to contain PostScript data. Otherwise, the request is assumed to contain simple (ASCII) text. The LP print service uses the file content type to determine which filters to use to convert the file contents into a type the printer can handle.
When you are not specifying PPD files, Solaris Print Manager provides a list of file content types from which you can choose when you install or modify an attached or network printer. The choices are translated to the names that the LP print service uses. The following table describes the file content types that you can choose with Solaris Print Manager.
Table 2–2 Choosing File Content Type With Solaris Print Manager When Not Using PPD Files
File Contents Choice |
LP Print Service Name |
Description |
---|---|---|
PostScript |
postscript |
PostScript files do not require filtering. |
ASCII |
simple |
ASCII files do not require filtering. |
Both PostScript and ASCII |
simple, postscript |
PostScript files and ASCII files do not require filtering. |
None |
"" |
All files require filtering, except those files that match the printer's type. |
Any |
any |
No filtering is required. If the printer cannot handle a file content type directly, the file will not be printed. |
Choose the file content type that best matches the printer's capabilities. PostScript is the default choice in Solaris Print Manager and is probably correct most of the time. PostScript means that filtering is not needed for PostScript files.
When you set up a printer with PPD files, the printer make is the name of the manufacturer of the printer. The printer make is found on the printer itself, and on the packaging materials and documentation that is shipped with the printer.
The following are examples of printer makes that are available in this release:
Lexmark
Epson
Canon
QMS
Xerox
The printer manufacturers produce several types and models of printers. When you set up a printer with PPD files, the printer model defines the printer precisely. The model is usually stamped on the front or top of the printer. This information is also displayed on the packaging materials and documentation that is shipped with the printer.
The following are examples of printer models that are available in this release:
Lexmark Optra E312
Lexmark Z32
Lexmark 1000
The printer driver is determined when you select the PPD file for the specified printer make and printer model
This printer definition specifies the host name, IP address, or URI of the target printer. This definition applies to network-attached printers only.
Printer URIs can be specified by using the following formats:
lpd://{printer-name or ip}/printers/print-queue
ipp://{printer-name or ip}/printers/print-queue
socket://{printer-name or ip}:{port}
smb://{windows-host}/{printer}
This printer definition specifies the protocol to be used between the print server and the printer. The current choices are the BSD, TCP and URI network protocols. This printer definition applies to network-attached printers only.
This printer definition is used to specify whether a notification is sent when a printer fault is detected, and how the notification should be sent.
The default printer is the printer that the print system commands use when a printer is not specified on the command line or in by using a printing tool. For more information about using LP print commands to set up a default printer destination, see Setting Up a Default Printer Destination by Using LP Print Commands.
The banner page is the first sheet that is printed when on a print job is requested. The banner page can be set to always print, optionally print, or never print. For more information about using LP print commands to specify banner page options, see Printing Banner Pages by Using LP Print Commands.
The user access list specifies a list of users are allowed to print from the specified print server. For more information about using LP print commands to limit user access to a printer, see Limiting User Access to a Printer by Using LP Print Commands
A printer class is a collection of printers. Print requests that go to a class of printers are handled by the first available printer in that class. For more information about using LP print command to define printer classes, see Setting Up Printer Classes by Using LP Print Commands
You can find out about printing faults so that you can correct the problem. Fault recovery options are defined by using the lpadmin command with the -F option. For more information about using LP print commands to set up fault recovery, see Setting Up Printer Fault Recovery by Using LP Print Commands
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.
This section describes the resources that the printing software uses 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, and NIS+ environments are described in the following table.
naming service Type |
Default printers Entry |
---|---|
files |
printers: user files |
ldap |
printers: user files ldap |
nis |
printers: user files nis |
nis+ |
printers: user nisplus files |
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
nisplus – Represents the printers.org_dir 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 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 Solaris Operating System. 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 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.
The following figure shows a print configuration on a network with systems running the Solaris release and an LPD-based print service.
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.
If /var is not created as a separate file system, the /var directory uses space in the root (/) file system. The root (/) file system is likely to be insufficient on a print server.
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 21, 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.