JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Printing
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 Network Printing Services (Tasks)

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

5.  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

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

7.  Customizing LP Printing Services and Printers (Tasks)

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

9.  Administering Printers on a Network (Tasks)

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

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

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

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

A.  Using the Internet Printing Protocol

Glossary

Index

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

Table 5-1 Printer Setup and Administration on a Print Client (Task Map)

Task
Description
For Instructions
Add printer access by using LP print commands.
Use LP print commands to add printer access on the print client.
Set up a .printers file.
Use a $HOME/.printers file so that users can establish their own custom printer aliases.
Delete a printer and remove printer access.
If a printer needs to be replaced or moved to a different location, you can delete information about the printer from the print-client.

Adding Printer Access by Using LP Print Commands

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.

How 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 5-11 Adding Printer Access by Using lp Print 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 the printers(4) man page. For more information about the naming service switch, see the nsswitch.conf(4) man page.

How 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 system with your user name and password.
  2. If necessary, change directories to $HOME.
    $ cd $HOME
  3. Start the text editor that you want to use to create a .printers file.
  4. (Optional) Set up the _default alias to make a specific printer the default printer. Use an entry that is similar to this entry.
    _default printer-name
  5. (Optional) 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.

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

  1. Log in as superuser, lp, or assume an equivalent role on a print client with access to the printer that you want to delete.
  2. On the system that is the print client, delete information about the printer.
    # lpadmin -x printer-name
    -x

    Deletes the specified printer.

    printer-name

    Specifies the name of the printer you want to delete.

  3. Log in as superuser, lp, or assume an equivalent role on the print server.
  4. On the system that is the printer server, stop accepting print requests for the printer.
    # reject printer-name

    reject printer-name rejects print requests for the specified printer.

    This step prevents any new requests from entering the printer's queue while you are in the process of removing the printer. For a detailed description, see How to Accept or Reject Print Requests for a Printer.

  5. On the system that is the print server, stop the printer.
    # disable printer-name

    This step stops print requests from printing. For a detailed description on how to stop printing, see How to Enable or Disable a Printer.

  6. Move any print requests that are still in the queue to another printer.

    For information about how to move print requests to another printer, see How to Move Print Requests to Another Printer.

  7. On the system that is the print server, delete the printer.
    # lpadmin -x printer-name
  8. Verify that the printer information has been deleted:
    1. Confirm that the printer information has been deleted on the print client.
      $ lpstat -p printer-name -l

      In the command output, you should receive an error indicating that the printer does not exist.

    2. Confirm that the printer information has been deleted on the print server.
      $ lpstat -p printer-name -l

      In the command output, you should receive an error indicating that the printer does not exist.

Example 5-12 Deleting a Printer and Remote Printer Access

The following example shows how to delete the printer luna from the print client terra and from the print server jupiter. This example also shows how to delete the print client terra from the print server.

terra# lpadmin -x luna
Removed “luna”.
terra# lpstat -p luna -l 
jupiter# lpadmin -x luna
Removed “terra”.
jupiter# lpstat -p luna -l