Configuring and Managing Printing in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Setting Up Network Printers by Using CUPS Commands

A network printer is a hardware printing device that is connected directly to a network. A network printer has its own system name and IP address.

CUPS automatically discovers printers that are identified in the same subnet. Network printers that are not in the same subnet have to be added manually by the system administrator. You can configure a network printer by using the lpadmin command.

How to Add a Network Printer on a Different Subnet by Using CUPS Commands

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

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

  2. Ping the network printer from your system.
    # ping ip-address-of-network-printer
  3. Determine the make and model of the network printer.
    # lpinfo --make-and-model printer manufacturer name

    For example, to list the Xerox printers:

    # lpinfo --make-and-model Xerox -m

    For more information, see How to List the Available Drivers and Devices.

  4. Use the lpadmin command to add the network printer.
    # lpadmin -p printer-name -E -v socket://ip-address-of-network-printer \
    -m printer-make-and-model
    –p

    Specifies the name of the printer to add.

    –E

    Enables the destination and accepts jobs.

    –v

    Sets the device-uri attribute of the print queue.

    –m

    Sets the PPD file for the printer from the model directory or by using one of the driver interfaces.

    For information, see the lpadmin(8) man page.

  5. Verify that the printer is correctly configured.
    # lpstat -l -p printer-name
Example 2-11  Adding a Network Printer That Is on a Different Subnet

The following example shows how to add the Xerox printer luna that is on a different subnet with IP address 10.178.236.21:

# ping 10.178.236.21
10.178.236.21 is alive

# lpinfo --make-and-model Xerox -m
foomatic:Xerox-2700_XES-xes.ppd Xerox 2700 XES Foomatic/xes
foomatic:Xerox-3700_XES-xes.ppd Xerox 3700 XES Foomatic/xes
foomatic:Xerox-4045_XES-xes.ppd Xerox 4045 XES Foomatic/xes
foomatic:Xerox-Phaser_5500DN-Postscript.ppd Xerox Phaser 5500DN Foomatic/Postscript\
gutenprint.5.2://xerox-able_1406/expert 

# lpadmin -p luna -E -v socket://10.178.236.21 \
-m foomatic:Xerox-Phaser_5500DN-Postscript.ppd

# lpstat -l -p luna
printer luna is idle.  enabled since June 25, 2012 12:13:05 PM IST
printer luna is idle.  enabled since September 29, 2011 05:20:57 PM BST
Form mounted:
Content types: any
Printer types: unknown
Description: luna
Alerts: none
Location: 
Connection: direct
On fault: no alert
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Banner required
Charset sets:
(none)
Default pitch:
Default page size:
Default port settings:

How to List the Available Drivers and Devices

The lpinfo command lists the available devices and drivers known to the CUPS server.

  1. Log in to any system on the network.
  2. List the available devices and drivers by using the lpinfo command.
    • Use the –m option to list the available drivers.
      # lpinfo -m
    • Use the –v option to list the available devices.
      # lpinfo -v
Example 2-12  Listing the Available Drivers

To list all Xerox printers:

# lpinfo --make-and-model Xerox -m
foomatic:Xerox-2700_XES-xes.ppd Xerox 2700 XES Foomatic/xes
foomatic:Xerox-3700_XES-xes.ppd Xerox 3700 XES Foomatic/xes
foomatic:Xerox-4045_XES-xes.ppd Xerox 4045 XES Foomatic/xes
gutenprint.5.2://xerox-able_1406/expert 
Xerox Able 1406 - CUPS+Gutenprint v5.2.4
gutenprint.5.2://xerox-able_1406/simple 
Xerox Able 1406 - CUPS+Gutenprint v5.2.4 Simplified