System Administration Guide: Solaris Printing

Chapter 4 Setting Up Printers (Tasks)

This chapter describes how to set up the print services, as well as how to set up printers and make those printers accessible to systems on the network.

This is a list of the information in this chapter:

For overview information about printing, see Chapter 1, Introduction to Printing in the Solaris Operating System.

Introduction to Setting Up Printers

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. For more information, see The Solaris Print Client-Server Process.

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 called a network 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 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.

Setting Up Printers on a Print Server (Task Map)

Task 

Description 

For Instructions 

Add a new directly attached local printer by using Solaris Print Manager. 

Use Solaris Print Manager to make the printer available for printing after you physically attach the printer to a system. 

How to Add a New Directly Attached Printer by Using Solaris Print Manager

Use Solaris Print Manager to add a print queue with localhost specified as the system's host name.

You can specify localhost as the host name in the print system's databases when adding a new print queue or modifying an existing print queue by using Solaris Print Manager.

How to Use Solaris Print Manager to Add a Print Queue With the Local Host Specified as the Host Name

Add a new directly attached local printer by using LP print commands. 

Use LP print service commands to make the printer available for printing after you physically attach the printer to a system.  

How to Add a New Directly Attached Printer by Using LP Print Service Commands

Use the lpadmin command to add a printer queue withlocalhost specified as the host name.

Use the lpadmin command with the -s option to specify localhost as the host name when setting up a local print queue. This modification was added to enable print servers to maintain the same print host name, localhost, independent of the machine host name.

How to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name

Add a new network-attached printer by using Solaris Print Manager. 

Use Solaris Print Manager add a new network-attached printer. 

How to Add a New Network-Attached Printer by Using Solaris Print Manager

Add a new network-attached printer by using LP print service commands. 

Use LP print service commands add a new network-attached printer. 

How to Add a New Network-Attached Printer by Using LP Print Service Commands

Add a remote print queue for a printer that is connected to a Solaris print server by using IPP. 

To add access to a remote print queue by using IPP, there are two methods that you can use:

  • Use the lpadmin command.

  • Use the lpset command.

How to Set Up a Remote Printer That is Connected to a Solaris Print Server by Using IPP

Set up a printer specifying a PPD file. 

Add a new printer specifying a PPD file. 

How to Specify a PPD File When Adding a New Printer by using LP Print Commands

Add a new network-attached printer by using the printer vendor-supplied software. 

Use Printer vendor supplied tools to configure a network printer after you physically connect the printer to the network. 

How to Add a Attached Network Printer by Using Printer Vendor-Supplied Tools

Setting Up Directly Attached Printers by Using Solaris Print Manager

The following table describes each printer definition to help you determine the information that is needed to set up a directly attached printer by using Solaris Print Manager. All of these attributes can also be set by using LP print commands. For more information about the printer definitions that you can set by using Solaris Print Manager and LP print commands, see Setting Printer Definitions.

Printer Definition 

Description 

Example 

Default Setting 

Required or Optional? 

Printer Name

Name of printer 

laser1

N/A 

Required to install an attached or network printer and to add access to a printer 

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 

Description

User defined string 

laser printer near breakroom

N/A 

Optional 

Printer Port

Device that the printer is attached to 

/dev/term/a

/dev/term/a

Required to install an attached printer 

Printer Type

Type of printer 

unknown

PostScript

Required to install an attached printer or a network printer without PPD files 

File Content Type

Content to be printed 

any

PostScript

Required to install an attached printer or a network printer without PPD files 

Printer Make

Make of printer 

Lexmark 

N/A 

Required to install an attached printer or a network printer with PPD files 

Printer Model

Model of printer 

Lexmark Optra E312 

N/A 

Required to install an attached printer or a network printer with PPD files 

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 

Fault Notification

Specifies how to notify user of errors 

Mail to superuser

Write to superuser

Optional 

Default Printer 

Identifies the default printer 

N/A 

N/A 

Optional 

Banner Page Drop-Down Menu: 

Specifies to print a banner page. 

N/A 

Banner is printed unless turned off by using lp command with appropriate option

Optional 

User Access List

List of users allowed to print on the print server 

rimmer,lister

All users can print 

Optional 

Setting Printer Definitions by Using Solaris Print Manager

Solaris Print Manager contains the following drop-down menus:

The Print Manager menu contains the following selectable options and attributes:

The Printer menu contains the following selectable options:

The Tools menu contains the following selectable options:

ProcedureHow to Add a New Directly Attached Printer by Using Solaris Print Manager

When adding a directly attached printer by using Solaris Print Manager, the default is to use PPD files. The Use PPD files attribute is located in the Print Manager drop-down menu in Solaris Print Manager. This default attribute enables you to select the printer make, model, and driver when adding new printer. You can deselect this attribute if you are adding a printer that does not use a PPD file.

