HPLIP, CUPS and Gentoo Linux

These days I installed 8 GiB of RAM and 80 GB of SSD in my good old T400S ThinkPad. But instead of just copying old files onto a new drive I decided to re-install my Gentoo Linux System. And every time I create a system there are components that need special treatment. Most of the time these are routine jobs dealing with system configurations, hardware/software quirks or just the proper use of programs.

From time to time I’ll post some memos on these system administration-related things in order to prevent myself from re-inventing the wheel.

Today this will be just a short note on installation of HP network printers (in my case a HP Photosmart Premium C309G). First one needs to emerge (i.e. install) the HP printer drivers:

emerge -DNuv net-print/hplip

Make sure following use flags are enabled:

  • X: enables the scanner GUI (xsane), i.e. is needed if use flag scanner is set
  • hpcups: build newer driver model for HP printers
  • kde: install skanlite, a KDE scanning application (sort of prevents xsane from being installed)
  • qt4: install HP Toolbox, the GUI
  • scanner: enable scanner support and pulls in the xsane application
  • snmp: enable network support

Afterwards, CUPS should be installed, too, as a dependency of hplip. It needs to be started and should be added to the default runlevel:

/etc/init.d/cupsd start
rc-update add cupsd default

Finally, the actual driver needs configuration. Just start hp-setup:


And now comes the critical part, the quirk I tripped over… In step 1 of 3 (“Device Discovery”), select “Network/Ethernet/Wireless network” and open the advanced options. It is important to select SLP as the network discovery method, because otherwise the device will just pause and show the message “/usr/libexec/cups/backend/hp failed”.