My parents bought a scanner for family photos about 4 years ago, an Epson Perfection 3490. It was unused for years, and when we tried to scan in a new album XSane reported an I/O Error and died. The Windows drivers fail in a similarly uninformative fashion. Our best guess is that the lightbulb (a non-user-replaceable cold cathode) died, a situation that the manual hints isn’t handled well by their software.
Next we tried an old Acer/BenQ 620U, but all the SANE utils on Ubuntu (Hardy and Lucid) crashed with Floating Point Exception. Our only Windows machine runs Win7, and the 620U (which has a sticker that says “Get Ready for Win98″) has no drivers for anything later than XP. We also have a SCSI scanner around, but our only SCSI card is ISA. No dice.
So we started looking for scanners. The cheapest one was the Canon CanoScan LiDE 100 ($60), but its support under Linux seemed questionable. SANE appears to support it, but only as of three weeks ago, and only in git head. We kept looking.
Eventually we found the DeskJet F4480 (an “all-in-one”). It’s nominally $80, but universally “on sale” for $60. I wonder if they’re selling it below cost and counting on ink cartridge purchases to make up the difference. We looked into Linux support.
It turns out that the F4480 is supported by the most recent versions of HPLIP, HP’s official open source driver package. HPLIP is packaged for Ubuntu, but there are no backports, and the latest version for Hardy is way too old. Reluctant to push this old machine through a dist-upgrade, I looked through the HPLIP site and found the Installation Wizard, which pointed me to the direct install/upgrade procedure.
The procedure is fascinating. First you download a 20 MB shell script, which is in fact a self-extractor containing a tarball as a string inside the script file. When you run the script it displays a series of simple prompts. First, it autodetects your distro+version and requests confirmation. Based on your answer, it makes calls to your package manager (on Ubuntu via Aptitude) to install a bunch of devel packages like python-qt4-devel and libsane-devel.
Once all the prereqs are installed, the script then invokes ./configure, make clean, and make, which compiles a big heap of C and C++ using the aforementioned devel packages. Once make finishes, the script invokes a graphical installer (perhaps just compiled) to complete the installation.
On the one hand, this is kind of a horrific install procedure. Tarballs hidden in shell scripts, endless special cases for different distros, an installer that’s half text (not even ncurses) and half qt4, and a big compilation on the user’s machine. Clearly the correct solution would be for Ubuntu to backport HPLIP upgrades for LTS releases, so that you don’t have to upgrade the OS just to plug in a new scanner.
On the other hand, this is a beautiful example of the power of open source. You are free to build an installer any way you like. No one can stop you; it’s between you and your user. You can freely download any prerequisites. Because the source is open, you can compile it on the user’s machine, and not worry about compatibility with different library versions or even different CPU architectures.
The scanner, by the way, is working perfectly, and the images look great. Sometimes ugly is beautiful.