This procedure shows you how to add a new attached printer by using Solaris Print Manager with the Use PPD files default attribute is selected. To add a new attached printer without PPD files, deselect this attribute by removing the checkmark from the check box.

  1. Select the system to be the print server.

  2. Connect the printer to the print server. Turn on the power to the printer.

    Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements.

  3. Start Solaris Print Manager on the print server where you connected the printer.

    For instructions, see How to Start Solaris Print Manager.

    You can specify localhost as the host name in the print system's databases. This modification was made to enable print servers to maintain the same print host name, localhost, independent of the machine host name. This option is the default in Solaris Print Manager. You can deselect this check box to revert to earlier behavior for this option. Note that this option applies exclusively to the set up of local print queues. For more information, see Using PPD Files When Setting Up a Printer in Solaris Print Manager.

    To set up a local print queue specifying localhost as the host name by using the lpadmin command with the -s option, see How to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name.

  4. Select New Attached Printer from the Printer menu.

    The New Attached Printer window is displayed.

  5. Fill in the required fields with the appropriate information.

    If you need information to complete a field, click the Help button.

    For example, to add a new attached printer with PPD files, provide the appropriate information in the following fields:


    Printer Name:
    Description:
    Printer Port:
    Printer Make:
    Printer Model:
    Printer Driver:
    Fault Notification:
    Options:
    Default Printer
    Always Print Banner
    User Access List:

    The Printer Server field is filled in by Solaris Print Manager.

    To add a new attached printer without PPD files, provide the appropriate information in the following fields:


    Printer Name:
    Description:
    Printer Port:
    Printer Type:
    File Contents:
    Fault Notification:
    Options:
    Default Printer
    Always Print Banner
    User Access List:

    The Printer Server field is filled in by Solaris Print Manager.

  6. Click OK.

  7. Verify that the printer has been installed. Check for the new printer entry in the Solaris Print Manager main window.

  8. Verify that the printer can print requests.


    $ lp -d printer-name filename
    
  9. Exit Solaris Print Manager.

    Choose Exit from the Print Manager Menu.

  10. Verify that the new Solaris Print Manager feature is working.

    When you are using Solaris Print Manager to create or modify a print queue, choose the files option as the naming service. Select the New Attached Printer option from the menu. If the drop-down menu displays the printer make and printer model, the new feature is working.

Verifying That the RIP Feature Is Working

The RIP enables you to print to printers that do not have resident PostScript processing capabilities.

To ensure that the RIP feature is working you need to create a new print queue by selecting one of the make/model combinations that is available in the New Attached Printer and New Network Printer screens used by Solaris Print Manager. Then, try printing to the new printer. If the output of the print job is recognizable, the RIP feature is working. If the output of the print job is unrecognizable, then the RIP feature is not working.

ProcedureHow to Use Solaris Print Manager to Add a Print Queue With the Local Host Specified as the Host Name

This procedure shows how to use Solaris Print Manager to add a local print queue with localhost specified as the host name in the print system databases. This modification was added to enable print servers to maintain the same print host name, independent of the machine host name. Note that you can also modify a print queue by using these commands.

  1. Become superuser or assume an equivalent role.

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

  2. Start Solaris Print Manager as described in the procedure, How to Start Solaris Print Manager.

  3. Set the print host name to localhost in Solaris Print Manager.

    For instructions, see Setting Printer Definitions by Using Solaris Print Manager.

  4. Check the entry in the /etc/printers.conf file.


    % lpget new-print-queue
    new-print-queue:
            bsdaddr=abc,new-print-queue,Solaris

    If the print queue was created or modified successfully, the output of the lpget command returns the name of the new or modified print queue.

See Also

For information about specifying localhost as the print server's host name when adding or modifying a print queue with the lpadmin command, see How to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name.

Setting Up Directly Attached Printers by Using LP Print Service Commands

The following table describes each printer attribute to help you determine the information that is needed to set up a directly attached printer by using the lpadmin command.

Printer Definition 

LP Print Command Option 

Description 

Example 

Default Setting 

Required/Optional? 

Printer Name

-p

Name of printer 

laser1

N/A 

Required to install an attached or network printer and to add access to a printer 

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 

Description

-d

User defined string 

laser printer near breakroom

N/A 

Optional 

Printer Port

-v

Device that the printer is attached to 

/dev/term/a

/dev/term/a

Required to install an attached printer 

Printer Type

-T

Type of printer 

unknown

PostScript

Required to install an attached printer or a network printer without PPD files 

File Content Type

-I

Content to be printed 

any

PostScript

Required to install an attached printer or a network printer without PPD files 

PPD file name 

-n

Full path to the PPD file and file name with .ppd extension.

path/necprinter.ppd

N/A 

Optional 

Fault Notification

-A

Specifies how to notify user of errors 

-A mail

Write to superuser

Optional 

Default Printer 

-d

Identifies the default printer 

N/A 

N/A 

Optional 

Banner Page control Menu: 

-o

Select whether to print banner page 

-o banner=never

-o banner=optional

Optional 

ProcedureHow to Add a New Directly Attached Printer by Using LP Print Service Commands

