Introduction to CUPS
The Common Unix Printing System (CUPS) is a print spooler and
associated utilities. It is based on the "Internet Printing
Protocol" and provides printing services to most PostScript and
raster printers.
Package Information
Additional Downloads
CUPS Dependencies
Recommended
libjpeg-6b, libpng-1.2.29,
and LibTIFF-3.8.2
Optional
pkg-config-0.22, D-BUS-1.0.2,
OpenLDAP-2.3.39, OpenSSL-0.9.8g
or GnuTLS-1.6.3, Linux-PAM-0.99.10.0, PHP-5.2.3,
Python-2.5.2, JDK-6 Update 5,
OpenSLP,
libpaper,
libacl (requires
libattr), HTMLDOC, and
Valgrind
(optionally used if running the test suites)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/cups
Installation of CUPS
Create an lp
user, as CUPS will create some files owned by this
user. (The lp
user is the default
used by CUPS, but may be changed
to a different user by passing a parameter to the configure script.) Use the
following command as the root
user:
useradd -c "Print Service User" -d /dev/null -g lp -s /bin/false -u 9 lp
Install CUPS by running the
following commands:
patch -Np1 -i ../cups-1.2.12-security_fixes-2.patch &&
./configure &&
make
To test the results, issue: make
check. This will run a basic test suite without any
load testing. If you wish to run the tests specifying non-default
parameters, issue: make
test. Note that the “torture load testing” test uses more resources
than those displayed in the prompt.
Now, as the root
user:
make install
The man files are installed in
compressed (.gz
) format. If desired,
use the following commands to uncompress them:
gunzip -v /usr/share/man/man{\
1/{cancel,cups{-config,test{dsc,ppd}},\
lp{,options,passwd,q,rm,r,stat}}.1,\
5/{{classes,client,cups-snmp,cupsd,printers,subscriptions,mailto}.conf,\
mime.{convs,types}}.5,\
7/{backend,filter}.7,\
8/{accept,cups{d,addsmb,enable,-{deviced,driverd,lpd,polld}},\
lp{admin,info,move,c}}.8}.gz &&
rm -v /usr/share/man/man8/{reject,cupsdisable}.8.gz &&
ln -v -s accept.8 /usr/share/man/man8/reject.8 &&
ln -v -s cupsenable.8 /usr/share/man/man8/cupsdisable.8
Configuring CUPS
Configuration of CUPS is dependent
on the type of printer and can be complex. Generally, PostScript
printers are easier. For detailed instructions on configuration and
use of CUPS, see http://www.cups.org/documentation.php.
The Software Administrators Manual and Software Users Manual are
particularly useful.
For non-PostScript printers to print with CUPS, you need to install ESP
Ghostscript-8.15.4 to convert PostScript to raster images and a
driver (e.g., from Gutenprint-5.0.1) to convert the resulting
raster images to a form that the printer understands. Foomatic drivers
use Ghostscript to convert PostScript to a printable form directly,
but this is considered to be a hack by CUPS developers.
Kernel Configuration
To use your printer you will likely need the appropriate drivers
enabled in the kernel — for example, “Parallel printer support” if you have a
parallel port printer, or “USB Printer
support” for a USB printer.
Boot Script
During the installation, CUPS
added startup files in /etc/rc.d
.
These scripts will work in most cases, but will fail if you
provide printers to Samba
clients. Additionally, they are not consistent with standard LFS
style scripts. Replace the installed scripts with the scripts and
symlinks included in the blfs-bootscripts-20080816 package:
make install-cups