Printing support: HPLIP

Table of Contents

Install CUPS
Install HPLIP
Remote access

Install HPLIP

by ross at 06:34:35 on December 9, 2011

FreeBSD 9 does not require to remove device ulpt from kernel configuration file. You can start using your HPLIP printer out of the box.

Install

HPLIP could be installed with or without X Window user interface. Personally I prefer to build it without the GUI because it depends on alot of Qt libs and builds way to long.

CLI utilities (hp-*) provide all the functionality, for example, to see ink leveles:

> hp-levels

Black cartridge
Part No.: 132/129
Health: Good/OK

---------------------------------------------------------------------------------------------------------
|///////////////////////////////////////////////////////////////////////////////////////////////        | (approx. 91%)
---------------------------------------------------------------------------------------------------------

Tri-color cartridge
Part No.: 136/135
Health: Good/OK

---------------------------------------------------------------------------------------------------------
|///////////////////////////////////////////////////////////////////////////                            | (approx. 72%)
---------------------------------------------------------------------------------------------------------

Build HPLIP:

# cd /usr/ports/print/hplip
# make config
# make config-recursive
# make install clean

Options for hplip:

  • Check QT if you want X Window interface

devfs

# dmesg | grep HP
ugen1.3: <HP> at usbus1
ulpt0: <HP Deskjet D4100 series, class 0/0, rev 2.00/1.00, addr 3> on usbus1

Look for ugen line. We see that printer is attached to ugen1.3:

# ls -l /dev/ugen1.3
lrwxr-xr-x  1 root  wheel  9 Dec  9 05:28 /dev/ugen1.3 -> usb/1.3.0

This is symlink to usb/1.3.0. Create system ruleset in /etc/devfs.rules:

[system=10]
add path 'usb/1.3.0' mode 0660 group cups

Add to /etc/rc.conf:

devfs_system_ruleset="system"
cupsd_enable="YES"
# service devfs restart
# service cupsd start

Copy devd config:

# cp /usr/local/share/examples/cups/ulpt-cupsd.conf /etc/devd/
# service devd restart

Add yourself and other home users to cups group:

# pw groupmod cups -m ross

These users should relogin to gain access (or simply reboot).

Setup the printer

# hp-setup -a

Or hp-setup without parameters if you built support for graphical user interface.

It is possible that hp-setup won't find correct .ppd file. Select it manually, in my case it was /usr/local/share/ppd/HP/hp-deskjet_d4100_series-hpijs.ppd.gz (all the other PPDs are there — select one).

Navigate to http://localhost:631/, select your printer, under Administration choose Set default options. Set meida to A4, set printout mode. Set the printer as server default.

Comments