This document sets out to describe how to install and configure CUPS on GNU/Linux I'll assume that you already know why you need CUPS. Configuring for a different printer shouldn't be that difficult, CUPS is super easy to use.

Install Software

Praxis comes with CUPS configured as, using Avahi not Zeroconf

[ebuild     U ] net-print/cups-1.3.11-r3 [1.3.11-r2] USE="-X acl avahi dbus gnutls -java jpeg -kerberos -ldap pam perl -php png ppds python -samba -slp ssl -static tiff -xinetd -zeroconf"

We have minimal bindings and exclude Samba because Windows folks should be printing via IPP, not Samba=>CUPS We are using Avahi and not Zeroconf, DBUS must be included.

Configure Cups

For printing from Windows through Samba update the MIME configurations. Firstly mime.types and mime.convs need to be edited as follows, the lines are commented out near the bottom of each file.

# /etc/cups/mime.convs
application/octet-stream        application/vnd.cups-raw        0       -

# /etc/cups/mime.types
application/octet-stream

Configure the CUPS system to allow local network sharing, remote administration, and printing over IPP to your local subnet. This is wide open to your LAN.

ServerName fqdn.domain.tld
Listen 0.0.0.0:631

Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
BrowseAddress @LOCAL

<Location />
  Order allow,deny
  Allow localhost
  Allow from @LOCAL
</Location>

<Location /admin>
  Order allow,deny
  Allow localhost
  Allow from @LOCAL
</Location>

Now check the CUPS web-interface:

http://cupshost:631/

The CUPS interface is easy, just Add Printer and follow the wizard.

426 Upgrade Required

The CUPS system may require encrypted communications for some of the processes. This warning can be resolved in one of two ways: a) encrypt the communications or b) disable the requirement.

Encrypting GnuTLS

Encrypting with OpenSSL

Create an SSL certificate

openssl req -new -x509 \
    -keyout /etc/cups/ssl/server.key \
    -out /etc/cups/ssl/server.crt -days 3650 -nodes

Then update cups.conf to include the following, this example shows the defaults

DefaultEncryption Required
ServerCertificate /etc/cups/ssl/server.crt

It should be noted that at this time CUPS (<=1.5) validate or revoke certificates, so this configuration does not provide the full faith and trust which SSL/TLS should provide. See the CUPS Encryption Issues for more information.

Disabling Encryption

Or b) disable the security requirement (shame on you) - update /etc/cups/cupsd.conf to include the following:

DefaultEncryption Never

Installing Printer Drivers

Out of the box CUPS provides many printer drivers in the form of PPD files, some distribuions have additional driver set packages such as.

emerge net-print/foomatic-db-ppds net-print/foomatic-filters-ppds
# or
apt-get install foomatic-filters hp-ppd hpijs-ppds openprinting-ppds openprinting-ppds-extra

Printing from Windows

To print from Windows to the CUPS server we use IPP directly. When creating a new Windows printer simply point the system to one of the following. There are variances depending on your Windows versions, XP+SP2 vs SP3 vs Windows 7, &c. This will work in Mac OS X too.

ipp://server/printers/hp5550
http://server:631/printers/hp5550

See Also

History