The lprc program is used to control the operation
of the line-printer system.
For each printer configured in /etc/printcap, lprc may be used to:
- disable or enable a printer
- disable or enable a printer's spooling queue
- rearrange the order of jobs in a spooling queue
- find the status of printers and their associated spooling queues and printer daemons
The lprc
program gives the root user local control over printer
activity. Here are the program's major commands and their intended
uses (see the Utilities Reference entry for the command
format and full list of commands).
- start
- Enable printing and ask
lpd
to start printing jobs.
- abort
- Terminate an active spooling
daemon on the local host immediately and then disable printing
(preventing new daemons from being started by
lpr).
You typically use the abort command
to forcibly restart a hung printer daemon (e.g., when
lprq
reports that a daemon is present, but nothing is happening).
The abort command doesn't remove any jobs from the
spool queue; for this, use
lprrm.
- enable and disable
- Turn spooling in the local queue on or off, in order to allow or prevent
lpr
from putting new jobs in the spool queue.
For example, you may want
to use the disable command when testing new printer
filters, because this lets root print, but prevents
anyone else from doing so. The other main use of this option is
to prevent users from putting jobs in the queue when the printer
is expected to be unavailable for a long time.
- restart
- Allow ordinary users to restart printer daemons when
lprq
reports that no daemon is present.
- stop
- Halt a spooling daemon after
the current job is completed; this also disables printing. This is
a clean way to shut a printer down for maintenance. Note that users
can still enter jobs in a spool queue while a printer is stopped.
- topq
- Place selected jobs at the top of a printer queue.
You can use this command to promote high-priority jobs
(lpr
places jobs in the queue in the order they were received).