[an error occurred while processing this directive] FreeBSD Handbook : Printing : Using Printers : Administrating Printers
Previous: Beyond Plain Text: Printing Options
Next: Advanced Printer Setup

7.5.5. Administrating Printers

As an administrator for your printers, you've had to install, set up, and test them. Using the lpc command, you can interact with your printers in yet more ways. With lpc, you can

First, a note about terminology: if a printer is stopped, it won't print anything in its queue. Users can still submit jobs, which will wait in the queue until the printer is started or the queue is cleared.

If a queue is disabled, no user (except root) can submit jobs for the printer. An enabled queue allows jobs to be submitted. A printer can be started for a disabled queue, in which case it'll continue to print jobs in the queue until the queue is empty.

In general, you have to have root privileges to use the lpc command. Ordinary users can use the lpc command to get printer status and to restart a hung printer only.

Here is a summary of the lpc commands. Most of the commands takes a printer-name argument to tell on which printer to operate. You can use all for the printer-name to mean all printers listed in /etc/printcap.

abort printer-name

Cancel the current job and stop the printer. Users can still submit jobs if the queue's enabled.

clean printer-name

Remove old files from the printer's spooling directory. Occasionally, the files that make up a job aren't properly removed by LPD, particularly if there have been errors during printing or a lot of administrative activity. This command finds files that don't belong in the spooling directory and removes them.

disable printer-name

Disable queuing of new jobs. If the printer's started, it will continue to print any jobs remaining in the queue. The superuser (root) can always submit jobs, even to a disabled queue.

This command is useful while you're testing a new printer or filter installation: disable the queue and submit jobs as root. Other users won't be able to submit jobs until you complete your testing and reenable the queue with the enable command.

down printer-name message...

Take a printer down. Equivalent to disable followed by stop. The message appears as the printer's status whenever a user checks the printer's queue with lpq or status with lpc status.

enable printer-name

Enable the queue for a printer. Users can submit jobs but the printer won't print anything until it's started.

help command-name

Print help on the command command-name. With no command-name, print a summary of the commands available.

restart printer-name

Start the printer. Ordinary users can use this command if some extraordinary circumstance hangs LPD, but they can't start a printer stopped with either the stop or down commands. The restart command is equivalent to abort followed by start.

start printer-name

Start the printer. The printer will print jobs in its queue.

stop printer-name

Stop the printer. The printer will finish the current job and won't print anything else in its queue. Even though the printer is stopped, users can still submit jobs to an enabled queue.

topq printer-name job-or-username...

Rearrange the queue for printer-name by placing the jobs with the listed job numbers or the jobs belonging to username at the top of the queue. For this command, you can't use all as the printer-name.

up printer-name

Bring a printer up; the opposite of the down command. Equivalent to start followed by enable.

lpc accepts the above commands on the command line. If you don't enter any commands, lpc enters an interactive mode, where you can enter commands until you type exit, quit, or end-of-file.


FreeBSD Handbook : Printing : Using Printers : Administrating Printers
Previous: Beyond Plain Text: Printing Options
Next: Advanced Printer Setup [an error occurred while processing this directive]