Klaus Zimmermann's Corner

Getting xsane network scanning right with HP devices

Sort of a note-to-self kind of thing, but this turned a lot of head-banging on the wall and frustration from non-explanatory error messages into solid gold when scanning with my HP multi-function printer and xsane.

Trying to scan via IP or http directly will not work with the HP devices: you'll have to take one step further and turn your IP into a full URI scheme to have xsane correctly find it. To do so, install the package hplip (or similar from your distribution) and lots of hp-* programs will be installed. Then run the following:


This command will generate two URIs for your device, one for CUPS (printing) and one for SANE (scanning). Grab the one for SANE (mine looked like hpaio:/net/Photosmart_5520_series?ip=, and then run the following in a terminal:

xsane $YOUR_URI

This will make xsane look up your HP device and open correctly. Happy network scanning!