We describe the work being done to setup a CUPS server along with a Print
Accounting system for the School of Computer Science. Ultimately this system
will replace the lpr
and lpquota
systems.
See PrintingProblems for a discussion of problems with the xhier lpr system and how cups may be a solution to these problems.
See CupsCsServer.
See ManageUsersPrintersOnPykota
See CreateCupsPrinterStepByStep
cups-1.2.X_dev
,
consisting of static libraries and header files; cups-1.2.X_runtime
,
consisting of dynamic libraries; and cups-1.2.X
, the main CUPS package
containing the daemon cupsd
along with the various administrative and client
oriented commands. A wrapper script for CUPS lpr
command has been created
that emulates some of the -Z options that the old Xhier lpr
package uses
albeit not all options are supported. The man page for lpr
has also been
suitably edited to reflect the aforementioned emulation of the -Z options.
The documentation as described in the man pages is a little sparse, in
particular, the full command line options of the lpr
command is not present
in the man page of lpr
. Look at http://print.cs:631/help/options.htmlUnfortunately the CUPS developars are taking too much advantage that CUPS is based on the HTTP 1.1 protocol in that they like to create webpages and not offer a corresponding man page. I have created a cups-lpr-cover-1 package on xhier to amend this deficiency. It uses xh-ln to substitutes it's own lpr man page when installed on a machine with the cups-1.2.X xhier package. It can be installed on Linux hosts to replace the vendor's man pages if so desired.
cupsd
daemon listens to port 631 by default it does not conflict with
the xhier lpd daemon which listens to port 515. The CUPS package is not
installed in the default path.
The server on print.cs forwards jobs to our lpd running on print.cs. To
configure the cups server go to http://print.cs:631. There is a possibility
that
firefox
hangs when adding PPD file for a new printer unless you run
firefox directly on the print server. If you find this is the case, use
mozilla. People who are in the Unix group www_cscf (as defined by
/etc/group
and managed by accounts-master
database on cscf.cs) can
configure printers, that is, if CUPS asks for password authentication, type
in your username and passwd as defined in the core.cs region.
Until an alternate way of accounting for print jobs on the cups side can be
installed, you should always choose choose lpd for the CUPS backend and send
the jobs to print.cs so that the lpquota
system will come into play. In other
words, do not send jobs directly to the printers albeit for printers where
accounting is not an issue it may be permissible to do so but keep in mind this
implies the printers will be accessible to anyone who is running a CUPS server
on the subnet (see below for some host which have this behaviour).
BrowsePoll print.cs=
in cupsd.conf
which can cause
some traffic on print.cs. The parameter MaxClients in
print.cs:/software/cups/config/local/cups/cupsd.confhas must be set larger than the number of clients polling the server.
Furthermore, because some clients are running older
versions of cups, there are many orphaned cups-polld
process on such clients
which may or may not be doing polling of print.cs. To reduce the number
of times clients request updated info from print.cs I recommend explicitly
setting the BrowseInterval and BrowseTimeout parameters to larger values.
Do ensure that that printers do not disappear you must have BrowseInterval < BrowseTimeout.
I would suggest a value of an hour, i.e, 3600 (these parameters take seconds).
And updating the host to a new version Ubuntu is also recommended.
See CupsOnLinux for specific notes on how to configure CUPS on Linux.
Both the core and undergraduate frontends get printing services by listening to the subnet for UDP packets broadcast by print.cs. Until a proper way of accounting for print jobs on the cups side can be done we will not be sending jobs directly to a printer albeit for printers where accounting is not an issue it may be permissible to do so.
cscf.cs
I have installed the xhier cups-1.2.X
package on cscf.cs
. It can run at the
If you want to access the CUPS commands use the showpath
command. Something like
setenv PATH `/bin/showpath cups-1.2.X standard u=m`if you are using
csh
or tcsh
. Similarly you should setup the MANPATH
environment variable so that the CUPS man pages are show first, namely
setenv MANPATH `/bin/showpath class=man cups standard`if you are using
csh
or tcsh
.
services118.cs
running Ubuntu has been configured
to authenticate to the Windows ADS domain CS.UWATERLOO.CA
via PAM. *NOTE. There are
problems with this as it does not work at the moment. I may be forced to use
setpw again but one can login as root from cscf.cs.*
On print.cs it uses Basic
which means it's
using /etc/passwd
, /etc/shadow
for administrative tasks.
The cups server logs pages printed in logs/page_log
and it represents a software approach.
Tools exist to analyze this data and present it in a more understandable format. For example,
screenshot using
phpPrintAnalyzer
.
A much more complete accounting suite for print accounting appears to be Pykota
which can do both types of accounting. In addition to Pykota there are some specific tools like
pkpgcounter
which uses a software approach to get
page counts. A user could use this to estimate the number pages (and cost) of a print job.
I have created a deb package from the subversion archive and installed the package on my
pc.
lpquota_filter
and psif
lpr
command as provided by the xhier lpr package, see XhierLprToUbuntuCups for a solution.