Enabling CUPS on FreeBSD

The following steps can be used to enable CUPS (Common UNIX Printing System) on FreeBSD.

Notes: Related Urls: Steps:
  1. If X11 is not installed:

    1. Make sure that WITHOUT_X11=yes is in /etc/make.conf

    2. Install ghostscript-gnu-nox11 from /usr/ports/print/ghostscript-gnu-nox11:
      # cd /usr/ports/print/ghostscript-gnu-nox11
      # make install
  2. Install CUPS from /usr/ports/print/cups:

    # cd /usr/ports/print/cups
    # make install
  3. Enable cups:

    # cd /usr/local/etc/rc.d
    # ln -s cups.sh.sample cups.sh
  4. (Optional) Enable digest authentication for /admin

    1. Change the following in /usr/local/etc/cups/cupsd.conf:

      AuthType Basic
      AuthClass System
      to
      AuthType Digest
      AuthClass Group
      AuthGroupName cupsadmin
      This should be around line 812.
    2. Create the cupsadmin group:

      # pw groupadd cupsadmin
    3. Create the cupsadmin user:

      # lppasswd -a -g cupsadmin cupsadmin
      lppasswd prompts for a password.

    NOTE:

  5. (Optional) Allow only local connections by changing the following in /usr/local/etc/cups/cupsd.conf:

    Port 631
    to
    Port 127.0.0.1:631
    This should be around line 408.
  6. (Optional) Replace lp* commands with CUPS versions:

    1. Add CUPS_OVERWRITE_BASE=yes and NO_LPR=true to /etc/make.conf

    2. Link CUPS lp* commands in /usr/local/bin to /usr/bin:

      # cd /usr/bin 
      # for i in lp* ; do mv $i $i.default ; ln -s /usr/local/bin/$i $i ; done
    The alternative is to put /usr/local/bin before /usr/bin in PATH.
  7. Start CUPS:

    # /usr/local/etc/rc.d/cups.sh start
  8. (Optional) Check to see if CUPS is running:

    $ ps -auwxx | grep cupsd
    root    482  0.0  1.2  6924 6136  ??  Ss   11:11PM   0:00.22 /usr/local/sbin/cupsd
  9. (Optional) Install the gimp-print printer drivers from /usr/ports/print/gimp-print:

    # cd /usr/ports/print/gimp-print
    # make install
  10. Access the admin interface and configure CUPS via the the url http://localhost:631/

Valid HTML 3.2

$Id: freebsd_cups.html 1023 2008-11-28 07:31:02Z ranga $