Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administrator's Guide: Routine Management Tasks: HP-UX 11i Version 3 > Chapter 4 Managing Printers

Configuring Printers to Use the LP Spooler

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This section provides information on performing the following procedures:

Initializing the LP Spooler

Before you can use the LP spooler, you must initialize it.

Using HP SMH

If you use HP SMH to add a printer, it will prompt you to initialize the LP spooler.

Using HP-UX Commands

You can use HP-UX commands to initialize the LP spooler by following these steps:

  1. Add at least one printer to the LP spooler.

    See “Adding a Local Printer to the LP Spooler ”.

  2. Tell the LP spooler to accept print requests for this printer.

    Using the plumbing system analogy in HP-UX System Administrator’s Guide: Overview, this is equivalent to opening the accept/reject valves above the holding tanks. See also“Controlling the Flow of Print Requests”.

  3. Tell the LP spooler to enable the printer for printing.

    In the plumbing system analogy, this is equivalent to opening the enable/disable valves below the holding tanks. See HP-UX System Administrator’s Guide: Overview.

  4. Turn on the LP spooler.

    See “Stopping and Restarting the LP Spooler ”.

Adding a Local Printer to the LP Spooler

NOTE: Do not confuse adding a printer to the LP spooler with adding a printer to your system: adding a printer to the LP spooler involves configuring the LP spooler, whereas adding a printer to your system involves connecting the printer to your computer and configuring the needed drivers in the kernel. For information on the latter, refer to Configuring HP-UX for Peripherals.

Using HP SMH

The easiest way to add a local printer to the LP spooler is to run HP SMH. HP SMH will also do some of the CDE configuration (if CDE is being used) and some of the SharedPrint configuration (if you are using a SharedPrint printer model).

Using HP-UX Commands

  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Add the printer to the LP spooler. For example:

    /usr/sbin/lpadmin -plocal_printer -v/dev/lp -mHP_model -g7

    See lpadmin(1M) for details on the options. See HP-UX System Administrator’s Guide: Overview for choices for the -m option.

  4. If the printer being added will be the default printer, execute the following:

    /usr/sbin/lpadmin -dlocal_printer

    Allow print requests to be accepted for the newly added printer. For example:

    /usr/sbin/accept local_printer

    See “Controlling the Flow of Print Requests” for information on accept.

  5. Enable the newly added printer to process print requests. For example:

    /usr/bin/enable local_printer

    See “Enabling or Disabling a Printer” for details.

  6. Restart the LP spooler:

    /usr/sbin/lpsched
  7. Test the printer using the LP spooler, then check the LP spooler’s status. For example:

    lp -dlocal_printer /etc/passwd lpstat -t

Adding a Remote Printer to the LP Spooler

To familiarize yourself with remote spooling concepts, see HP-UX System Administrator’s Guide: Overview.

The easiest way to add a printer to a remote system is to use HP SMH. If you elect to use HP-UX commands, review the HP SMH procedure, Step 4, as this information will also be required when performing the task manually.

Using HP SMH

NOTE: HP SMH does not verify that an actual printer exists on a remote system. Be sure the printer is installed and configured, and if necessary, use HP SMH to configure it on the remote system before adding it as a remote printer.
  1. Access the HP SMH homepage as root.

  2. Select Tools, Printer Management, Configure Printers or Plotters. This will display a Tool Launch page.

    NOTE: If your client console is a PC, you must have an X Window Server running before executing this function.
  3. If needed, enter the address of the target display console. Click on the Run button. An X Window is displayed showing the printer configuration page.

  4. From the Action pulldown menu, choose AddRemotePrinter/Plotter ....

  5. Depending on the type of printer or plotter provide detailed configuration information such as:

    • Printer Name

    • Remote System Name

    • Remote Printer Name

    • Whether Remote Printer is on a BSD system

    • Remote Cancel Name

    • Remote Status Name

    • Default Request Priority

    • Whether to Allow Anyone to Cancel a Request

    • Whether to Make this Printer the Default Destination

  6. When all fields are filled in, select OK. HP SMH returns with troubleshooting information, in case configuration was unsuccessful. Most likely problems will be related to the remote system configuration. Check as follows:

    1. Edit /etc/services (on remote system), and if necessary, uncomment the line beginning with printer by removing the#.

    2. Ensure no systems are restricted from access by /var/adm/inetd.sec.

    3. Make sure rlpdaemon is running.

