More on LinuxToday

Getting a Scanner to work in Linux

I have a Hewlett-Packard Laserjet 3050, their budget all-in-one printer, copier, fax, and scanner. According to the device matrix in the open source HPLIP project this machine is completely supported in Linux. However, I have a different definition of "support" than HP-- theirs seems to be "A determined and stubborn Linux guru can make the darned thing work if they try really hard."

The easy part is printing. Install the HPLIP packages, and the drivers will show up in CUPS. Piece of cake. The copier is easy too, just insert your document and hit a button. But

there isn't any software control panel for adjusting copy quality, you

have to use the weird little printer control panel.

CUPS also shows a fax queue, but nothing happens when I send document to it. To send faxes I have to run a hard copy through the printer and use the printer control panel. Whatever, it works.

The 3050 has a sheet-feed scanner. Yeah, el cheapo, it's what I could afford at the time. Here is where I get annoyed. My main workstation is Debian Lenny, and the darned thing does not set up scanners bloodlessly, you have to jump through mondo hoops. Last time I looked it was the 21st century, did something happen and I got sent back to 1998? Though I recall having to jump through the same hoops on Kubuntu last year on the same PC.

Useless HP Toolbox

The machine comes with the HP Toolbox, which is sort of useful, but mostly not. The graphical interface is very limited and doesn't even recognize the printer and throws up sad communication errors. It doesn't do much of anything, I wonder why they even bother.

There are some commands that are occasionally useful, and which helped me get the scanner to work. The first step for any scanner connected to a Linux PC is to consult the SANE supported devices database. (SANE is the scanner backend for Linux.) This isn't 100% complete, but it's a good start.

Then run this command to see if SANE detects your scanner:

$ scanimage -L

No scanners were identified. If you were expecting something different,

We're getting closer, really we are! Ordinarily at this point we would take this information, the vendor=0x03f0 and product=0x3217, and plug it into a /etc/udev/rules.d/ script. On my Lenny PC, that is /etc/udev/rules.d/z60_libsane.rules. Quit laughing, it is too. I don't invent this stuff, I just use it.

OK then. This file is already full of rules, so all I need to do to create a new one is copy-and-paste, using the vendor and product ID for my printer. My new rule looks like this:

Then I need to add myself to the "scanner" group, and log out and log back in to activate my shiny new group membership.

But still no scanner. A fast test is to scan a document as root and as an unprivileged user with the scanimage > filename.pnm command. This tells you if it works at all, and if you have permission problems.

Somewheres in my peeve-fueled Google searches I learned about this command from the HP Toolbox:

# hp-check -t

This spits out a lot of information, and the key bit for me was

'hpaio' not in '/etc/sane.d/dll.conf'...

SANE backend 'hpaio' is not properly set up.

Um. OK. I guess the person who crafted this message was charged by the word and ran out of budget. But it turns out it is literal-- I added the word "hpaio" to /etc/sane.d/dll.conf and lo, forsooth, and boy howdy I now have a functioning scanner.

Crazy Dream

I have this crazy dream. I dream of a world where things like this do not happen because vendors take pride in their products and want customers to have good experiences. Where HP works with CUPS and SANE to create an integrated installer and device manager. Where it doesn't take fifteen freaking years of experience to figure out how to make something that I paid for to work like it is supposed to. You know all those people who stick with commercial vendors because they get support? Ha. It is to laugh-- I got nothing from HP.

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.