...making Linux just a little more fun!
By Edgar Howell
Tired of hassles with printers not intended for Linux and the endless compromises they involve, I finally decided to buy a color laser printer with a network card. There were several factors involved in making this decision:
But the consequences of this decision were not trivial. SuSE (at current writing at 9.3, I'm at 9.2) has been installing CUPS behind the scenes for several releases. Since the printer commands are pretty much the same as those used under lprng, there never was any real need to learn much about CUPS. Well, not until the network printer arrived and then very quickly the fun began.
Just one example of the problems: although the documentation says that the password wanted when logging in to admin is the root password, that has never worked for me.
However, as usual, if you know what needs to be done, CUPS really isn't that difficult to work with. Assuming that CUPS has already been installed on the machine in question, here is my list of the steps to install a network printer on it under CUPS. You will need to do this on every machine that is to have access to this printer. Note that in the following, the installation instructions of the manufacturer are irrelevant.
Make sure you select a printer for which the manufacturer provides a PPD (Postscript Printer Definition) since only the manufacturer can produce the PPD needed to make optimum use of the hardware. Actually, this is important whether the printer attaches directly to a PC or via the LAN. The printer I selected didn't have a PPD on the CD-ROMs that came with it, but a little time searching the Internet pointed me at a file that had two - one for the black and white variety, and one for color.
As root, do the following:AuthType, AuthClass and AuthGroupName
cupsd : ALL
" to /etc/hosts.allow
/usr/sbin/lpadmin -p net_printer -E -m printer.ppd \ -v socket://192.168.0.1
printer net_printer is idle. enabled since Jan 01 00:00 system default destination: net_printer
Recent converts to Linux should note that a PPD is analogous to but quite different from the notorious driver. As with a driver, under CUPS one needs a PPD for the printer. But it isn't executable code that can make your system unstable. Perhaps better compared with a configuration file, essentially it just contains plain-text data that informs the print system (CUPS) what capabilities the printer has and how to format data accordingly.
On the other hand, each machine that is to send print jobs to the printer has to have the correct PPD, as is the case with a driver: the machine initiating printing has to send something to the printer that it can understand.
By following the above steps, it took me less than 15 minutes to enable a notebook under SuSE 8.0 to print via the network printer. And that includes the time it took to remove lprng and install CUPS from the distribution CD!
Keep in mind that this ignores about 99.99% of CUPS and is totally insecure. Anyone with access to your network could start print jobs wasting toner until the paper runs out.
But for a simple home system behind a firewall, it will enable your network printer under CUPS and buy you the time to learn all the things we've ignored for the moment.
Edgar is a consultant in the Cologne/Bonn area in Germany.
His day job involves helping a customer with payroll, maintaining
ancient IBM Assembler programs, some occasional COBOL, and
otherwise using QMF, PL/1 and DB/2 under MVS.
(Note: mail that does not contain "linuxgazette" in the subject will be
rejected.)