The LPRng software is a true set of client/server applications.
The LPRng clients,
lpr, lprm, lpq, and lpc connect to a lpd server using a
TCP/IP connection.
This means that you must have TCP/IP networking enabled on your workstation
to use LPRng.
However,
you do not need to have an external network connection to the Internet.
For most single system users,
the lpd server is running on the same workstation as the client program,
and the clients will simply talk to the localhost.
The
lpc command is the main way that the lpd server
is controlled.
Here is the help information displayed by the command:
h4: {186} % lpc -=
lpc: Illegal option '='
usage: lpc [-Ddebuglevel][-Pprinter][-Shost][-Uusername][-V] [command]
with no command, reads from stdin
-Ddebuglevel - debug level
-Pprinter - printer or printer@host
-Shost - connect to lpd server on host
-Uuser - identify command as coming from user
-V - increase information verbosity
commands:
active (printer[@host]) - check for active server
abort (printer[@host] | all) - stop server
class printer[@host] (class | off) - show/set class printing
disable (printer[@host] | all) - disable queueing
debug (printer[@host] | all) debugparms - set debug level for printer
down (printer[@host] | all) - disable printing and queueing
enable (printer[@host] | all) - enable queueing
hold (printer[@host] | all) (name[@host] | job | all)* - hold job
holdall (printer[@host] | all) - hold all jobs on
kill (printer[@host] | all) - stop and restart server
lpd (printer[@host]) - get LPD PID
lpq (printer[@host] | all) (name[@host] | job | all)* - invoke LPQ
lprm (printer[@host] | all) (name[@host]|host|job| all)* - invoke LPRM
msg printer message text - set status message
move printer (user|jobid)* target - move jobs to new queue
noholdall (printer[@host] | all) - hold all jobs off
printcap (printer[@host] | all) - report printcap values
quit - exit LPC
redirect (printer[@host] | all) (printer@host | off )* - redirect jobs
redo (printer[@host] | all) (name[@host] | job | all)* - release job
release (printer[@host] | all) (name[@host] | job | all)* - release job
reread (printer[@host]) - LPD reread database information
start (printer[@host] | all) - start printing
status (printer[@host] | all) - status of printers
stop (printer[@host] | all) - stop printing
topq (printer[@host] | all) (name[@host] | job | all)* - reorder job
up (printer[@host] | all) - enable printing and queueing
diagnostic:
defaultq - show default queue for LPD server
defaults - show default configuration values
client (printer | all) - client config and printcap information
server (printer | all) - server config and printcap
Most of the lpc command line options are common to all
LPRng Clients,
with the exception of the -S server option.
This option allows the lpd host to be explicitly specified.
The lpc commands can be classified as
informational,
queue management,
problem management,
job scheduling,
and
diagnostic.
Each spool queue has a
Spool Control File,
and the lpc status command
displays selected values from this file.
The lpc active command connects to the print server and
gets the Process ID of the lpd process.
This is useful to determine if the lpd server is running
on the print server.
The reread
command connects to the lpd print server and requests
that the server reread the
printcap,
lpd.conf,
and
lpd.perms database files.
The enable and disable
commands enable and disable queuing or sending jobs to the
print queue.
The up command combines the enable and start commands
while
the down command combines the disable and stop commands.
These commands are used to start and stop printing.
The up combines start and enable
and down combines stop and disable.
These commands are usually used when there is a problem
printing a job.
The abort
command is used to kill off all printing activity
associated with a job.
It also has the side effect of stopping printing on the print queue.
The redo
command will redo or attempt to reprint a job.
The kill command combines the abort and redo command,
and is useful when there are problems with the job currently being printed
and it should be reprinted.
The topq command effictively puts the select job or jobs at the top
of the queue for printing.
The holdall,
noholdall,
and
release
commands implement a simple holding queue for jobs.
By default,
holdall is disabled.
When the holdall command enables it,
then jobs will remain in the spool queue until explicitly released
with the release command.
The hold command can also be used to hold individual jobs
until released.
The class command is used to restrict printing to jobs
whose class value,
set using the lpr -C class option,
is in the class list or matches one of the classes.
This allows the administrator to restrict printing.
For more details and an example of its use,
see Form Support.
The redirect command allows the administrator to accepts jobs
at this queue and then to have them forwarded or redirected
to another print queue.
This is useful when a printer temporarily is unavailable.
The move command allows an individual job (or jobs)
to be forwarded or redirected to another print queue.