printman

Managing print jobs is not fun under linux (or any UNIX for that matter... even IBM's SMIT leaves a lot to be desired). RedHat and others have made easy-to-use interfaces for the single-user, but these run in X and are ill-suited for print servers.

We used to run Netware servers but the yearly license fee became tiring so we switched everything over to Linux with Samba and Netatalk. This was a good solution except for the fact that the Netware print servers provided an interface so that people to delete jobs, manupulate queues and other such activities when things went wrong (paper jam, out of toner, etc). Linux provides lpc. You may be able to see a problem here:

  • People have to be logged in as 'root' so that they can kill jobs that other people have submitted (to no-longer functioning printers)
  • People have to be comfortable with lpr, lpq, lprm and lpc
And while playing user-games and X can solve the above problems, I thought that an easy-to-use console-based menu system would suffice. I wrote 'printman' to fill this need-- you can download it by clicking here.

Printman consists of a perl program and a new perl module called LP. After you untarball the thing, you need to

  • Copy LP.pm to your site_perl directory (which is usually something like /usr/lib/perl5/site_perl).
  • Copy printman to any executable directory (I prefer /usr/local/bin).
And then edit printman so that it knows about which printers you have. Here is the crucial part:
my %PRINTERS = ('Dec Laser', 'dec',
                'HP DeskJet 1200C/PS', 'jet',
                'HP LaserJet4', 'hp4');
This is a paired-up list (hash, if you're familiar with the term) which matches a "human readable" name to the name in /etc/printcap. Simply make sure that this matches your setup and you should be good to go.

Warning: You must be running Berkely's LPD (ie, lpq lprm lpc) for this to work-- it is the default on most linux distribuitions, but some people are now using LPRNG which won't work with this. You also need to have Curses.pm, which is the Perl interface to the Curses library (you can get it from any CPAN site).