JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Printing     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

1.  Introduction to Printing in the Oracle Solaris Operating System

2.  Planning for Printing (Tasks)

3.  Setting Up and Administering Printers by Using CUPS (Tasks)

4.  Setting Up and Administering Printers by Using Print Manager for LP (Tasks)

5.  Setting Up and Administering Printers by Using Oracle Solaris Print Manager (Tasks)

6.  Setting Up Printers by Using LP Print Commands (Tasks)

Setting Up Printers by Using LP Print Commands (Task Map)

Setting Up Directly Attached Printers by Using LP Print Commands

Specifying a PPD File When Setting Up a Printer

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

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

Setting Up Network-Attached Printers by Using LP Print Commands

Oracle Support for Network Printers

Invoking Network Printer Support

Selecting the Printer Node Name

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

Selecting the Network Printing Protocol

Setting the Timeout Value

Managing Network-Attached Printer Access

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

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

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

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

Setting Up and Administering Printers on a Print Client (Task Map)

Adding Printer Access by Using LP Print Commands

How to Add Printer Access by Using LP Print Commands

Setting Up a .printers File

How to Set Up a .printers File

How to Delete a Printer and Remove Printer Access by Using LP Print Commands

7.  Administering Printers by Using LP Print Commands (Tasks)

8.  Customizing LP Printing Services and Printers (Tasks)

9.  Administering the LP Print Scheduler and Managing Print Requests (Tasks)

10.  Administering Printers on a Network (Tasks)

11.  Administering Character Sets, Filters, Forms, and Fonts (Tasks)

12.  Administering Printers by Using the PPD File Management Utility (Tasks)

13.  Printing in the Oracle Solaris Operating System (Reference)

14.  Troubleshooting Printing Problems in the Oracle Solaris OS (Tasks)

Glossary

Index

Setting Up Network-Attached Printers by Using LP Print Commands

A network-attached 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-attached printer has its own system name and IP address.


Caution

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

You can correctly configure a network-attached printer by using Oracle Solaris Print Manager. Select the New Network Printer option. Or, you can use the lpadmin command to correctly configure a network-attached.

Do not use the lpadmin -p queue-name -s printer-name command or the Add Access to Printer option of Oracle Solaris Print Manager to add a network-attached printer. These methods should be used exclusively to point to an already existing queue on a remote print server. The print server includes queuing, filtering, and print administration capabilities for a network-attached printer. Printing directly to a network-attached 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, Oracle Solaris network-attached 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-attached printer configuration. For a complete description of printing terms, see Glossary.

Oracle Support for Network Printers

If the network printer vendor does not provide software support, Oracle 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-attached printer is provided in Setting Up Network-Attached Printers by Using LP Print Commands. The following is a discussion of printer management when you use the Oracle supplied software.

Invoking Network Printer Support

The software support for network printers is called through the network interface script netstandard. Configuring a network-attached printer with this script causes the network-attached 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 backward compatibility only. The printer URI form is the preferred replacement.

Example 6-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 6-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 6-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 Network Printing Protocol

By default the LP print service 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 an earlier Oracle Solaris. This protocol enables remote printer access. You can specify a device-uri when adding a network-attached printer by using the lpadmin command or by using Oracle 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

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-Attached Printer Access

Each network-attached 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-attached 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-attached 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

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

This procedure describes how to add a new network-attached printer with the expanded printer support that enables you to associate a PPD file with a printer during its configuration. There are two examples that follow this procedure. The first example illustrates how to add a new network-attached printer with PPD files by using lp commands. The second example shows how to add a new network printer without PPD files by using lp commands.

The following steps are required to set up a network-attached 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.

  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-attached 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-Attached Printers by Using LP Print Commands.

  3. On the print server, log in and become superuser.
    $ su root
  4. 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 Add a Print Queue With localhost Specified as the Host Name (LP Print Commands).

      You can use the -v option to specify a device-uri. The protocol enables you to access remote printers. For more information, see Using Printing Protocols in the Oracle Solaris Release.

    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 a network-attached 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 lpadmin(1M) man page.

    4. Specify the printer description.
      # lpadmin -p printer-name -D "printer-description"
  5. 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.

  6. (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
  7. Enable the printer to accept print requests and to print those requests.
    # accept printer-name
    # enable printer-name
  8. Verify that the printer is correctly configured.
    # lpstat -p printer-name
  9. Add client access to the new printer.

    After the printer has been configured , create access to the printer for the print clients. For more information, see Adding Printer Access by Using LP Print Commands. For information about how to define a print client by using a naming service, see Printing Support in the Naming Service Switch.

  10. Complete any optional tasks.

    There are several optional tasks that you might want to complete when setting up a printer. For information about how to define print clients by using the naming service, see Printing Support in the Naming Service Switch.

Example 6-9 Adding a New Network-Attached Printer by Specifying a PPD File

This example shows how to add a new network-attached printer with PPD files. The -n option of the lpadmin command enables you to add a new print queue by specifying a PPD file. The commands that are 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 6-10 Adding a New Network-Attached Printer Without Specifying a PPD File

This example shows how to add a new network-attached printer without specifying a PPD file. These commands must be executed on the print server. The following information is used for example purposes only.

# 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

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

  1. Become superuser.
  2. To set up a remote printer, choose one of the following methods:
    • Use the lpadmin command:
      # lpadmin -p printer -s ipp://printer-ip-address/printers/printer-name
    • Use the lpset command:
      # lpset -a printer-uri-supported=ipp://printer-ip-address/printers/printer-name

      Using the lpset command with the -a option 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.

How 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-attached printer.

    Use the printer vendor instructions to configure the network-attached 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 Adding Printer Access by Using LP Print Commands.

  4. Complete any optional tasks.