|
» |
|
|
|
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 SMHIf you use HP SMH
to add a printer, it will prompt you to initialize the LP spooler. Using HP-UX CommandsYou can use HP-UX commands to initialize the LP
spooler by following these steps: Add at least one printer to the LP spooler. See “Adding a Local Printer to the LP Spooler ”. 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”. 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. 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 SMHThe 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 CommandsEnsure
that you have superuser capabilities. Stop the
LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. 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. 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. Enable
the newly added printer to process print requests. For example: /usr/bin/enable local_printer
|
See “Enabling or Disabling a Printer” for details. Restart
the LP spooler: 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. | | | | |
Access
the HP SMH homepage as root. 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. | | | | |
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. From
the Action pulldown menu, choose AddRemotePrinter/Plotter .... Depending
on the type of printer or plotter provide detailed configuration information
such as: Whether
Remote Printer is on a BSD system Whether to Allow Anyone to Cancel a Request Whether to Make this Printer the Default Destination
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: Edit /etc/services (on remote system), and if necessary, uncomment
the line beginning with printer by removing the#. Ensure
no systems are restricted from access by /var/adm/inetd.sec. Make
sure rlpdaemon is running.
Using HP-UX CommandsEnsure
that you have superuser capabilities. Stop the
LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. 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. Allow
print requests to be accepted for the newly added remote printer.
For example: /usr/sbin/accept local_printer If
the printer being added will be the default printer, execute the following: /usr/sbin/lpadmin -dlocal_printer Enable
the newly added printer to process print requests. For example: /usr/bin/enable local_printer Restart
the LP spooler to process print requests. /usr/sbin/lpsched 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.
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. 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. Reconfigure the Internet daemon inetd, forcing it to reread the /etc/inetd.conf file.
Invoke the following command: Also, check entries in /var/adm/inetd.sec that restrict which systems can send remote print requests. 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 SMHYou 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 CommandsIf 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: Ensure
that you have superuser capabilities. Stop
the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. 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. Allow
print requests to be accepted for the newly added printer class. For
example: Restart
the LP spooler: /usr/sbin/lpsched
Removing a Printer from the LP Spooler | |
Using HP SMHUsing HP-UX commandsEnsure
that you have superuser capabilities. (Optional):
Notify users that you are removing the printer from the system. 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.) Stop
the LP spooler: For more information, see “Stopping and Restarting the LP Spooler ”. (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”. (Optional):
Determine if there are any jobs in the printer’s queue. For
example: /usr/bin/lpstat -o laser1 (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. (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 Remove
the printer from the LP spooler. For example: /usr/sbin/lpadmin -xlaser1 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 commandsEnsure
that you have superuser capabilities. Stop
the LP spooler: /usr/sbin/lpshut For more information, see “Stopping and Restarting the LP Spooler ”. Remove
the printer from the class. For example: /usr/sbin/lpadmin -plaser1 -rclass 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 commandsEnsure
that you have superuser capabilities. Stop
the LP spooler: /usr/sbin/lpshut For more information, see “Stopping and Restarting the LP Spooler ”. (Optional):
Deny any further print requests for the printer. For example: /usr/sbin/reject -r"Use alternate printer."
laser1 (Optional):
Determine if there are any jobs in the printer’s queue. For
example: /usr/bin/lpstat
-o laser1 (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 Remove
the printer class. For example: /usr/sbin/lpadmin -xlaser 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. | | | | |
|