This procedure describes how to add a new attached printer specifying a PPD file. The -n option to the lpadmin command enables you to specify a PPD file when adding a new attached printer or modifying an existing attached printer. Two examples follow this procedure. The first example shows you how to add a new attached printer with PPD files. The second example shows you how to add a new attached printer without PPD files.

  1. Connect the printer to the system, and turn on the power to the printer.

    Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements.

  2. Collect the information that is required to configure an attached printer with PPD files.

    • Printer name and port device

    • File content type

    • PPD file

    To determine the PPD file that the printer will use, first define the printer make, model, and driver.

    For overview information about using PPD files when adding a new printer or modifying an existing printer by using LP print service commands, see What's New in Printing?.

  3. Define the printer name, port device, file content type, and PPD file that the printer will use.

    When using PPD files, the file content type is typically PostScript.

    1. Specify the printer name and the port device that the printer will use.


      # lpadmin -p printer-name -v /dev/printers/0
      

      The device to use is /dev/printers/0.

      You can now use the -s option with the lpadmin command to specify the print service host name as localhost. For more information, see How to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name.

    2. Specify the interface script that the printer will use.


      # lpadmin -p printer-name -m standard_foomatic
      
    3. Specify the file content type and the PPD file that the printer will use.


      # lpadmin -p printer-name -I content-type -n /path/ppdfile
      

      The PPD file that you supply is located in the /path directory.


      Note –

      If /path is not a PPD file repository on the system, then a copy of the PPD file is placed in the user label directory in the user PPD file repository. For more information, see Administering PPD Files by Using the PPD File Management Utility (Task Map).


    4. Specify the printer description.


      # lpadmin -p printer-name -D "printer-description"
      

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

  4. (Optional) Add filters to the print server.


    # cd /etc/lp/fd
    # for filter in *.fd;do
        > name=`basename $filter .fd`
        > lpfilter -f $ name-F $ filter
        > done
    
  5. Enable the printer to accept print requests and to print those requests.


    # accept printer-name
    # enable printer-name
    
  6. Verify that the printer is correctly configured.


    # lpstat -p printer-name -l
    

    The output of the lpstat command will list the PPD file that you used.


Example 4–1 Adding a New Directly Attached Printer With PPD Files by Using LP Print Service Commands

This example shows how to add a new attached printer with PPD files. The -n option to the lpadmin command enables you to add a new print queue by specifying PPD files. The following information is used as an example.

The information that you provide might vary from the following:


# lpadmin -p paper -v /dev/printers/0 (1)
# lpadmin -p paper -I postscript (2)
# lpadmin -p paper -m standard_footmatic (3)
# lpadmin -p paper -n /path/Lexmark-Optra_E312-Postscript.ppd.gz(4)
# lpadmin -p paper -D "Color printer on third floor, rm 3003" (5)
# cd /etc/lp/fd

# accept paper
	destination “paper” now accepting requests 
# enable paper	(6) 
printer “paper” now enabled 
# lpstat -p paper (7)
printer paper is idle. enabled since Feb 28 11:21 2004...
  1. Defines the printer name and the port device that the printer will use

  2. Sets the file content types to which the printer can print to directly

  3. Specifies the interface script for utilizing PPD files


    Note –

    This command also copies the PPD file to the user label in the user PPD file repository, if /path is not in an existing PPD file repository on the system.


  4. Specifies the path to the PPD file and the PPD file name

  5. Adds a description for the printer

  6. Accepts print requests for the printer and enables the printer

  7. Verifies that the printer is ready for printing



Example 4–2 Adding a New Directly Attached Printer Without PPD Files by Using LP Print Service Commands

This example shows how to add a new attached printer without PPD files. The commands in this example must be executed on the print server where the printer is connected. The following information is used as an example.

The information that you provide might vary from the following:

  1. Gives lp ownership and sole access to a port device

  2. Defines the printer name and the port device that the printer will use

  3. Sets the printer type of the printer

  4. Specifies the file content types to which the printer can print directly

  5. Adds a description for the printer

  6. Accepts print requests for the printer and enables the printer

  7. Verifies that the printer is ready for printing


See Also

ProcedureHow to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name

This procedure shows how to use LP print commands to add a local print queue with localhost specified as the host name in the print system databases. This modification was added to enable print servers to maintain the same print host name, independent of the machine host name. Note that you can also modify a print queue by using these commands.

  1. Become superuser or assume an equivalent role.

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

  2. Set the print host name to localhost.


    # lpadmin -p new-print-queue -s localhost -v device
    
  3. Check the entry in the /etc/printers.conf file.


    % lpget new-print-queue
    new-print-queue:
            bsdaddr=abc,new-print-queue,Solaris

    If the print queue was created or modified successfully, the output of the lpget command returns the name of the new or modified print queue.


Example 4–3 Adding a Print Queue by Specifying localhost as the Host Name

This example shows how to add a new print queue, paper, by using the lpadmin command with the -s option to specify localhost as the host name.


% su - root
# lpadmin -p paper -s localhost -v /dev/ecpp0

% lpget paper
paper:
        bsdaddr=localhost,paper,Solaris


Example 4–4 Adding a Print Queue by Using the Default Behavior of lpadmin to Specify the Host Name

This example shows the default behavior of the lpadmin command for using system host name, abc, when adding a new print queue.


% su - root
# lpadmin -p newspaper -v /dev/printers/0

% lpget newspaper
fargo:
        bsdaddr=abc,newspaper,Solaris


Example 4–5 Modifying a Print Queue to Use the Local Host as the Print Server Name

This example shows how to modify an existing print queue, newspaper, and specify localhost as the new print server name.


% su - root
# lpadmin -p newspaper -s localhost

# lpget newspaper
newspaper:
        bsdaddr=localhost,newspaper,Solaris

See Also

For information about specifying localhost as the print server's host name when adding or modifying a print queue with Solaris Print Manager, see How to Use Solaris Print Manager to Add a Print Queue With the Local Host Specified as the Host Name.

Setting Up Network Printers

A network printer is a hardware device that is directly connected to the network. This printer can be accessed from a print server without physically connecting the printer to the print server with a cable. The network printer has its own system name and IP address.


Caution – Caution –

Configuring a network printer without utilizing queue configuration on a print server is an unsupported method that results in printer misconfiguration.

You can correctly configure a network printer with Solaris Print Manager by selecting the New Network Printer option. Or, you can use the lpadmin command to correctly configure a network printer. For information about how to configure a network printer by using the lpadmin command, see How to Add a New Network-Attached Printer by Using LP Print Service Commands.

