Provided by: printbill_4.1.2-1.1_i386
printbillrc - fair printing billing and accounting system config file
contains all definitions for printbilld(1), printbill(1),
printbill_printer(1) as well as the other configuration and support
utilities and CGI scripts. It could also just contain a URL where the
real configuration file can be downloaded.
For the local-configuration version the format is very simple. A
parameter is followed by a colon and a value. Whitespace is permitted
on either side of the colon.
For the URL version it is even easier - the file only contains the URL
of the config file (e.g.
http://some.host.in.my.network/pub/printbillrc). It may be either FTP
or HTTP. If you are going to use this option you will need to install
wget as well.
Printers may be defined individually by creating "printer exception
files" called /etc/printbill/printer/<printername>, or may use defaults
specified in the printbillrc file. This eases deployment in a facility
with (e.g.) 100 identical printers. Most people with just one or two
printers can probably stick with the defaults in printbillrc.
The currently supported fields are as follows:
Default colourspace (set to either mono (black & white), cmyk
(Cyan-Magenta-Yellow, the most common colour printer (either
inkjet or colour laser). ’colour’ is a synonym for cmyk, for
backwards compatibility) or cmy (Cyan-Magenta-Yellow, for cheapo
3-colour printers). Also supported is the experimental and not-
to-be-trusted-at-all ’pagecount’ option, which should be really
fast but which totally ignores toner usage.
The default price in dollars (or euros or roubles or whatever)
per percentage coverage of black toner/ink.
The default price in dollars (or euros or roubles or whatever)
per percentage coverage of colour toner/ink.
Default price per page (charged in addition to toner/ink
Estimated total amount of coverage, in percent - a typical laser
printer can do 5000 pages at 5% coverage, which equates to 25000
percent coverage total.
As per estimated_total_percent_black, only for colour toner/ink.
Default user response method. Currently supported methods
include mail to the user and a Winpopup message via smbclient to
the user’s Windows machine. Multiple response methods may be
specified (comma or space separated). If you use the smbclient
option, you MUST put the following line in your smb.conf file
(of course change the path if necessary):
print command = /usr/bin/lpr -P%p %s @@@%m
printbill will then be able to find the correct machine to send
the winpopup message to.
The location for printbill’s databases. If it starts with
http:// or ftp:// printbill uses wget to suck the databases down
from the specified location. Of course, this only works with
read-only operations :-)
tmpfs Temporary filesystem for storing intermediate data files. For
best performance, this should be on the same filesystem as your
print queue. /var/tmp is a good idea. Note that some tmpfile
operations are still performed on /tmp, since /tmp should always
exist and always be world-writable. Only performance-critical
stuff happens in /var/tmp so it doesn’t need to be too huge.
dpi Dots-per-inch for use with bill calculation. More dpi is more
accurate but slower and more resource-hungry. Too low tends to
overestimate the amount of toner used since the png driver of
ghostscript doesn’t do antialiasing. Useful values are between
100 and 750 (I’d not recommend more than 300).
Where non-admin printbill programs (i.e. printquote(1)) are
located - e.g. /usr/bin or /usr/local/bin.
Where admin-related printbill programs are located - e.g.
/usr/sbin or /usr/local/sbin.
gs Path to your ghostscript binary.
lpr Path to your print spooler program.
Path to smbclient (optional - you only need to set this if your
response_method includes "smbclient"). See the response_method
section for details as to how this works...
filter The print filter to be used. Magicfilter has several anything-
to-PostScript filters which are suitable. It is suggested that
you put this here rather than in printcap(5) because that way
printquote can use it too.
mta Mail transport agent (e.g. /usr/bin/sendmail).
Path to gnuplot (optional - you only need to set this if you
wish to use printbill_grapher(1).
Where to call for assistance should the need arise. Also, where
annoying status/error messages get sent.
If the lockfile is present, we wait this number of seconds
between checking to see if it is still there. This implements a
kind of persistent file locking (not based on flock()). Further,
after the job finishes we wait this amount of time after
releasing the lock before returning (to ensure fair access to
the databases for different queues).
Equivalent of printbilld_user - deprecated & will disappear in
version 5.x. - use printbilld_user instead, which is more
Username under which the printbilld process runs. On Debian and
FreeBSD this probably should be "daemon".
Group under which the printbilld process runs. Add a ’printbill’
group if you want to use the web interface - add both
printbilld_user and web_user to it.
Username under which the web server process runs. On Debian this
is "www-data", "www" on FreeBSD.
Location of your printcap file (since lprng can be compiled with
printcap in places other than /etc).
Whatever your locale uses for dollars, pounds, francs, marks
etc. Printed immediately before the unit, e.g. $4.00, RMB25,
Y10.34. This is just used for display purposes (and in the web
Either HIGH or LOW, depending on how much logging you want.
The path for statistics. Normally this would be db_home/stats,
but you may choose to put it elsewhere if you wish. This
parameter is optional, do not define it if you do not require
statistics collection. The output files are named
printbill_stats_$printer.dat. The format of this file is that
each line corresponds to a file that someone attempted to print
(individual files, not total batch jobs), and the columns list
user and system times, child process user and system times, file
size, page count, and percentage coverage in cyan, magenta,
yellow and black. If the printer is monochrome, the CMY
parameters will be zero.
Jobs which, for some reason, cannot be billed are saved in this
directory if this optional parameter is defined. You are then
free to try to figure out what went wrong. Files are saved as
FAILED_printer_user-N, N being the number of the file in the job
(i.e., user prints 5 jobs, 3rd one failes, N = 3). This option
is really only required for debugging.
Optional logfile which records all transactions conducted via
pqm (thus including the web interface). Each of this log is
simply localtime, followed by a tab, a numerical Unix timestamp
(as returned by time(3)), a tab and a positive or negative
amount (from pqm --inc and --dec). This should be both human-
readable and easily parsed in software for sorting etc.
Maximum number of concurrent processes that printbill can spawn.
2-5 is recommended on a single-processor machine. 1 will process
jobs purely sequentially, so you want more than 1 if you want to
do out-of-order printing/billing to avoid the head-of-line
Files larger than this are niced at large_bill_niceness,
Niceness level for jobs smaller than bill_nicethreshold. 5 is a
reasonable value - make it zero for a dedicated machine.
Niceness level for jobs larger than bill_nicethreshold. 10 is a
Niceness level used by printbill_quote. Make it bigger than
either small_bill_niceness or large_bill_niceness - printing
should take precedence over non-interactive quotation
Location for web cookies.
Name of the CGI script for administration.
Name of the CGI script for users to check their quota levels.
Contents are printed out at the top of the page (a bit like SSI
Contents are printed out at the bottom of the page (a bit like
SSI #include directive).
Contains brief "Welcome to Franklin Corporation Print Management
System" type message.
Contains brief "See this person for more quota" type message.
SHORT or LONG - SHORT is suggested for sites with large numbers
of users. LONG is fine if you only have a page or two to scroll
through. LONG is still accessable from SHORT.
Web document-root relative URL where stats-related PNG files
should go. Must be writable by web_user, and correspond to the
same location as graph_png_output_dir (which should be an
absolute filesystem path). This parameter is optional - you only
need to use it if you are collating stats and wish to display
them via the web interface.
Absoulte filesystem path pointing to output directory for stats-
related PNG files. It must be writable by web_user. This
parameter is optional - you only need to use it if you are
collating stats and wish to display them via the web interface.
You may define a printers as per the following example (which would go
in a file called /etc/printbill/printers/inkjet)
# Example definition for a colour inkjet printer called "inkjet".
response_method: mail, smbclient
Default colourspace (set to either mono (black & white), cmyk (Cyan-
Magenta-Yellow-Black, the most common colour printer (either inkjet or
colour laser - ’colour’ is a synonym for cmyk, for backwards
compatibility), cmy (Cyan-Magenta-Yellow, for cheapo 3-colour printers)
or "pagecount" for a dumb easily-fooled page counter. The prices are as
before, in [local currency units] per percent coverage or per page. The
estimated total percent black may be calculated easily - the
manufacturer will say 5000 pages at an average 5% coverage, this gives
25000 percent total coverage. For mono printers the colour entries can
of course be deleted.
printbill(1), printbilld(1), printbill(8), printbill_configure(8),
printbill_grapher(1), percentblack(1), percentcolour(1), pqcheck(1),
printquote(1), printbill_printer(1), printcap(5), init_from_passwd(8),