Despite years of hype about the coming paperless office, printing has actually become more frequent and more complex as time has passed, not less so. Ordinary users now routinely print tens or even hundreds of pages a week, a significant fraction of which is high-end, photo-quality graphics.
Despite years of hype about the coming paperless office, printing has actually become more frequent and more complex as time has passed, not less so. Ordinary users now routinely print tens or even hundreds of pages a week, a significant fraction of which is high-end, photo-quality graphics.
Traditionally, Linux systems have used the BSD spooling system. However, some recent distributions are now providing the LPRng package as the default printing subsystem instead. LPRng is an enhanced version of the BSD print spooling system (the “ng” stands for “next generation”). It is available for virtually any Unix system.
In this month’s column, we will focus on the enhancements that LPRng provides over the standard BSD printing subsystem. The procedure for installing LPRng using a different spooling system is fairly simple and is well documented in the LPRng-HOWTO, which can be found online at http://www.lprng.com/LPRng-HOWTO/LPRng-HOWTO.html.
Enhancements of Standard Commands
LPRng changes and enhances the functions of many standard BSD printing-related commands. The most important of these (from an administrative point of view) are additional subcommands provided with the lpc administrative utility. We will consider a few of them in some examples.
To begin with, there are subcommands which can be used to hold and release individual print jobs:
# lpc hold picasso 10021
# lpc release picasso
The first command places the specified job in the picasso queue into a hold state, temporarily preventing it from printing. The second command releases all held jobs in the same queue, allowing them to print.
The holdall subcommand will place all jobs entering the picasso queue immediately into the held state:
The noholdall subcommand will stop this behavior, though the held jobs will still need to be explicitly released:
The move subcommand will transfer the job from gauguin to picasso:
# lpc move gauguin 10021 picasso
The second parameter of the move command (10021) may also be a username. It’s a nice shortcut for moving all of a user’s print jobs. The following command will cause all of the jobs that are spooled to gauguin to be sent to vangogh instead:
# lpc redirect gauguin vangogh
Specify off as the target queue to turn off redirection:
# lpc redirect gauguin off
You can use the active subcommand to determine whether a specified spool daemon is active and healthy or not. For example, these commands check to see if the daemon controlling the gauguin queue is active and if the one corresponding to the matisse queue on host painters is active:
Finally, the reread subcommand may be used to force the lpd daemon to reread its configuration files. The subcommand may be followed by a queue name to specify the desired server. The following command is used to force the local daemon to reread its configuration files:
This operation is equivalent to the traditional killall -HUP lpd daemon reinitialization signal.
Linux Magazine /
December 2001 / GURU GUIDANCE
Managing Printing with LPRng