Note that you should not use the lpadmin -p queue-name -s printer-name command or the Add Access to Printer option of Solaris Print Manager to add a network printer. These methods should be used exclusively to point to an already existing queue on a remote print server.

The print server includes the following features:

Printing directly to a network printer results in a printer misconfiguration that is likely to cause a number of problems. Additionally, job options, such as copies, the use or disuse of burst page, and filtering, are lost.


Network printers might use one or more special protocols that require a vendor-supplied printing program. The procedures that are used to set up the vendor-supplied printing program can vary. If the printer does not come with vendor– supplied support, Solaris network printer support can be used with most devices. Use the printer vendor-supplied software, whenever possible.

The vendor might supply an SVR4 printer interface script to replace the standard printer interface script. If so, that SVR4 interface script calls the vendor-supplied printing program to send the job to the printer. If not, you need to modify the standard interface script to call the vendor-supplied printing program. To do so, edit the per-printer copy of the standard interface script to call the vendor-supplied printing program.

The following are the terms that are used in network printer configuration. For a complete description of printing terms, see Glossary.

Sun Support for Network Printers

If the network printer vendor does not provide software support, Sun supplied software is available. The software provides generic support for network printers and is not capable of providing full access to all possible printer attributes.

A general discussion of how to add a network printer is provided in Setting Up Network Printers. The following is a discussion of printer management when you use the Sun supplied software.

Invoking Network Printer Support

The software support for network printers is called through the network interface script netstandard. Configuring a network printer with this script causes the network printer support module to be called. Here is the command to configure the printer with the network support.


lpadmin -p printer-name -m netstandard 

Selecting the Printer Node Name

You select the printer node name. This name must be unique, as with any node on the network. The printer node name is associated with the IP address of the printer.

Selecting the Destination Name (Also Called the Network Printer Access Name)

The print subsystem requires access information for the printer. The subsystem uses the destination name when making the network connection to the printer. You supply this name to the print subsystem by using the lpadmin command. This name then becomes part of the printer configuration database. The printer access name is the name of the printer node, sometimes qualified by a port name. Port designation varies across printer vendors. You can find information about port designation in the printer documentation.

Here is the format of printer access name:

printer-node-name[:port-designation]

Destination names can be specified in one of three forms:

Atomic (simple)

(destination) - Is resolved by locating a printer-uri-supported key/value pair for the named destination in the printers.conf or the printers configuration database. If no printer-uri-supported key is found for an entry, it's bsdaddr value is converted to printer URI form and used.

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

Printer URI

