Richard Bucker

Losing Faith in OpenBSD

Posted at — Feb 14, 2023

I have a pretty sweet OpenBSD setup. The computer (intel NUC - i5, 32GB ram and ~300GB SSD, dual 34in monitors) is not the fastest in my LAB but it works well enough to get the job done.

For the last 2 days I have been struggling to get basic printing accomplished. OpenBSD seems to thrive on Postscript and raw printing from the basic installation. I suppose back in the day of line printers that sort of configuration was acceptable. And in some cases I would agree. My HP Smart Tank 651 printer is supposed to driverless. Unfortunately there is no quality description of what that means. I’ve runmmaged around the docs and nothing seems to work.

I went looking for PPD drivers and open drivers and HP drivers… and nada.

I remember when interviewing with Microsoft in the pre-Windows-3.1 days how they complained about their printer drivers.

I finally decided that CUPS was the way to go. I even tried to extract the cups drivers and integrate them into my desktop but that failed. I had to do a proper cups install.

pkg_add cups--
rcctl enable cupsd
rcctl start cupsd

then launch the web browser and go to localhost:631.

Start by clicking on add printer… you’ll be asked for a user/pwd. I used my personal user not root. From that point just do the installation… maybe a test page. When you finally get the printer name you’ll need to set the PRINTER environment variable.

export PRINTER=HP_Smart_Tank_Plus_650_series

Now when you run lpr or otherxi toolss from the CLI they will know where to go. One challenge is that cups seemed to duplicate the CLI tool names… the default lpr is in /usr/bin and the cups version is in /usr/local/bin/lpr. So the order of the folders will mean something.

I almost gave up.

Initial testing (printing a webpage) failed because the browser did not know cups was running… after restartng firefox I was able to print directly… and all is right in the world… again.