[695] | 1 | # $Id$ |
---|
| 2 | |
---|
[2478] | 3 | PyKota - Print Quotas for CUPS and LPRng |
---|
[695] | 4 | |
---|
[2622] | 5 | (c) 2003, 2004, 2005, 2006 Jerome Alet <alet@librelogiciel.com> |
---|
[873] | 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
[695] | 10 | |
---|
[873] | 11 | This program is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
[695] | 15 | |
---|
[873] | 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with this program; if not, write to the Free Software |
---|
[2303] | 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
[873] | 19 | |
---|
[761] | 20 | ==================================================================== |
---|
[695] | 21 | |
---|
[1052] | 22 | READ SPECIAL LICENSING AND REDISTRIBUTION TERMS IN THE FILE 'LICENSE' |
---|
[761] | 23 | |
---|
| 24 | ==================================================================== |
---|
| 25 | |
---|
[1154] | 26 | PyKota features : |
---|
| 27 | ----------------- |
---|
[695] | 28 | |
---|
[3038] | 29 | http://www.pykota.com/software/pykota/features/ |
---|
[2638] | 30 | |
---|
[1154] | 31 | ==================================================================== |
---|
| 32 | |
---|
[739] | 33 | Planned features are described in the TODO file. |
---|
| 34 | |
---|
[1507] | 35 | Actually two (or an infinity of) page accounting methods are |
---|
[980] | 36 | implemented : |
---|
[695] | 37 | |
---|
[1475] | 38 | - The 'hardware' method consists in querying the printer (via SNMP |
---|
[1181] | 39 | or Netatalk or any other method of your choice) for its total pages |
---|
[1186] | 40 | counter. |
---|
[1600] | 41 | This is done both at the beginning and at the end of a |
---|
[1186] | 42 | print job. The counters difference is then immediately used to |
---|
| 43 | decrease the user's account balance or increase his quota usage. |
---|
| 44 | |
---|
[1475] | 45 | - The 'software' method consists in delegating the computation of the |
---|
[980] | 46 | job's size in number of pages to any external command of your choice. |
---|
| 47 | The command can read the job's data from its standard input and MUST |
---|
[1186] | 48 | output the job's size on its standard output. Changes to the user |
---|
[2345] | 49 | account are reported immediately. |
---|
[980] | 50 | |
---|
[2345] | 51 | PyKota featured an internal software accounting method which handles |
---|
| 52 | several Page Description Languages : DSC compliant and binary PostScript, |
---|
| 53 | PDF, PCLXL (aka PCL6), PCL3/4/5, ESC/P2, DVI, TIFF, OpenOffice.org Writer |
---|
| 54 | and OpenOffice.org Impress. This software is now distributed separately |
---|
| 55 | as 'pkpgcounter', and not included anymore in PyKota, so you must now |
---|
| 56 | download and install it before running PyKota. |
---|
| 57 | |
---|
[1600] | 58 | PyKota is known to work fine with most laser printers, either with |
---|
| 59 | software accounting, or with hardware accounting if the printer |
---|
| 60 | supports this. |
---|
[724] | 61 | |
---|
[695] | 62 | ============================================================ |
---|
| 63 | |
---|
[2001] | 64 | SUPPORT CONTRACTS: |
---|
| 65 | ================== |
---|
| 66 | |
---|
| 67 | You can now purchase 8x5x365@NextBusinessDay Technical |
---|
[2126] | 68 | Support Contracts from us. The yearly fee is computed with |
---|
| 69 | the following formula : |
---|
[2001] | 70 | |
---|
| 71 | (100.0 * NbPrintServers) + (2.5 * NbPrinters) + (0.04 * NbUsers) EUROS. |
---|
| 72 | |
---|
[2542] | 73 | This fee includes the VAT, and a free subscription to Official |
---|
| 74 | PyKota packages. |
---|
[2001] | 75 | |
---|
| 76 | Please send an email to alet@librelogiciel.com if you're |
---|
[2126] | 77 | interested in purchasing such a contract. |
---|
[2001] | 78 | |
---|
[2126] | 79 | Remember that purchasing a support contract for Free Software like PyKota |
---|
| 80 | is a great way to show your appreciation for the work already being done |
---|
| 81 | on this project, and will help to improve this software in the future. |
---|
| 82 | |
---|
[2001] | 83 | ============================================================ |
---|
| 84 | |
---|
[695] | 85 | INSTALLATION: |
---|
| 86 | ============= |
---|
| 87 | |
---|
[1186] | 88 | NB : |
---|
| 89 | ==== |
---|
[887] | 90 | |
---|
[2714] | 91 | PyKota's documentation is available as DocBook SGML sources |
---|
| 92 | files in the pykota/docs directory. If you obtained an |
---|
| 93 | Official package, in the same directory you'll also find |
---|
| 94 | the documentation in HTML and PDF formats. |
---|
[2543] | 95 | |
---|
[2714] | 96 | PyKota's collaborative documentation is available from : |
---|
| 97 | |
---|
[2909] | 98 | http://www.pykota.com/wiki/ |
---|
[2543] | 99 | |
---|
[1397] | 100 | You may learn more about PyKota, if it fits your own organization, |
---|
| 101 | its internal working, and some potential performance drawbacks and |
---|
[2054] | 102 | how to avoid them, in a document created by Ryan Suarez at : |
---|
[1397] | 103 | |
---|
[2005] | 104 | http://archive.macosxlabs.org/forum/webcrossing_archive/documentation/Pykota_and_CUPS/Pykota_and_CUPS.html |
---|
[1034] | 105 | |
---|
[1651] | 106 | You may also find the following document interesting : |
---|
| 107 | |
---|
| 108 | http://es.tldp.org/Tutoriales/doc-openldap-samba-cups-python/ |
---|
| 109 | |
---|
| 110 | This document, written in Spanish by Sergio Gonzalez Gonzalez, |
---|
| 111 | describes the integration of PyKota into an OpenLDAP + Samba |
---|
| 112 | + CUPS installation. Even for people who can't read spanish |
---|
| 113 | this document is really interesting, and contains lots of |
---|
| 114 | screenshots. |
---|
| 115 | |
---|
[1951] | 116 | Finally, SuSe users may find the following document to best describe |
---|
| 117 | how to install PyKota on their favorite distribution. It's a Spanish |
---|
[2714] | 118 | document written by Dennis Romero, and is mostly outdated now : |
---|
[1951] | 119 | |
---|
| 120 | http://www.cvr.espol.edu.ec/people/dennis/Pykota1.19-SuSE9.1.pdf |
---|
| 121 | |
---|
| 122 | |
---|
[714] | 123 | Prerequisite : |
---|
| 124 | -------------- |
---|
| 125 | |
---|
[2714] | 126 | See : |
---|
| 127 | |
---|
[2909] | 128 | http://www.pykota.com/wiki/Dependencies |
---|
[2714] | 129 | |
---|
| 130 | for an up-to-date list, or see below (maybe not up-to-date) : |
---|
| 131 | |
---|
[714] | 132 | You need to have the following tools installed on the CUPS Server : |
---|
| 133 | |
---|
[2478] | 134 | - CUPS (http://www.cups.org) |
---|
[2784] | 135 | - Python v2.2 or higher (http://www.python.org) |
---|
[1886] | 136 | - eGenix' mxDateTime Python extension (http://www.egenix.com) |
---|
[2345] | 137 | - The pkpgcounter command line tool, version 1.56 or higher. This |
---|
| 138 | tool is now mandatory for PyKota to work. |
---|
[2909] | 139 | (http://www.pykota.com/software/pkpgcounter) |
---|
[2891] | 140 | - The pkipplib Python library (http://www.pykota.com/software/pkipplib) |
---|
[1771] | 141 | - The JAXML Python module to be able to dump datas in the XML format. |
---|
[1886] | 142 | (http://www.librelogiciel.com/software/) |
---|
[2784] | 143 | - The Python-PAM module if you need the pknotify command to be able |
---|
[3006] | 144 | to check usernames and passwords. (http://www.pangalactic.org/PyPAM) |
---|
[1771] | 145 | - The Python-SNMP module to query printers for their page counter. |
---|
[3006] | 146 | (http://pysnmp.sourceforge.net) |
---|
[2877] | 147 | IMPORTANT : version 3.4.2 or higher is REQUIRED. |
---|
| 148 | Versions 2.x won't work. Versions 4.x now work (tested with v4.1.5a). |
---|
[1771] | 149 | - The Python-OSD module to use the graphical print quota reminder. |
---|
[2189] | 150 | (http://repose.cx/pyosd/) |
---|
[3006] | 151 | - The Python-chardet module to autodetect user's character set when |
---|
| 152 | printing. (http://chardet.feedparser.org) |
---|
[1771] | 153 | - SNMP tools (specifically the snmpget command) if you prefer to |
---|
| 154 | use your own script to request query printers. |
---|
[2189] | 155 | (http://www.net-snmp.org) |
---|
[919] | 156 | - Netatalk (specifically the pap command) if you plan to |
---|
| 157 | request your printer's lifetime page counter via AppleTalk. |
---|
[1886] | 158 | (http://netatalk.sourceforge.net) |
---|
[1927] | 159 | - The ReportLab Python module (http://www.reportlab.org) if you want |
---|
| 160 | to have PyKota generate nice banners for you. |
---|
| 161 | - The Python Imaging Library (aka PIL) module |
---|
| 162 | (http://www.pythonware.com/downloads) if you want to have PyKota |
---|
| 163 | generate nice banners for you. |
---|
[1043] | 164 | - PostgreSQL's PygreSQL Python extension and the PostgreSQL client |
---|
[2597] | 165 | libraries if you plan to use PostgreSQL as the database backend. |
---|
[1886] | 166 | (http://www.postgresql.org and http://www.pygreql.org) |
---|
[1043] | 167 | or |
---|
| 168 | - python-ldap Python module and the OpenLDAP client libraries |
---|
[2597] | 169 | if you plan to use an LDAP server as the database backend. |
---|
[1886] | 170 | (http://www.openldap.org and http://python-ldap.sourceforge.net) |
---|
[2597] | 171 | or |
---|
| 172 | - SQLite v3.2.7 and the SQLite libraries if you plan to use SQLite |
---|
| 173 | as the database backend (http://www.sqlite.org). You also need the |
---|
| 174 | PySQLite module v2.0.5 or higher (http://www.pysqlite.org) |
---|
[2638] | 175 | or |
---|
[2714] | 176 | - The MySQL-python bindings. |
---|
[2638] | 177 | IMPORTANT: If you are using MySQL 4.1, then MySQL-python must be |
---|
| 178 | version 1.2 or greater. Version 1.0 does not work correctly with 4.1. |
---|
[2597] | 179 | |
---|
[714] | 180 | |
---|
[1771] | 181 | On Intel i386 architecture, and for performance reasons, it is |
---|
| 182 | strongly suggested that you install the Python accelerator Psyco, |
---|
| 183 | available at : |
---|
[1570] | 184 | |
---|
| 185 | http://psyco.sourceforge.net |
---|
| 186 | |
---|
[1571] | 187 | Under Debian : |
---|
| 188 | |
---|
| 189 | $ apt-get install python-psyco |
---|
| 190 | |
---|
| 191 | Other architectures may be supported as well in the future, check |
---|
[1600] | 192 | this on Psyco's website. |
---|
[1571] | 193 | |
---|
[1578] | 194 | Installing Psyco is not mandatory, but it will speedup PCL5 parsing |
---|
[1570] | 195 | by almost 3 times. PostScript and PDF parsing can also benefit, |
---|
| 196 | but in an almost unnoticeable manner since this part of the code |
---|
[1575] | 197 | is already optimal. For PCL5 this is a completely different matter, |
---|
[1570] | 198 | and if you install Psyco you will never regret it ! |
---|
[1600] | 199 | Same remark applies for PCL6 (aka PCLXL) : the parser is completely |
---|
| 200 | different, but the performance gain with Psyco is impressive. |
---|
[1570] | 201 | |
---|
[1186] | 202 | You may also benefit from having the following tools installed to |
---|
| 203 | deal with some printers : |
---|
| 204 | |
---|
| 205 | - npadmin |
---|
| 206 | - netcat |
---|
| 207 | - ghostscript |
---|
| 208 | |
---|
[2597] | 209 | You need to have the following tools installed on the database |
---|
| 210 | server : |
---|
[714] | 211 | |
---|
[1886] | 212 | - PostgreSQL (http://www.postgresql.org) |
---|
[714] | 213 | |
---|
[1043] | 214 | or |
---|
| 215 | |
---|
[1886] | 216 | - OpenLDAP, or any other LDAP server (http://www.openldap.org) |
---|
[1043] | 217 | |
---|
[2597] | 218 | or |
---|
| 219 | |
---|
| 220 | - SQLite, v3.2.7 or higher (http://www.sqlite.org). |
---|
| 221 | Beware : with SQLite the database server and the print |
---|
| 222 | servers MUST be the very same machine. |
---|
[2714] | 223 | |
---|
| 224 | or |
---|
[714] | 225 | |
---|
[2870] | 226 | - MySQL 4.1 or higher. |
---|
[2714] | 227 | |
---|
[714] | 228 | This list of prerequisite software may change in the future, when |
---|
| 229 | PyKota will support more functionnalities you will be given |
---|
| 230 | alternatives. |
---|
| 231 | |
---|
[2597] | 232 | Of course the Print Server and the database server can be the |
---|
[851] | 233 | very same machine if you've got a tiny network, or you can have |
---|
[2597] | 234 | multiple Print Servers all storing their quotas on the same database |
---|
| 235 | server if you've got a bigger network. (NB : with SQLite, the database |
---|
| 236 | can't be shared between several print servers) |
---|
[851] | 237 | |
---|
[1886] | 238 | Hint : |
---|
| 239 | ------ |
---|
| 240 | |
---|
| 241 | - The Debian GNU/Linux distribution is to our knowledge the |
---|
[3081] | 242 | easiest distribution to install PyKota on, because almost all |
---|
[1886] | 243 | of PyKota dependencies are already included, excepted |
---|
[3081] | 244 | the pkpgcounter utility which for now have to be downloaded |
---|
[2345] | 245 | and installed separately. |
---|
[1886] | 246 | |
---|
[714] | 247 | Then : |
---|
| 248 | ------ |
---|
| 249 | |
---|
[2135] | 250 | Download the latest PyKota version from the Subversion tree : |
---|
[695] | 251 | |
---|
[2135] | 252 | $ svn co svn://svn.librelogiciel.com/pykota/trunk pykota |
---|
[695] | 253 | |
---|
[1906] | 254 | You can now check if the dependencies are correct by typing : |
---|
[695] | 255 | |
---|
[2135] | 256 | $ python checkdeps.py |
---|
[1906] | 257 | |
---|
[2234] | 258 | An availability report for all the software needed by PyKota |
---|
| 259 | will be displayed : you'll have to install the missing |
---|
| 260 | software if you want PyKota to work correctly. |
---|
| 261 | |
---|
[1906] | 262 | To install the software, just type : |
---|
| 263 | |
---|
[2135] | 264 | $ python setup.py install |
---|
[695] | 265 | |
---|
| 266 | You may need to be logged in with sufficient privileges (e.g. root) |
---|
| 267 | |
---|
[3081] | 268 | If you use Debian or Ubuntu, and want to use PostgreSQL as the |
---|
| 269 | database backend, just type : |
---|
| 270 | |
---|
| 271 | $ pksetup |
---|
| 272 | |
---|
| 273 | and follow the instructions to install PyKota in interactive mode, then |
---|
| 274 | skip the remaining of the section below. |
---|
| 275 | |
---|
| 276 | Otherwise, you have to setup manually : |
---|
| 277 | |
---|
[1960] | 278 | Create a system user for PyKota : |
---|
| 279 | |
---|
[2135] | 280 | $ adduser --system --group --home /etc/pykota --gecos PyKota pykota |
---|
[1960] | 281 | |
---|
| 282 | Put the user your printing system is run as in the pykota system group : |
---|
| 283 | |
---|
[2135] | 284 | $ adduser lp pykota |
---|
[1960] | 285 | |
---|
| 286 | NB : on our system, the CUPS printing system runs as system user 'lp'. |
---|
| 287 | Please adapt this to your own system. |
---|
| 288 | |
---|
[695] | 289 | Go to the initscripts subdirectory of PyKota's sources, and choose |
---|
[1600] | 290 | the appropriate storage backend for your configuration. Read carefully |
---|
[695] | 291 | the associated README file and execute the initialization script |
---|
[2597] | 292 | to create an empty PyKota database. Upgrade scripts may be |
---|
[2269] | 293 | provided as well. NB : if you use PostgreSQL, a good way to |
---|
| 294 | make PyKota work first time is to modify PostgreSQL's pg_hba.conf |
---|
| 295 | to allow the 'trust' database connection mode. However once PyKota |
---|
| 296 | works it is HIGHLY RECOMMENDED TO CHANGE THIS TO A MORE SECURE |
---|
| 297 | VALUE. |
---|
[695] | 298 | |
---|
[1186] | 299 | Copy the conf/pykota.conf.sample and conf/pykotadmin.conf.sample |
---|
[1107] | 300 | sample configuration files to /etc/pykota/pykota.conf and |
---|
[1905] | 301 | /etc/pykota/pykotadmin.conf |
---|
| 302 | The installation script usually copies these files into /usr/share/pykota |
---|
[1198] | 303 | |
---|
[1979] | 304 | NB : You can move PyKota's configuration files elsewhere, they will |
---|
| 305 | be searched first in user pykota's home directory. |
---|
| 306 | |
---|
[1905] | 307 | You need to adapt these files to your own needs. Especially you may |
---|
| 308 | have to create sections named after your own printers, and change |
---|
| 309 | the administrator's email address which by default is |
---|
| 310 | root@localhost. Read and try to understand these two very well |
---|
| 311 | commented files, so that you'll encounter less problems later. |
---|
| 312 | |
---|
[1198] | 313 | Also be sure to double check that commands that query printers |
---|
[1186] | 314 | for their internal page counter work from the command line |
---|
| 315 | before using them in PyKota's configuration. |
---|
[695] | 316 | |
---|
[1186] | 317 | The rest of the installation depends on your printing system : |
---|
| 318 | |
---|
[1185] | 319 | - CUPS Printing System : |
---|
[952] | 320 | |
---|
[1185] | 321 | Once and for all : |
---|
[952] | 322 | |
---|
[1185] | 323 | Create a symbolic link to the cupspykota backend |
---|
| 324 | in CUPS's backend directory : |
---|
| 325 | |
---|
| 326 | $ cd /usr/lib/cups/backend |
---|
[1345] | 327 | $ ln -s /usr/share/pykota/cupspykota cupspykota |
---|
[1185] | 328 | |
---|
[2943] | 329 | If you use CUPS v1.2 or higher, please do this as well : |
---|
| 330 | |
---|
| 331 | $ chmod 700 /usr/share/pykota/cupspykota |
---|
| 332 | |
---|
| 333 | This allows the cupspykota backend to support other |
---|
| 334 | backends which must be run as user root, like the |
---|
| 335 | lpd backend for example. |
---|
| 336 | |
---|
[1185] | 337 | Restart CUPS so that the new backend can be detected. |
---|
| 338 | |
---|
| 339 | $ /etc/init.d/cupsys restart |
---|
| 340 | |
---|
[1600] | 341 | or : |
---|
| 342 | |
---|
[1979] | 343 | $ /etc/rc.d/init.d/cupsys restart |
---|
[1600] | 344 | |
---|
| 345 | or any similar command depending on your operating system. |
---|
| 346 | |
---|
[1185] | 347 | For new printers : |
---|
[952] | 348 | |
---|
[1185] | 349 | Go to CUPS management interface (http://localhost:631) |
---|
| 350 | and choose the appropriate PyKota managed device depending |
---|
| 351 | on the type of printer you use. For example, if your |
---|
| 352 | printer is waiting on : |
---|
| 353 | |
---|
[1354] | 354 | socket://myprinter.example.com:9100 |
---|
[1185] | 355 | |
---|
| 356 | Then choose : |
---|
| 357 | |
---|
[1354] | 358 | cupspykota:socket://myprinter.example.com:9100 |
---|
[1185] | 359 | |
---|
| 360 | Configure your printer as usual. |
---|
| 361 | |
---|
[1186] | 362 | Now double check /etc/pykota/pykota.conf |
---|
[1600] | 363 | |
---|
| 364 | You should manually create a section named after the |
---|
[1402] | 365 | printer you've just added, unless you have set |
---|
| 366 | all options globally. |
---|
[1600] | 367 | |
---|
[2468] | 368 | The new pkturnkey command can help you with correct settings |
---|
[1408] | 369 | for your printers, but don't rely on it because it is still |
---|
[2468] | 370 | experimental work. To have pkturnkey give you some hints |
---|
| 371 | about what to put into pykota.conf, just use its --doconf |
---|
| 372 | command line switch : |
---|
[1186] | 373 | |
---|
[2468] | 374 | $ pkturnkey --doconf |
---|
[1600] | 375 | |
---|
[2468] | 376 | pkturnkey will try to tell you what is the best accounting |
---|
[1600] | 377 | method for each printer and will print some lines you'll |
---|
| 378 | just have to copy&paste in the appropriate sections in |
---|
| 379 | /etc/pykota/pykota.conf |
---|
| 380 | |
---|
[2468] | 381 | For more informations about what pkturnkey can do for you, |
---|
| 382 | see pkturnkey's manual page or use the --help command |
---|
| 383 | line switch : |
---|
| 384 | |
---|
| 385 | $ pkturnkey --help | less |
---|
| 386 | |
---|
[1185] | 387 | That's all. |
---|
[952] | 388 | |
---|
[1185] | 389 | For existing printers : |
---|
| 390 | |
---|
[2714] | 391 | The easiest is to directly modify the DeviceURI lines |
---|
[1185] | 392 | in /etc/cups/printers.conf, you just have to put |
---|
| 393 | 'cupspykota:' in front of what is already on these lines. |
---|
| 394 | For example, replace : |
---|
| 395 | |
---|
[1354] | 396 | DeviceURI socket://myprinter.example.com:9100 |
---|
[1185] | 397 | |
---|
| 398 | with : |
---|
| 399 | |
---|
[1354] | 400 | DeviceURI cupspykota:socket://myprinter.example.com:9100 |
---|
[1345] | 401 | |
---|
| 402 | or : |
---|
[1185] | 403 | |
---|
[1354] | 404 | DeviceURI cupspykota://socket://myprinter.example.com:9100 |
---|
[1345] | 405 | |
---|
[1185] | 406 | Save the file and restart CUPS. |
---|
[1600] | 407 | |
---|
[2470] | 408 | Here too, you may find it interesting to use the pkturnkey command as |
---|
[1600] | 409 | described above to help with manual configuration of the file |
---|
| 410 | /etc/pykota/pykota.conf |
---|
[695] | 411 | |
---|
[1185] | 412 | - LPRng Printing System : |
---|
[952] | 413 | |
---|
[2478] | 414 | IMPORTANT : This release of PyKota DOES NOT support LPRng. |
---|
[1600] | 415 | |
---|
[2478] | 416 | If you want to use PyKota with LPRng, you have to download |
---|
| 417 | an earlier release of PyKota, for example v1.22HotFix1. |
---|
[1600] | 418 | |
---|
[1186] | 419 | Now you can begin to populate the PyKota's database with printers, |
---|
| 420 | users and groups : |
---|
[952] | 421 | |
---|
[716] | 422 | Add printers and users to the quota system and set their quota values : |
---|
[695] | 423 | |
---|
[2470] | 424 | You can either use pkturnkey, or do the same things manually by |
---|
[2714] | 425 | using the pkprinters, pkusers and edpykota command line tools : |
---|
[1345] | 426 | |
---|
[2714] | 427 | Create printers : |
---|
| 428 | |
---|
[1345] | 429 | $ pkprinters --help |
---|
| 430 | |
---|
| 431 | will tell you how to create, manage or delete printers and |
---|
| 432 | printers groups. |
---|
[1402] | 433 | |
---|
| 434 | $ pkprinters --add --charge 0.05 hp2100 |
---|
| 435 | |
---|
| 436 | would add the printer named hp2100 with a price per page |
---|
| 437 | of 0.05 unit. |
---|
[1345] | 438 | |
---|
[2714] | 439 | Create users : |
---|
[1402] | 440 | |
---|
[2714] | 441 | $ pkusers --add --limitby balance --balane 10.0 jerome |
---|
[1086] | 442 | |
---|
[2714] | 443 | would create user jerome and give him ten credits to spend |
---|
| 444 | on any printer. |
---|
[1086] | 445 | |
---|
[2714] | 446 | Finally create print quota entries : |
---|
[695] | 447 | |
---|
[2714] | 448 | $ edpykota --add -P hp2100 jerome |
---|
| 449 | |
---|
| 450 | This will create a print quota entry for user jerome on |
---|
| 451 | printer hp2100. The print quota entry holds the number of |
---|
| 452 | pages printed on a particular printer for a particular |
---|
| 453 | user, as well as optional page limits to be used instead |
---|
| 454 | of balance limits. See pkusers and edpykota's manual |
---|
| 455 | pages for details. |
---|
| 456 | |
---|
[2478] | 457 | Restart CUPS, for example under Debian GNU/Linux systems : |
---|
[695] | 458 | |
---|
[725] | 459 | $ /etc/init.d/cupsys restart |
---|
[990] | 460 | |
---|
[695] | 461 | Your users now should be able to print but not exceed their |
---|
| 462 | printing quota. |
---|
| 463 | |
---|
[2234] | 464 | To see printer quota usage on printer hp2100, you can use : |
---|
[794] | 465 | |
---|
[2234] | 466 | $ repykota --printer hp2100 |
---|
[794] | 467 | |
---|
| 468 | or : |
---|
| 469 | |
---|
| 470 | $ repykota |
---|
| 471 | |
---|
| 472 | which will print quota usage for all users on all printers, |
---|
[2054] | 473 | along with totals, if you are a PyKota Administator. If you are |
---|
[1107] | 474 | a regular user, only your own quota report will be produced. |
---|
[794] | 475 | |
---|
[1107] | 476 | Quota reports are also available remotely by using the CGI script |
---|
[1345] | 477 | printquota.cgi provided in the cgi-bin/ subdirectory. You can |
---|
| 478 | also use the CSS stylesheet present in the stylesheets/ subdirectory |
---|
[1402] | 479 | and put it at your web server's DocumentRoot, to benefit from a nicer |
---|
| 480 | look, especially quota violations will appear in different colors. |
---|
[990] | 481 | |
---|
[2262] | 482 | For additionnal security concerns, please give a look at the SECURITY |
---|
[980] | 483 | file which is part of this software. |
---|
[2234] | 484 | |
---|
| 485 | To diagnose a problem when something doesn't work as expected, |
---|
| 486 | please read the very first entry in the FAQ document. |
---|
[741] | 487 | |
---|
[695] | 488 | ============================================================ |
---|
| 489 | |
---|
[1979] | 490 | Additionnal tools : |
---|
| 491 | ------------------- |
---|
| 492 | |
---|
| 493 | Some people have developped tools around PyKota, and make |
---|
| 494 | them available under the GNU General Public License : |
---|
| 495 | |
---|
| 496 | - Kanakorn Horsiritham developped phpPykotaAdmin which is |
---|
[2126] | 497 | a web based database independant administrative GUI, |
---|
| 498 | written in PHP. |
---|
[1979] | 499 | |
---|
| 500 | http://opensource.psu.ac.th/~kanakorn/mambo/ |
---|
[2126] | 501 | |
---|
| 502 | He was also kind enough to write an installation guide |
---|
| 503 | in english for CUPS and PyKota with phpPykotaAdmin on Fedora |
---|
| 504 | Core 3. You'll find this document on the same website. |
---|
| 505 | |
---|
| 506 | This great software currently at version 0.3 is a wonderful |
---|
| 507 | basis for an administrative GUI since it only depends on |
---|
| 508 | PyKota commands to be present to successfully manage |
---|
| 509 | PyKota's database. |
---|
[1979] | 510 | |
---|
| 511 | Additionnal software will be listed here when they will be |
---|
| 512 | ready. |
---|
| 513 | |
---|
| 514 | ============================================================ |
---|
| 515 | |
---|
[958] | 516 | Mailing list : |
---|
| 517 | -------------- |
---|
| 518 | |
---|
| 519 | A mailing list is dedicated to Pykota, you can subscribe to it |
---|
| 520 | or consult its archives at : |
---|
| 521 | |
---|
| 522 | http://cgi.librelogiciel.com/mailman/listinfo/pykota |
---|
| 523 | |
---|
[1600] | 524 | The mailing list is the preferred way to obtain support, because |
---|
| 525 | all members can help and can also benefit from the solutions |
---|
| 526 | proposed by other members. |
---|
| 527 | |
---|
| 528 | Posts by non-members are usually rejected. |
---|
| 529 | |
---|
| 530 | The mailing list language is english and only english. |
---|
| 531 | |
---|
[1181] | 532 | IRC : |
---|
| 533 | ----- |
---|
| 534 | |
---|
| 535 | You can also chat with us : |
---|
| 536 | |
---|
| 537 | /server irc.freenode.net |
---|
| 538 | /join #pykota |
---|
[1600] | 539 | |
---|
| 540 | Preferred language on this channel is english, but french |
---|
| 541 | is also accepted. Try to avoid exposing complex problems |
---|
| 542 | in french because english speaking people on the channel |
---|
| 543 | wouldn't benefit from the solutions. |
---|
| 544 | |
---|
| 545 | PyKota's main author is known as 'tamere' on IRC. |
---|
[1181] | 546 | |
---|
[958] | 547 | ============================================================ |
---|
| 548 | |
---|
[1107] | 549 | Please e-mail bugs to the mailing list at : pykota@librelogiciel.com |
---|
| 550 | or to the main author at : alet@librelogiciel.com (Jerome Alet) |
---|