(scheme://endpoint) - Is completely resolved and specifies the protocol and communication endpoint to contact for print services. This form of destination name is useful for accessing print services outside of your system's current management domain. Since the name includes the protocol to use when contacting the print service, you can select a richer protocol than the RFC-1179 protocol.

POSIX

(server:queue[:extensions]) - Is complete and resolves to an equivalent printer URI form of lpd://server/printers/queue[#extensions] This form is being maintained for Solaris backward compatibility only. The printer URI form is the preferred replacement.


Example 4–6 Destination Name (or Network Printer Access Name) With Port Designation (Number)

A common port designation with TCP is 9100. If the printer node name is pn1, and the printer vendor defines the port as 9100, then the printer access name is pn1:9100. To configure a printer in this case, use the following command:


lpadmin -p printer_name -o dest=pn1:9100


Example 4–7 Destination Name (or Network Printer Access Name) With BSD Port Designation (Name)

When you use the BSD protocol, the port designation might not be a number, but some name defined by the printer vendor, for example: xxx_parallel_1. If the printer node name is cardboard, then the printer access name is cardboard:xxx_parallel_1. To configure a printer in this case, use the following command:


lpadmin -p printer-name -o dest=cardboard:xxx_parallel_1


Example 4–8 Destination Name (or Network Printer Access Name) With No Port Designation

If there is no port designation, and the printer node name is newspaper, the printer access name is the printer node name: newspaper. To configure a printer in this case, use the following command:


lpadmin -p printer-name -o dest=newspaper

Selecting the Printing Protocol

The print subsystem uses the BSD print protocol and raw TCP to communicate with the printer. The printer vendor documentation provides information about which protocol to use. In general, the TCP protocol is more generic across printers.


Note –

The Device URI protocol was introduced in the Solaris Express 2/05 releaseSolaris 10 5/08 release. This protocol enables remote printer access. You can specify a device-uri when adding a network printer by using the lpadmin command or by using Solaris Print Manager.


To select the BSD protocol, type:


lpadmin -p printer-name -o protocol=bsd

To select the TCP protocol, type:


lpadmin -p printer-name -o protocol=tcp

If the protocol that is selected is the BSD print protocol, you can further select the order of sending the control file to the printer. Some printers expect the control file, then the data file. Other printers expect the reverse. For this information, see the printer vendor documentation. The default is to send the control file first.

To select the order, type one of the following commands:


lpadmin -p printer-name -o bsdctrl=first

lpadmin -p printer-name -o bsdctrl=last

For information about using the IPP protocol, see Administering Printers by Using the Internet Printing Protocol (Task Map).

Setting the Timeout Value

The timeout option allows the user to select the amount of time (in seconds) to wait between successive attempts to connect to the printer. Some printers have a long warm up time, and a longer timeout value is advised. The default is 10 seconds.

The timeout value does not impact the success or failure of the print process. The value is a seed value that the software uses as the initial timeout count. On repeated failures, this count is increased. A message is sent to the spooler when repeated attempts to connect to the printer fail. This message alerts the user that intervention might be required. The failure could be anything from the printer being turned off to the printer being out of paper. If these messages are produced too often, for example when the printer is warming up, increasing the timeout value will eliminate spurious messages.

You can experiment to find the optimal timeout value. Type the following command to set the timeout value:


lpadmin -p printer-name -o timeout=n

Managing Network Printer Access

Each network printer should have only one server that provides access to the printer. This restriction enables the server to manage access to the printer and keep jobs coherent.

The default device for the network printer is /dev/null. This device is sufficient when the printer has only one queue. If more queues are required, set the device to a file. This setting enables the print system to restrict access to the printer across queues. The following commands create a device file and configure it as the network printer device.


touch /path/filename
chmod 600 /path/filename
lpadmin -p printer-name -v /path/filename

The following is an example of how to create a device file called devtreedown.


# touch /var/tmp/devtreedown
# chmod 600 /var/tmp/devtreedown
# lpadmin -p treedown -v /var/tmp/devtreedown

Setting Up Network-Attached Printers by Using Solaris Print Manager

The following table describes each printer attribute to help you determine the information that is needed to set up a network-attached printer with Solaris Print Manager.

Printer Definition 

Description 

Example 

Default Setting 

Required or Optional? 

Printer Name

Name of printer 

laser1

N/A 

Required to install an attached or network printer and to add access to a printer 

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 

Description

User defined string 

laser printer near breakroom

N/A 

Optional 

Printer Type

Type of printer 

unknown

PostScript

Required to install an attached printer or a network printer without PPD files 

File Content Type

Content to be printed 

any

PostScript

Required to install an attached printer or a network printer without PPD files 

Printer Make

Make of printer 

Lexmark 

N/A 

Required to install an attached printer or a network printer with PPD files 

Printer Model

Model of printer 

Lexmark Optra E312 

N/A 

Required to install an attached printer or a network printer with PPD files 

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 

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 

Protocol

Protocol used to communicate with the printer 

TCP, URI 

BSD

Required to install a network printer  

Fault Notification

Specifies how to notify user of errors 

Mail to superuser

Write to superuser

Optional 

Default Printer 

Identifies the default printer 

N/A 

N/A 

Optional 

Banner Page Drop-Down Menu: 

  • Always Print Banner

  • User Selectable-Default=on

  • Never Print Banner

 

Print banner? 

 

 

Print banner? User selectable option, turned on by default. To turn banner printing off, use lp command with appropriate option.

Never print banner? 

N/A 

 

Banner is printed 

 

 

 

 

Banner is printed unless turned off by using lp command with appropriate option

 

 

Banner is not printed 

Banner page printing turned on by default unless another option is specified within the Solaris Print Manager pull-down menu 

User Access List

List of users allowed to print on the print server 

rimmer,lister

All users can print 

Optional 

ProcedureHow to Add a New Network-Attached Printer by Using Solaris Print Manager

The Use PPD files default attribute in Solaris Print Manage enables you to select the printer make, model, and driver when adding new printer. For more information on this feature, see Administering Printers That Use PPD Files.

This procedure shows you how to add a new network printer by using Solaris Print Manager with the Use PPD files default attribute is selected. To add a new network printer without PPD files, deselect this attribute by removing the checkmark from the check box.

  1. Select the system to be the print server.

  2. Connect the printer to the network. Turn on the power to the printer.

    Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements.

  3. Start Solaris Print Manager on the print server.

    For instructions, see How to Start Solaris Print Manager.

    In this Solaris release you can specify localhost as the host name in the print system's databases. This modification was added to enable print servers to maintain the same print host name, localhost, independent of the machine host name. This option is the default in Solaris Print Manager. To revert to earlier behavior for this option, deselect the check box. Note that this option applies exclusively to the setup of local print queues. For more information, see Solaris Print Manager Options and Selectable Attributes.

    To set up a local print queue specifying localhost as the host name by using the lpadmin command with the -s option, see How to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name.

  4. Select New Network Printer from the Printer menu.

    The New Network Printer window is displayed.

  5. Fill in the required fields with the appropriate information.

    If you need information to complete a field, click the Help button.

    For example, to add a new network printer with PPD files, provide the appropriate information in the following fields:


    Printer Name:
    Description:
    Printer Make:
    Printer Model:
    Printer Driver:
    Fault Notification:
    Destination:
    Protocol:
    Options:
    Default Printer
    Always Use Banner
    User Access List:

    The Printer Server field is filled in by Solaris Print Manager.

    To add a new network printer without PPD files, provide the appropriate information in the following fields:


    Printer Name:
    Description:
    Printer Type:
    File Contents:
    Fault Notification:
    destination:
    Protocol:
    Options:
    Default Printer
    Always Use Banner
    User Access List:

    The Printer Server field is filled in by Solaris Print Manager.

  6. Click OK.

  7. Verify that the printer has been installed. Check for the new printer entry in the Solaris Print Manager main window.

  8. Verify that the printer can print requests.


    $ lp -d printer-name filename
    
  9. Exit Solaris Print Manager.

    Choose Exit from the Print Manager Menu.

Setting Up Network-Attached Printers by Using LP Print Commands

The following table describes each printer attribute to help you determine the information that is needed to set up a network-attached printer by using the lpadmin command.

Printer Definition 

LP Command Option 

Description 

Example 

Default Setting 

Required or Optional? 

Printer Name

-p

Name of printer 

laser1

N/A 

Required to install an attached or network printer and to add access to a printer 

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 

Description

-D

User defined string 

laser printer near breakroom

N/A 

Optional 

Printer Type

-T

Type of printer 

unknown

PostScript

Required to install an attached printer or a network printer without PPD files 

File Content Type

-I

Content to be printed 

any

PostScript

Required to install an attached printer or a network printer without PPD files 

PPD file name 

-n

Full path and file name of the PPD file including the .ppd extension

$path/myprinter.ppd

N/A 

Optional 

Destination

-o

Destination name for the network printer 

-o dest=access-name:port

N/A 

Required to install a network printer 

Protocol

-o

Protocol used to communicate with the printer 

-o protocol=tcp

BSD

Required to install a network printer  

Fault Notification

-A

Specifies how to notify user of errors 

-A mail

Write to superuser

Optional 

Default Printer 

-d

Identifies the default printer 

N/A 

N/A 

Optional 

Banner Page control 

-o

Select whether to print banner 

-o banner=never

-o banner=optional

Optional 

ProcedureHow to Add a New Network-Attached Printer by Using LP Print Service Commands

This procedure describes how to add a new network printer with the expanded printer support that is available in this release. There are two examples that follow this procedure. The first example shows you how to add a new network printer with PPD files by using lp commands. The second example shows you how to add a new network printer without PPD files by using lp commands.

The following steps are necessary to set up a network printer by using the network printer support software. The use of this software is intended for printers that do not come with vendor-supplied software.

For overview information about adding a new network printer or modifying an existing network printer with PPD files, see What's New in Printing?.

  1. Connect the printer to the network, and turn on the power to the printer.

    Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements. Get an IP address and select a name for the printer node. This step is equivalent to adding any node to the network.

  2. Collect the information that is required to configure a new network printer with PPD files.

    • Printer name and port device

    • Network printer access name

    • Protocol

    • Timeout

    • File content type

    • PPD file

    To determine the PPD file, first define the printer make, model, and driver that the printer will use.

    For more information, see the terms that are described in Setting Up Network Printers.

  3. Define the printer name, port device, file content type, and PPD file that the printer will use. When using PPD files, the file content type is usually PostScript.

    1. Specify the printer name and the port device that the printer will use.


      # lpadmin -p printer-name -v /dev/null
      

      The device to use is /dev/null.

      You can use the -s option with the lpadmin command to specify the print service host name as localhost. For more information, see How to Use LP Print Commands to Add a Print Queue With localhost Specified as the Host Name.

      You can use the -v option to specify a device-uri. The protocol enables you to access remote printers. For more information, see What is a Device URI?.

    2. Specify the interface script that the printer will use.


      # lpadmin -p printer-name -m netstandard_foomatic 
      

      The interface script that is supplied with the support software for network printer is /usr/lib/lp/model/netstandard_foomatic.

    3. Specify the file content type and PPD file that the printer will use.

      When using PPD files, the file content type is usually PostScript.


      # lpadmin -p printer-name -I content-type -n 
      /path/ppdfile
      

      The PPD file that you specify is located in the /path directory.


      Note –

      If /path is not a PPD file repository on the system, then a copy of PPD file is placed in the user label directory in the user PPD file repository. For more information, see Chapter 9, Administering Printers by Using the PPD File Management Utility (Tasks).


      For more information, see lpadmin(1M).

    4. Specify the printer description.


      # lpadmin -p printer-name -D  "printer-description"
      
  4. Set the printer destination, protocol, and timeout values.


    # lpadmin -p printer-name -o dest=access-name:port -o protocol=protocol
    -o timeout=value
    
    -p printer-name

    Specifies the network printer name.

    -o dest=access-name:port

    Sets the printer destination to the network printer access name and a designated printer vendor port, if the port is defined in the printer vendor documentation.

    -o protocol=protocol

    Sets the over-the-wire protocol used to communicate with the printer. Both BSD and raw TCP are supported.

    -o timeout=value

    Sets a retry timeout value that represents a number of seconds to wait between attempting connections to the printer.

  5. (Optional) Add filters to the print server.


    # cd /etc/lp/fd
    # for filter in *.fd;do
        > name=`basename $ filter .fd`
        > lpfilter -f $name -F $ filter
        > done
    
  6. Enable the printer to accept print requests and to print those requests.


    # accept printer-name
    # enable printer-name
    
  7. Verify that the printer is correctly configured.


    # lpstat -p printer-name
    
  8. Add client access to the new printer.

    Now that the printer has been added, create access to the printer for the clients. For more information, see Setting Up a Print Client. For information about how to define a print client by using a naming service, see Printing Support in the naming service Switch.

  9. Complete any optional tasks.

    There are several optional tasks that you might want to complete when setting up a printer. For pointers to the remaining tasks, see Setting Up Solaris Printing Services (Task Map). For information about how to define print clients by using the naming service, see Printing Support in the naming service Switch.


Example 4–9 Adding a New Network-Attached Printer With PPD Files by Using LP Print Service Commands

This example shows how to add a new network printer with PPD files. The -n option to the lpadmin command enables you to add a new print queue by specifying PPD files. The commands used in this example must be executed on the print server. The following information is used as an example only. The information that you provide will vary.

  1. Defines printer name and sets the device to /dev/null

  2. Defines the interface script for network printers

  3. Sets the destination, protocol, and timeout

  4. Specifies the file content types to which the printer can print to directly

  5. Specifies the PPD file to use

  6. Adds a description for the printer

  7. Adds print filters to the print server

  8. Accepts print requests for the printer and enables the printer

  9. Verifies that the printer is ready for printing



Example 4–10 Adding a New Network-Attached Printer Without PPD Files by Using LP Print Service Commands

This example shows how to add a new network printer without PPD files. Thse commands must be executed on the print server.

The following information is used as an example:


# lpadmin -p luna1 -v /dev/null (1)
# lpadmin -p luna1 -m netstandard (2)
# lpadmin -p luna1 -o dest=nimquat:9100 -o protocol=tcp 
-o timeout=5 (3)
# lpadmin -p luna1 -I postscript -T PS (4)
# lpadmin -p luna1 -D "Room 1954 ps" (5)
# cd /etc/lp/fd
# for filter in *.fd;do	
	   > name =`basename $ filter .fd`	
	   > lpfilter -f $ name -F $ filter	
	   > done (6)
# accept luna1
	destination "luna1" now accepting requests
# enable luna1 (7)
printer "luna1" now enabled 
# lpstat -p luna1 (8)
printer luna1 is idle.enabled since Feb 28 11:21 2003.available.
  1. Defines printer name and sets the device to /dev/null

  2. Defines the interface script for network printers

  3. Sets the destination, protocol, and timeout

  4. Specifies the file content type to which the printer can print directly, and the printer type

  5. Adds a description for the printer

  6. Adds print filters to the print server

  7. Accepts print requests for the printer and enables the printer

  8. Verifies that the printer is ready for printing


ProcedureHow to Set Up a Remote Printer That is Connected to a Solaris Print Server by Using IPP

  1. Become superuser or assume an equivalent role.

  2. Set up a remote printer by using one of the following methods:

    • To use the lpadmin command, type the following command:


      # lpadmin -p printer -s ipp://printer-ip-address/printers/printer-name
      
    • To use the lpset command, type the following command:


      # lpset -a printer-uri-supported=ipp://printer-ip-address/printers/printer-name
      

      The -a option of the lpset command accepts key/value pairs. In the preceding output, the key that is specified is printer-uri-supported, with the value being ipp://printer-ip-address/printers/printer-name. Typically, you would not configure this value to refer directly to a printer, but rather a print queue on a print server.

  3. (Optional) To determine the URI you have supplied, type the following command:


    $ lpstat -p ipp://printer-ip-address/printers/printer-name
    

    When you use the lpstat command and specify the URI as the destination, the local printing configuration is bypassed, connecting you directly to the network-attached printer or the remote print server.

Adding a New Network-Attached Printer by Using Printer Vendor-Supplied Software

Network printers often have software support provided by the printer vendor. If your printer has printer vendor- supplied software, use the printer vendor software, when possible. The software is designed to support the attributes of the printer and can take full advantage of the printer capabilities. Read the printer vendor documentation to install and configure the printer, so that it can operate with the LP print service.

ProcedureHow to Add a Attached Network Printer by Using Printer Vendor-Supplied Tools

  1. Connect the printer to the network. Turn on the power to the printer.

    Consult the printer vendor's installation documentation for information about the hardware switches and cabling requirements. Get an IP address and select a name for the printer node. This method is equivalent to adding any node to the network.

  2. Follow the printer vendor instructions to add the network printer.

    Use the printer vendor instructions to configure the network printer. These instructions are specific to the vendor and printer.

  3. Add client access to the new printer.

    Now that the printer has been added, create access to the printer for the print clients. For more information, see Setting Up a Print Client.

  4. Complete any optional tasks.

    There are several optional tasks that you might want to complete when setting up a network printer. For pointers to these tasks, see Setting Up Solaris Printing Services (Task Map).

Setting Up Printers That are Associated With PPD Files

You can set up a printer and associate that printer with a PPD file by using either Solaris Print Manager or LP print commands.

When adding or modifying a printer in Solaris Print Manager, the default option is to use PPD files. The Use PPD files attribute is located in the Print Manager drop-down menu of Solaris Print Manager. This default option enables you to select the printer make, model, and driver when you add new printer or modify an existing printer. To deselect this attribute, remove the checkmark from the check box. For more information about how to specify PPD files when a adding a printer, see Administering Printers That Are Associated With PPD Files (Task Map).

To specify a PPD file when adding or modifying a printer by using LP print commands, use the lpadmin command with the -n option. For more information, see How to Specify a PPD File When Adding a New Printer by using LP Print Commands.

Using PPD Files When Setting Up a Printer in Solaris Print Manager

Solaris Print Manager includes a Use PPD files option that is the default when you create a new print queue or modify an existing print queue. If you do not want to specify a PPD file, you can override this option by removing the checkmark from the check box. To switch back to using PPD files, recheck the Use PPD files check box.

Note that if you create a new print queue or modify an existing print queue with PPD files in Solaris Print Manger, you cannot assign the printer type or file content type printer definitions. However, If you do not use PPD files when creating a print queue, you can assign these printer definitions by deselecting the Use PPD files attribute in the Solaris Print Manager drop-down menu.

To create a print queue with PPD files, you are required to provide the following information:

The definitions for printer make, model, and printer driver are available in Solaris Print Manager when you create a print queue with the Use PPD files option selected. Note that this option is the default.


Note –

You do not need to create a print queue that uses PPD files. Also, PPD files are not required for printers that already contain the RIP feature. You can continue to use Solaris Print Manager to configure these printers you did previously. To do so, before adding the printer, remove the checkmark from the Use PPD files check box.

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


Specifying a PPD File When Setting Up a Printer by Using LP Print Commands

Use the -n option with the lpadmin command to specify a PPD file when creating a new print queue or modifying an existing print queue.

For example, to add the print queue, foobar, to a Lexmark printer, you would type:


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

When using the lpadmin -n command to specify a PPD file, you must provide the full path to the PPD file.


Note –

If you use the lpadmin -n command to add a PPD file, and the repository that you specify in the PPD file path does not exist on the system, a copy of the PPD file is stored in the user label directory, within the user repository. This directory is located at /var/lp/ppd/user/manufacturer/ppd-file. The Solaris Print Manager cache is then updated to reflect the printer information from the recently added PPD file. For more information, see Chapter 9, Administering Printers by Using the PPD File Management Utility (Tasks).


ProcedureHow to Specify a PPD File When Adding a New Printer by using LP Print Commands

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.

  1. Become superuser or assume an equivalent role.

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

  2. To specify a PPD file, use the lpadmin command with the following options:


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

    Specifies the printer name

    -n

    Specifies to use a PPD file

    -m

    Specifies the interface script for utilizing PPD files

    -v

    Specifies the port device that the printer will use


Example 4–11 Specifying a PPD File When Setting Up a Printer

For example, to specify the xyz.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

Setting Up Printers on a Print Client (Task Map)

Task 

Description 

For Instructions 

Add printer access by using Solaris Print Manager 

Use Solaris Print Manager to add printer access on the print client. 

How to Add Printer Access by Using Solaris Print Manager

Add printer access by using LP print service commands. 

Use LP print commands to add printer access on the print client. 

How to Add Printer Access by Using LP Print Commands

Set up a .printers file.

Use a $HOME/.printers file so that users can establish their own custom printer aliases.

How to Set Up a .printers File

Setting Up a Print Client

A print client is a system that is not the server for the printer. Yet, this system has access to the printer. A print client uses the services of the print server to spool, schedule, and filter the print jobs. Note that one system can be a print server for one printer and be a print client for another printer.

Access to a printer can be configured on a domain-wide basis or on a per-machine basis. If you add the printer information to the naming service database, access is configured on a domain-wide basis.

The following procedure describes how to use the Solaris Print Manager to add access to a printer on a print client. The example that follows describes how to add printer access by using the lp print service commands.

ProcedureHow to Add Printer Access by Using Solaris Print Manager

  1. Start Solaris Print Manager on the system where you want to add access to a remote printer.

    For instructions, see How to Start Solaris Print Manager.

  2. Select Add Access to Printer from the Printer menu.

    The Add Access to Printer window is displayed.

  3. Type the appropriate data in the entry fields.

    If you need information to complete a field, click the Help button.

  4. Click OK.

  5. Verify that access to the printer is added by checking for the new printer entry in the Solaris Print Manager main window.

  6. Verify that the printer can print requests.


    $ lp -d printer-name filename
    
  7. Exit Solaris Print Manager.

    Choose Exit from the Print Manager Menu.

ProcedureHow to Add Printer Access by Using LP Print Commands

  1. Become superuser or assume an equivalent role.

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

  2. Add access to the printer.


    # lpadmin -p printer -s print-server -D description
    
  3. Set the printer as the system's default printer destination


    # lpamin -d printer
    
  4. Verify that the printer is ready for printing.


    # lpstat -p printer
    

Example 4–12 Adding Printer Access by Using lp Print Service Commands

If you want to print to a remote printer, you must add access to the remote printer. This example shows how to configure access to a printer named luna, whose print server is saturn.


# lpadmin -p luna -s saturn (1)
# lpadmin -p luna -D "Room 1954 ps" (2)
# lpadmin -d luna (3)
# lpstat -p luna (4)
  1. Identifies the printer and the print server

  2. Adds a description for the printer

  3. Sets the printer as the system's default printer destination

  4. Verifies that the printer is ready for printing


Setting Up a .printers File

The .printers file is located in a user's home directory. This file includes information about a user's default printer and other frequently used printers. Having a .printers file enables users to establish their own printer aliases. For example, a _default alias can be used to specify a user's default printer. Also, a special _all alias can be used to define a list of printers that are affected when a print job is canceled or to check the status of printers.

The use of the .printers file by the LP print service is controlled by the naming service switch (/etc/nsswitch.conf). The default configuration specifies that the print service checks a user's home directory to locate printer configuration information before it checks the other naming services. So, you can tailor a user's printer configuration file to use custom printer information rather than the shared information in the naming service.

For more information about the .printers file, see theprinters(4) man page. For more information about the naming service switch, see the nsswitch.conf(4) man page.

ProcedureHow to Set Up a .printers File

This procedure shows users how to set up .printers file in their own home directories.

  1. Log in to the systemwith your user name and password..

  2. If necessary, change directories to $HOME.


    % cd $HOME
    
  3. Start the file editor that you want to use to create a .printers file in the user's home directory.

  4. (Optional) Set up the _default alias to make a specific printer the user's default printer. Use an entry that is similar to this entry.


    _default printer-name
    
  5. Set up the _all alias to define the printers affected when you cancel a print request or check the status of printers. Use an entry similar to this entry.


    _all printer1,printer2,printer3
    
  6. Save the file as .printers.