Using HP-UX Commands

  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Add the remote printer.

    • If the remote printer is on an HP-UX system, enter:

      lpadmin -plocal_printer-v /dev/null -mrmodel \   -ormremote_machine-orpremote_dest-ocmrcmodel \ -osmrsmodel
    • If the remote printer is not on an HP-UX system, enter:

      lpadmin -plocal_printer-v /dev/null -mrmodel \   -ormremote_machine -orpremote_dest-ocmrcmodel \   -osmrsmodel -ob3

    See lpadmin(1M) for details on the options. Also see HP-UX System Administrator’s Guide: Overview for information to provide to the -m option.

  4. Allow print requests to be accepted for the newly added remote printer. For example:

    /usr/sbin/accept local_printer

  5. If the printer being added will be the default printer, execute the following:

    /usr/sbin/lpadmin -dlocal_printer

  6. Enable the newly added printer to process print requests. For example:

    /usr/bin/enable local_printer

  7. Restart the LP spooler to process print requests.

    /usr/sbin/lpsched

  8. Send a sample print job to the printer.

    • If it prints, the remote printing daemon (rlpdaemon) is active on the system and your task is completed.

    • If your print job does not print, the remote printing daemon (rlpdaemon) is not active yet on the remote machine. Activate the rlpdaemon on the host system where the remote printer resides, as follows in the next step.

  9. Examine the file /etc/inetd.conf and look for the following line:

    # printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i

    If a # sign appears at the beginning of the line, the rlpdaemon line is commented out, preventing the printer from printing remotely.

    Edit the file /etc/inetd.conf to remove the # sign. Save the file.

  10. Check /etc/services and look for:

    # printer 515/tcp spooler #remote print spooling

    If a # sign appears at the beginning of the line, the service is commented out, preventing the remote print spooler from serving the printer.

    Edit the file to remove the # sign in the first column. Save the file.

  11. Reconfigure the Internet daemon inetd, forcing it to reread the /etc/inetd.conf file. Invoke the following command:

    /usr/sbin/inetd -c

    Also, check entries in /var/adm/inetd.sec that restrict which systems can send remote print requests.

  12. Test the printer using the LP spooler, then check the LP spooler’s status. For example:

    lp -dlocal_printer /etc/passwd lpstat -t

Adding a Network-Based Printer

Using HP SMH

You can use HP SMH to add a network-based printer that uses the HP JetDirect Network Interface. The HP JetDirect software must be installed on your system and you must be prepared to provide SMH with the following:

  • the printer’s node name (the name associated with an Internet address)

  • the local name that the LP spooler will use to refer to the printer.

With HP JetDirect, printers can connect directly to the network. The printer uses a LAN connection and the HP JetDirect software transmits prints requests. For more information, see HP JetDirect Network Interface Configuration Guide.

Using HP-UX Commands

If you do not use HP SMH, follow the instructions shipped with your printer or the network interface card for the printer.

Creating a Printer Class

For conceptual information, read HP-UX System Administrator’s Guide: Overview.

You can use HP SMH to add a printer to a printer class when the printer is being added to the spooler; otherwise, you must use HP-UX commands. To use HP-UX commands, follow these steps after several printers have been added to the LP spooler:

  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Create the printer class, specifying the printer you want to add to the class of printers.

    For example, to add a printer named laser1 to the class of printers named laser, enter:

    /usr/sbin/lpadmin -plaser1 -claser

    Only one printer can be added to a class at a time. If you have more than one printer to add, repeat this command.

  4. Allow print requests to be accepted for the newly added printer class. For example:

    /usr/sbin/accept laser
  5. Restart the LP spooler:

    /usr/sbin/lpsched

Removing a Printer from the LP Spooler

