OpenBSD Printing with CUPS, Ghostscript, and Gimp-Print

  1. Installation
  2. Configuration
  3. Troubleshooting


  1. Look up your printer in the database to check for compatability issues. While you're there, grab the recommended driver package. This guide assumes the recommended driver package is Ghostscript+Gimp-Print.
  2. Determine the device node associated with your printer: this is usually /dev/lpt0 for parallel port connections and /dev/ulpt0 for USB connections.
  3. Many compilation processes require the GNU version of 'make', which can be downloaded from the OpenBSD repository. Install it with the following command: sudo pkg_add -i [gmake-package-name] If pkg_add is unable to access gmake's dependencies, you will need to install them manually as well. NOTE: source packages are typically compressed. This guide assumes you have decompressed the source into an appropriate build directory. For information on how to decompress source distributions prior to installation, see this tutorial.
  4. Download the CUPS source and install. The version used here is 1.1.23. ./configure [options] It is NOT recommended that you install CUPS in a non-standard location, as Ghostscript and Gimp-Print may not be able to find the files they need. gmake sudo gmake install
  5. Download Ghostscript and install. The version used here is 7.07.1. ./configure --without-gimp-print [--without-x] Disable X support if you don't intend to use X windows. Gimp-print is disabled as it isn't installed yet. This order of installation of installation will not affect the funcationality of CUPS and avoids an issue with compiling Ghostscript with Gimp-print's libaries. gmake sudo gmake install
  6. Download and install Gimp-Print. The version used here is 4.2.7. ./configure --without-gimp --without-translated-ppds Disable GIMP support unless you intend to use the package with The GIMP image software. Disabling translated ppds is not absolutely necessary, but significantly reduces the build time and avoids a bug where BSD systems will build multiple copies of the English language ppds. gmake sudo gmake install
  7. Start CUPS: sudo cupsd If /usr/sbin is not in your path, you'll need to specify the full pathname: /usr/sbin/cupsd
  8. Status Check: Make sure CUPS is running: ps auxw | grep cupsd ...and there are no errors in the log file: cat /var/log/cups/error_log Also check that the 'direct' connections are being detected by CUPS: lpinfo -v


Point your browser of choice to http://localhost:631/. If you have trouble connecting, make sure your firewall settings allow traffic on TCP port 631. If you're prompted to authenticate, use the system's root login. Access control can be fine-tuned later with /etc/cupsd.conf

If everything has been installed correctly, you should be able to add a printer and print a test page.

To have CUPS start on boot, add the following to /etc/rc.local: if [ -x /usr/sbin/cupsd ]; then
echo "Starting cupsd..."
/usr/sbin/cupsd fi



If your printer and motherboard support bi-directional communication, the printer should show up in dmesg--type 'dmesg' at the command prompt to see this output. 'dmesg | grep lpt' should also produce output for parallel connections, if not, check that your parallel port is enabled in the system BIOS settings.

You can test a parallel connection by redirecting text from standard output to the device node: top > /dev/lpt0


If you're compiling Ghostscript as well as Gimp-Print, make sure to compile and install Ghostscript first using the '--without-gimp-print' option. This will prevent the build process from terminating prematurely with errors such as "/usr/local/lib/ undefined reference to `dgettext'"


Solutions to most common CUPS errors can be found at

Error: /invalidfont in findfont

If you've compiled Ghostscript and aren't running X Windows, you probably don't have any fonts installed. Installing the Ghostscript-fonts package on the OpenBSD repository ( and restarting CUPS should solve this.

Slow Printing

Some printers slow to a crawl in interrupt-driven environments. If you're having trouble with slow printing, try switching to the polled-mode device nodes (/dev/lpa* instead of /dev/lpt*). Setting the parallel port mode to one compatible with your printer's capabilities may help as well.