Cups-1.5.0
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.
This package is known to build and work properly using an LFS-7.0
platform.
Package Information
Cups Dependencies
Recommended
libjpeg-8c, libpng-1.5.7, and
LibTIFF-4.0.0
Optional
TCP Wrappers-7.6, D-BUS-1.4.16,
libusb-1.0.8, acl-2.2.51, Linux-PAM-1.1.5, OpenLDAP-2.4.23, GnuTLS-3.0.7 or
OpenSSL-1.0.0e (looked for in that order),
Heimdal-1.4 or MIT Kerberos
V5-1.6, PHP-5.3.8, GPL Ghostscript-9.04, Python-2.7.2, IcedTea6-1.9.7 or JDK-6 Update 18,
Xdg-utils, OpenSLP, libpaper,
HTMLDOC,
and Valgrind
(optionally used if running the test suites)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/cups
Kernel Configuration
If you have a parallel printer enable the following options in your
kernel configuration and recompile the kernel:
Device Drivers --->
[*] Parallel port support --->
[*] PC-style hardware
...
Character devices --->
[*] Parallel printer support
Note
If you have a USB printer there is a conflict between the
Cups libusb backend and the kernel driver. If you
want to use Cups with
libusb support do not enable USB Printer support in
your kernel and remove the --disable-libusb
when you configure Cups.
If you want to use the kernel usblp driver enable the following
options in your kernel configuration and recompile the kernel:
Device Drivers --->
[*] USB support --->
...
Enable support for either UHCI or OHCI, not both:
[*] OHCI HCD support
[*] UHCI HCD (most Intel and VIA) support
...
[*] USB Printer support
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:
sed -i 's#@CUPS_HTMLVIEW@#firefox#' desktop/cups.desktop.in &&
./configure --localstatedir=/var --disable-libusb --with-rcdir=/tmp/cupsinit --with-docdir=/usr/share/doc/1.5.0 &&
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 &&
rm -rf /tmp/cupsinit
The man files are installed in
compressed (.gz
) format. If desired,
use the following commands to uncompress them as the root
user:
pushd /usr/share/man/ &&
find -name cups\*gz -type l -print -delete &&
find -name \*gz -exec gunzip -v {} \; &&
popd &&
ln -v -s cupsaccept.8 /usr/share/man/man8/reject.8 &&
ln -v -s cupsaccept.8 /usr/share/man/man8/cupsreject.8 &&
ln -v -s cupsaccept.8 /usr/share/man/man8/accept.8 &&
ln -v -s cupsenable.8 /usr/share/man/man8/cupsdisable.8
Command Explanations
sed -i 's#@CUPS_HTMLVIEW@#firefox#'
...: This changes the browser that the Cups desktop file uses for its web interface.
--localstatedir=/var
: This changes the
location of the cache, log, run and spool directories from /usr/var
to /var.
--disable-libusb
: This disables the
Cups libusb backend. If you'd like Cups to use libusb, delete this option and make sure you
compile your kernel with: # CONFIG_USB_PRINTER is not set
--with-rcdir=/tmp/cupsinit
: This option
makes it install its bootscript into /tmp
instead of /etc/rc.d
.
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 GPL
Ghostscript-9.04 to convert PostScript to raster images and a
driver (e.g., from Gutenprint-5.2.5) 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.
Boot Script
If you want the Cups to start
automatically when the system is booted, install the init script
included in the blfs-bootscripts-20111226 package:
make install-cups
Contents
Installed Programs:
accept, cancel, cups-config, cupsaccept,
cupsaddsmb, cupsctl, cupsd, cupsdisable, cupsenable,
cupsfilter, cupsreject, cupstestdsc, cupstestppd, lp, lpadmin,
lpc, lpinfo, lpmove, lpoptions, lppasswd, lpq, lpr, lprm,
lpstat, ppdc, ppdhtml, ppdi, ppdmerge, ppdpo, reject
Installed Libraries:
libcups.so, libcupscgi.so,
libcupsdriver.so, libcupsimage.so, libcupsmime.so,
libcupsppdc.so, and various filters and backend drivers
Installed Directories:
/etc/cups, /usr/include/cups,
/usr/lib/cups, /usr/share/cups, /usr/share/doc/cups-1.5.0,
/var/cache/cups, /var/log/cups, /var/run/cups and
/var/spool/cups.
Short Descriptions
accept
|
instructs the printing system to accept print jobs to the
specified destinations.
|
cancel
|
cancels existing print jobs from the print queues.
|
cups-config
|
is a Cups program
configuration utility.
|
cupsaddsmb
|
exports printers to the Samba software for use with Windows
clients.
|
cupsd
|
is the scheduler for the Common Unix Printing System.
|
cupstestppd
|
tests the conformance of PPD files.
|
disable
|
stops the named printers or classes.
|
enable
|
starts the named printers or classes.
|
lp
|
submits files for printing or alters a pending job.
|
lpadmin
|
configures printer and class queues provided by
Cups.
|
lpc
|
provides limited control over printer and class queues
provided by Cups.
|
lpinfo
|
lists the available devices or drivers known to the
Cups server.
|
lpmove
|
moves the specified job to a new destination.
|
lpoptions
|
displays or sets printer options and defaults.
|
lppasswd
|
adds, changes or deletes passwords in the Cups digest password file
passwd.md5 .
|
lpq
|
shows the current print queue status on the named
printer.
|
lpr
|
submits files for printing.
|
lprm
|
cancels print jobs that have been queued for printing.
|
lpstat
|
displays status information about the current classes,
jobs, and printers.
|
reject
|
instructs the printing system to reject print jobs to the
specified destinations.
|
Last updated on 2012-01-18 14:22:37 +0000