![]() |
![]() |
| |||||||||||||||||||||||||||
|
# disable [-c | -W] [-r "reason"] printer-name |
Note - You cannot enable or disable classes of printers. Only individual printers can be enabled or disabled.
Start printing print requests.
# enable printer-name |
Verify that the printer is enabled.
$ lpstat -p printer-name |
The following example shows how to stop the current job on the printer luna, save it to print later, and provide a reason why the printer has stopped printing print requests.
# disable -r "changing the form" luna |
The following example shows how to start printing print requests on the printer luna.
# enable luna printer "luna" enabled |
The accept and reject commands enable you to turn on or turn off a print queue that stores requests to be printed.
When you use the reject command, the print queue for a specified printer is turned off. No new print requests can enter the queue on the print server. All print requests that are in the queue are still printed. You must disable the printer if you want it to stop printing requests that are already in the queue. The following table compares the functions of the accept, reject, enable, and disable commands.
Table 5-7 Functions of accept, reject, enable, and disable Commands
Command | Function |
|---|---|
accept | Accept print requests that are sent to the print queue. |
enable | Print the requests that are in the print queue. |
reject | Reject print requests that are sent to the print queue. |
disable | Stop printing requests that are currently in the print queue. |
If a print request is rejected, the print service writes or mails a message to the user who submitted the request, saying that print requests are not being accepted for the specified printer.
You can also specify a reason for not accepting requests through the command line. The reason is displayed on users' systems when one tries to check the printer's queue. The following figure shows the point at which processing of print requests is interrupted when a print queue rejects print requests.
Figure 5-2 What Happens When a Print Queue Accepts or Rejects Requests

How to Accept or Reject Print Requests for a PrinterLog in as superuser, lp, or assume an equivalent role on the print server.
Stop accepting print requests for the printer.
# reject [-r "reason"] printer-name |
-r "reason" | Provides users a reason why the printer is rejecting print requests. The reason is stored and displayed whenever a user checks on the status of the printer with the lpstat -p command. |
printer-name | Name of the printer that will stop accepting print requests. |
The queued requests will continue printing as long as the printer is enabled. For instructions on disabling a printer so it stops printing, see How to Enable or Disable a Printer.
Start accepting print requests for the printer.
# accept printer-name |
Check that the status of the printer to see whether it is accepting or rejecting print requests.
$ lpstat -p printer-name |
The following example shows how to stop the printer luna from accepting print requests.
# reject -r "luna is down for repairs" luna destination "luna" will no longer accept requests |
The following example shows how to set the printer luna to accept print requests.
# accept luna destination "luna" now accepting requests |
You can use the cancel command to cancel print requests from printer queues or to cancel jobs that are printing. Three ways to use the cancel command are as follows:
Cancel requests by request identification number (request ID)
Cancel requests from a specific user on all printers or specific printers
Cancel the job currently printing
When you use the cancel command, a message tells you the request(s) are canceled, and the next request in queue is printed. You can cancel a print request only if you are:
The user who submitted the request and you are logged in on the system from which you submitted the request
The user who submitted the request on any client system and the print server has the "user-equivalence" option configured for the printer in it's /etc/printers.conf file.
Logged in as superuser or lp or have assumed an equivalent role on the print server.
To cancel a specific request, you need to know its request ID. The request ID contains the name of the printer, a dash, and the number of the print request. For example, luna-185.
When you submit the print request, the request ID is displayed. If you do not remember the print request ID, you can find it by using the lpstat command with the -o printer option.
How to Cancel a Print RequestIf you are going to cancel print requests of other users, become superuser, lp, or assume an equivalent role.
Determine the request IDs of the print requests to cancel.
# lpstat |
For more details, see How to Check the Status of Print Requests.
Cancel a print request.
$ cancel request-id | printer-name |
Verify that the print requests are canceled.
$ lpstat -o printer-name |
Previous Contents Index Next ![]() |