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.

Tuesday, March 13, 2007

Setting up webcam on Linux (ZC0301)

It was a rare occasion if I got my hand on a web camera. This time I borrowed it from my colleague. Last time I couldn't get it to work. I didn't remember why. But this time, it was easy as ABC.

Model : Z-Star Microelectronics Corp. Havit 3808 (this is what it says on the tin)
Chipset : ZC0301 (from lsusb)

Last time I looked at for the driver. It has been inactive for a long time. Still so far, the driver for ZC0301 is still not supported.

This time: I looked at spcaxx project page at The webcam I was using supported. As stated on the website, for Fedora Core 6 users like me can download the driver here. The driver is actually a kernel module and after installing it, you can load the module with modprobe : modprobe gspca

When done, open your kopete, and click Settings --> Configure.. --> Device and see whether it detects and display video from the webcam. Then you can enjoy webcam session with your friends and acquaintances.

Good luck!