1 | # $Id$ |
---|
2 | |
---|
3 | PyKota - Print Quota for CUPS |
---|
4 | |
---|
5 | (c) 2003 Jerome Alet <alet@librelogiciel.com> |
---|
6 | You're welcome to redistribute this software under the |
---|
7 | terms of the GNU General Public Licence version 2.0 |
---|
8 | or, at your option, any higher version. |
---|
9 | |
---|
10 | You can read the complete GNU GPL in the file COPYING |
---|
11 | which should come along with this software, or visit |
---|
12 | the Free Software Foundation's WEB site http://www.fsf.org |
---|
13 | |
---|
14 | ============================================================ |
---|
15 | |
---|
16 | PyKota is a complete Print Quota system for the Common Unix Printing |
---|
17 | System (aka CUPS), which works by directly querying the printers |
---|
18 | for the number of pages they have printed. |
---|
19 | |
---|
20 | Current or planned features are : |
---|
21 | |
---|
22 | - Easy installation. |
---|
23 | |
---|
24 | - Per printer User and Group quotas. Currently Group |
---|
25 | quotas are only at skeleton stage. |
---|
26 | |
---|
27 | - Centralized configurable storage : currently |
---|
28 | only a PostgreSQL database backend is supported, |
---|
29 | but at least LDAP and MySQL are planned. |
---|
30 | |
---|
31 | - Automated mailing of warning or error messages to |
---|
32 | users and print administrator when print quota is |
---|
33 | exceeded. |
---|
34 | |
---|
35 | - Configurable printer querying methods. Currently |
---|
36 | only SNMP method is supported. |
---|
37 | |
---|
38 | Look at the documentation in the docs subdirectory to learn |
---|
39 | more. |
---|
40 | |
---|
41 | ============================================================ |
---|
42 | |
---|
43 | INSTALLATION: |
---|
44 | ============= |
---|
45 | |
---|
46 | Prerequisite : |
---|
47 | -------------- |
---|
48 | |
---|
49 | You need to have the following tools installed on the CUPS Server : |
---|
50 | |
---|
51 | - CUPS |
---|
52 | - Python |
---|
53 | - eGenix' mxDateTime Python extension |
---|
54 | - PostgreSQL's PygreSQL Python extension and the PostgreSQL client |
---|
55 | libraries. |
---|
56 | - SNMP tools (specifically the snmpget command) |
---|
57 | |
---|
58 | You need to have the following tools installed on the Quota Storage |
---|
59 | Server : |
---|
60 | |
---|
61 | - PostgreSQL |
---|
62 | |
---|
63 | PygreSQL and the PostgreSQL client libraries's versions on the CUPS |
---|
64 | Server must match the PostgreSQL version used on the Quota Storage |
---|
65 | Server. |
---|
66 | |
---|
67 | Of course the CUPS Server and the Quota Storage Server can be the |
---|
68 | very same machine. |
---|
69 | |
---|
70 | This list of prerequisite software may change in the future, when |
---|
71 | PyKota will support more functionnalities you will be given |
---|
72 | alternatives. |
---|
73 | |
---|
74 | Then : |
---|
75 | ------ |
---|
76 | |
---|
77 | Download the latest PyKota version from : |
---|
78 | |
---|
79 | http://www.librelogiciel.com/software/ |
---|
80 | |
---|
81 | Extract it and install it on the CUPS Server : |
---|
82 | |
---|
83 | gzip -d pykota-x.xx.tar.gz | tar -xf - |
---|
84 | |
---|
85 | where x.xx is PyKota's latest version number. |
---|
86 | |
---|
87 | Go to PyKota's directory : |
---|
88 | |
---|
89 | cd pykota-x.xx |
---|
90 | |
---|
91 | Just type : |
---|
92 | |
---|
93 | python setup.py install |
---|
94 | |
---|
95 | You may need to be logged in with sufficient privileges (e.g. root) |
---|
96 | |
---|
97 | Go to the initscripts subdirectory of PyKota's sources, and choose |
---|
98 | the appropriate storage backend for your configuration. Read |
---|
99 | the associated README file and execute the initialization script |
---|
100 | to create an empty PyKota Storage. |
---|
101 | |
---|
102 | Copy the conf/pykota.conf.sample sample configuration file to |
---|
103 | CUPS' configuration directory, usually /etc/cups, under the |
---|
104 | name pykota.conf, and adapt this file to your own needs and |
---|
105 | configuration. |
---|
106 | |
---|
107 | Modify the PPD files for each printer on which you want to manage |
---|
108 | print quotas, for example /etc/cups/ppd/lp.ppd : |
---|
109 | |
---|
110 | --- Add the line below exactly as-is somewhere near the top --- |
---|
111 | *cupsFilter: "application/vnd.cups-postscript 0 /usr/bin/pykota" |
---|
112 | --- Add the line above exactly as-is somewhere near the top --- |
---|
113 | |
---|
114 | Modify the path to pykota if needed, unfortunately you have to |
---|
115 | supply the correct absolute path here due to CUPS internals, or |
---|
116 | put the pykota executable into /usr/lib/cups/filter instead of |
---|
117 | into /usr/bin. |
---|
118 | |
---|
119 | Do this in each ppd file present in this directory if you want |
---|
120 | to enable quota on every printer. |
---|
121 | |
---|
122 | Add printers and users to the quota system and set their quota values : |
---|
123 | |
---|
124 | $ edpykota -P printer -S softlimit -H hardlimit user1 ... userN |
---|
125 | |
---|
126 | Restart CUPS, for example under Debian GNU/Linux systems : |
---|
127 | |
---|
128 | $ /etc/init.d/cupsys restart |
---|
129 | |
---|
130 | Your users now should be able to print but not exceed their |
---|
131 | printing quota. |
---|
132 | |
---|
133 | ============================================================ |
---|
134 | |
---|
135 | Please e-mail bugs to: alet@librelogiciel.com (Jerome Alet) |
---|