Friday, March 23, 2007

Setting up a printer with CUPS

Printing with Linux has never been easier with CUPS. I had bad experience long ago with lpr and lprng before when printer support was still scarce. Nowadays, setting up a printer on Linux is like a 'walk in the park'. Thanks to CUPS.

HP LaserJet 1020
In my office, my pc is the only pc running Linux (FC6 to be specific) and the others are (you bet!) Windows (XP Pro Edition to be specific). My colleague sitting nearest to me is a webmaster. Her pc is connected to an HP LaserJet 1020 printer and shared with name HP1020.

Get ready the required packages
I need to print to that printer. So I decided to install SAMBA and CUPS packages for that purpose.

Finding the driver
DON'T use the driver for this printer packaged with FC6. It won't work. I tried it but I think you must try it too to prove me wrong. Of course YMMV. The driver is here. Before that, you have to read what the author's have to say on the website. It's important!. Follow the instructions on how to compile and install the ICM and the firmware files. Included in the tarball is the PPD file for working with the printer.

Connect to the printer
Once all the above completed, add the printer to cups so that she knows where to send files for printing.

Put the name, location and description for the printer. At this stage, it won't set the 'real' things yet.


Select the device for the printer. It obviously "Windows Printer via SAMBA".

The device URI should be in this form : smb://servername/sharename or smb://Workgroup/servername/sharename. To know the sharename, you can use this command to list all shared folder on the server servername: smbclient -L servername

At this stage, click Browse button and find the PPD file in the folder where you extract the tarball. Find the folder named PPD in there and click on the file named HP LaserJet 1020.ppd or a file named after your printer model and then click Add Printer. Now you are done setting up the printer in CUPS system. To see whether the printer has been added to the system, click Printers tab. If it is listed, then you are now good to test the printer by clicking on Test Printer button. For now, the driver supports printing in Black and White only. Works are in progress though to support color printing.

Good luck.

0 comments:

Post a Comment