accept - Linux Command



NAME

accept - This command causes the print queue to accept printing job requests.

SYNOPSIS

accept [ -E ] [ -U username ] [ -h hostname[:port] ] destination(s) 

DESCRIPTION

The accept command allows the queuing of print requests for the named Destinations. A Destination can be either a printer or a class of printers. When a printer is accepting requests, a user is able to submit a print job to the printer, even if it is not enabled. This allows short maintenance to be completed on the printer while still allowing jobs to be submitted.

This commands only works when you're logged in as root, either when you log in or after switching to root using the su command.

If the printer is not accepting requests, a user submitting a job will receive an error. In other words, the administrator can disable a printer to change paper or to change toner, but the scheduler will still accept the request.

This command allows printer names to contain any printable character except SPACE, TAB, "/", or "#". Also, printer and class names are not case-sensitive.

OPTIONS

TagDescription
-EForces encryption when connecting to the server.
-USets the username that is sent when connecting to the server.
-h hostname[:port]You can use hostname and port to connect to a remote server.
-r "reason"Sets the reason string that is shown for a printer that is rejecting jobs.

EXAMPLES

Consider a printer named laserjetV attached to your PC running Linux/Unix system. Following is a sequence of steps to print a document:

Step 1 - To enable the printer

$enable laserjetV

Step 2 - To check the status of printer, run lpstat command:

$lpstat -a -p laserjetV

Step 3 - The output shown will be as follows:

laserjetV not accepting requests since Jan 01 00:00
printer laserjetV is idle. enabled since Jan 01 00:00

At this point, the printer is enabled, but still not accepting requests. In order to have the printer accept requests, run the following accept command:

Step 4 - Start accepting print requests:

$accept  laserjetV

Consider our printer is available on a server available remotely whose IP address is 120.10.100.100 and port is 631, then we will issue following accept command:

$accept -h 120.10.100.100:631 laserjetV 

Now again use lpstat -a command

$lpstat -a -p laserjetV

This will produce following result:

laserjetV accepting requests since Jan 01 00:00
Advertisements