Use OpenBSD with an Image Scanner

HP Deskjet 2200c

I have a 10 year old “HP Deskjet 2200c”. It is not supported by MacOS X so I thought I would try out OpenBSD. And yes it does work after some investigations and trial and error. Some issues remain but at least images are scanned. This is briefly how I did it.

First install sane and xsane.

pkg_add sane-backends sane-frontends
pkg_add xsane

The process is as always quite well documented by OpenBSD.

pkg_info sane-backends
less /usr/ports/graphics/sane-backends/files/README.OpenBSD
man sane

Disable uscanner at boot. Note: uscanner is being removed from OpenBSD which means that this disablement doesn’t needs to be done in 4.9+.

boot> boot wd0a:/bsd -c
UKG> disable uscanner
UKG> exit

Enable access to neccesary devices

chmod 666 /dev/usb*
chmod 666 /dev/ugen*.*

Start xsane with sudo. I have some permission problem even if I have enabled access to neccesary drivers. How to debug this? xsane is accessible through XFCE menues, but not including sudo rights.

sudo xsane

That’s it. You have to accept the security message with running xsane as root.

Convert scanned images

SANE support output format of pnm and tiff. To import this other programs as e.g. Acrobat you need to convert to another format.

On OpenBSD a number of tools may be used for file conversion e.g. ImageMagick, netpbm and tiff2png.

pkg_add netpbm

On MacOS X I used netpbm to convert files. First you need to install via fink (assumes that you already have fink installed and up to date).

fink install netpbm

When it is installed it is easy to convert files. Use e.g. pnmtopng.

pnmtopng 0001.pnm > 0001.png