Using HP SMH

  1. Access the HP SMH homepage as root.

  2. Select Tools, Printer Management, Configure Printers or Plotters. This will display a Tool Launch page.

    NOTE: If your client console is a PC, you must have an X Window Server running before executing this function.
  3. If needed, enter the address of the target display console. Click on the Run button. An X Window is displayed showing the printer configuration page.

  4. From the Action pulldown menu, choose Remove .... A dialog is displayed asking that you confirm the removal.

    NOTE: HP SMH asks for confirmation before removing the printer from the LP spooler. If print jobs remain in the printer’s queue or if the printer is the system default destination, HP SMH notifies you. If you choose to remove a printer with jobs in its queue, HP SMH cancels them.
  5. Confirm the removal, Click YES.

Using HP-UX commands

  1. Ensure that you have superuser capabilities.

  2. (Optional): Notify users that you are removing the printer from the system.

  3. Remove the printer from the configuration file of any software application through which the device is accessed. (Refer to the documentation accompanying the software application for instructions.)

  4. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  5. (Optional): Deny any further print requests for the printer. For example:

    /usr/sbin/reject -r"Use alternate printer." laser1

    By doing this step, you can be assured that no new jobs will appear before you remove the printer.

    Users will see the message “Use alternate printer” when they direct requests to a rejected destination if the printer has not been removed. Once the printer has been removed and users try to send a request, they will see the message “Destination printer_name non-existent”. See “Controlling the Flow of Print Requests”.

  6. (Optional): Determine if there are any jobs in the printer’s queue. For example:

    /usr/bin/lpstat -o laser1

  7. (Optional): Disable the printer to be removed. For example:

    /usr/bin/disable -r"Printer laser1 is disabled." laser1

    You would issue the above disable command if there are jobs in the printer’s queue and you do not want to wait for them to print before removing the printer. Issuing the disable command shuts the printer down in an orderly manner.

    For more information, see “Enabling or Disabling a Printer”. Note that you can also specify the -c option to the disable command to cancel all print requests for the printer.

  8. (Optional): If there are no jobs in the printer’s queue, go on to Step 9. If there are jobs, decide whether to move all pending print requests in the request directory to another printer request directory or to cancel any requests. For example, to move print requests:

    /usr/sbin/lpmove laser1 laser2

    To cancel any requests:

    /usr/bin/cancel laser1

  9. Remove the printer from the LP spooler. For example:

    /usr/sbin/lpadmin -xlaser1

  10. Restart the LP spooler:

    /usr/sbin/lpsched

    See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command options.

Removing a Printer from a Printer Class

Read HP-UX System Administrator’s Guide: Overview to familiarize yourself with this concept.

NOTE: You cannot use HP SMH to remove a printer from a class.

Using HP-UX commands

  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. Remove the printer from the class. For example:

    /usr/sbin/lpadmin -plaser1 -rclass

  4. Restart the LP spooler:

    /usr/sbin/lpsched

See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command options.

Removing a Printer Class

See HP-UX System Administrator’s Guide: Overview to familiarize yourself with this concept.

NOTE: You cannot use HP SMH to remove a printer class.

Using HP-UX commands

  1. Ensure that you have superuser capabilities.

  2. Stop the LP spooler:

    /usr/sbin/lpshut

    For more information, see “Stopping and Restarting the LP Spooler ”.

  3. (Optional): Deny any further print requests for the printer. For example:

    /usr/sbin/reject -r"Use alternate printer." laser1

  4. (Optional): Determine if there are any jobs in the printer’s queue. For example:

    /usr/bin/lpstat -o laser1

  5. (Optional): Move all pending print requests in the request directory for the printer class to another printer or printer class. For example:

    /usr/sbin/lpmove laser1 laser2

  6. Remove the printer class. For example:

    /usr/sbin/lpadmin -xlaser

  7. Restart the LP spooler:

    /usr/sbin/lpsched

    See lpshut(1M), reject(1M), lpmove(1M), lpadmin(1M), and lpsched(1M) for details on the command options.

NOTE: When you remove a printer class, the printers in the class are not removed — you may still use them as individual printers. If you remove all printers from a class, that printer class is automatically removed.
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.