Changeset 3104
- Timestamp:
- 12/01/06 23:31:23 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/README
r3081 r3104 33 33 Planned features are described in the TODO file. 34 34 35 Actually t wo(or an infinity of) page accounting methods are35 Actually three (or an infinity of) page accounting methods are 36 36 implemented : 37 37 38 38 - The 'hardware' method consists in querying the printer (via SNMP 39 or Netatalk or any other method of your choice) for its total pages40 counter.39 or Netatalk or any other method of your choice) for its internal 40 pages counter. 41 41 This is done both at the beginning and at the end of a 42 print job. The counters difference is then immediatelyused to42 print job. The counters difference is then used to 43 43 decrease the user's account balance or increase his quota usage. 44 44 … … 47 47 The command can read the job's data from its standard input and MUST 48 48 output the job's size on its standard output. Changes to the user 49 account are reported immediately. 50 51 PyKota featured an internal software accounting method which handles 49 account are reported immediately. PyKota by default internally 50 uses the code from pkpgcounter which can handle 52 51 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 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. 52 PDF, PCLXL (aka PCL6), PCL3/4/5, ESC/P2, DVI, TIFF, OpenDocument, 53 Zenographics ZjStream, Samsung QPDL,Samsung SPL1, and plain text. 54 Of course this means you have to install pkpgcounter if you want to 55 use the default PDL parser. 56 57 - The 'ink' method consists in using pkpgcounter's code to compute 58 how much of each page is covered by ink in each color of a particular 59 colorspace chosen between CMYK, CMY, RGB, and BW (grayscale). 60 These values are then summed up together and multiplied by a set 61 of coefficients defined in PyKota's configuration files. 62 63 PyKota is known to work with most printers, excepted GDI ones (Windows 64 only). At least one of the accounting methods above should work 65 for you. If it's not the case, please report the problem : tell us 66 the exact brand and model of the printer, if possible the driver used, 67 and send some test files. 61 68 62 69 ============================================================ … … 92 99 files in the pykota/docs directory. If you obtained an 93 100 Official package, in the same directory you'll also find 94 the documentation in HTML and PDF formats. 101 the documentation in HTML and PDF formats. Otherwise you 102 have to compile it into HTML or PDF yourself by using 103 the appropriate tools as installed on your system. 95 104 96 105 PyKota's collaborative documentation is available from : … … 113 122 this document is really interesting, and contains lots of 114 123 screenshots. 115 116 Finally, SuSe users may find the following document to best describe117 how to install PyKota on their favorite distribution. It's a Spanish118 document written by Dennis Romero, and is mostly outdated now :119 120 http://www.cvr.espol.edu.ec/people/dennis/Pykota1.19-SuSE9.1.pdf121 124 122 125 … … 224 227 or 225 228 226 - MySQL 4.1 or higher. 229 - MySQL 4.1 or higher. 5.x is recommended. 227 230 228 231 This list of prerequisite software may change in the future, when … … 243 246 of PyKota dependencies are already included, excepted 244 247 the pkpgcounter utility which for now have to be downloaded 245 and installed separately. 248 and installed separately, and maybe one or two other dependencies, 249 depending on the version of Debian you are using. 250 We recommend you to use Debian's Etch distribution or 251 more recent. PyKota works fine on Sarge, but some additional 252 dependencies are missing in Sarge and have to be installed 253 manually. 246 254 247 255 Then : … … 287 295 Please adapt this to your own system. 288 296 289 Go to the initscripts subdirectory of PyKota's sources, and choose297 Go to the initscripts/ subdirectory of PyKota's sources, and choose 290 298 the appropriate storage backend for your configuration. Read carefully 291 the associated README file and execute the initialization script 299 the associated README file, modify the initialization script to 300 change the passwords, or, in the case of the LDAP backend, adapt it 301 to your own LDAP DIT, and execute the initialization script 292 302 to create an empty PyKota database. Upgrade scripts may be 293 303 provided as well. NB : if you use PostgreSQL, a good way to … … 295 305 to allow the 'trust' database connection mode. However once PyKota 296 306 works it is HIGHLY RECOMMENDED TO CHANGE THIS TO A MORE SECURE 297 VALUE. 307 VALUE. Look at the SECURITY document, PyKota's Official documentation 308 and PostgreSQL's documentation for details on this subject. 298 309 299 310 Copy the conf/pykota.conf.sample and conf/pykotadmin.conf.sample 300 sample configuration files to /etc/pykota/pykota.conf and301 /etc/pykota/pykotadmin.conf311 sample configuration files to ~pykota/pykota.conf and 312 ~pykota/pykotadmin.conf 302 313 The installation script usually copies these files into /usr/share/pykota 303 314 304 315 NB : You can move PyKota's configuration files elsewhere, they will 305 be searched first in user pykota's home directory .316 be searched first in user pykota's home directory, then in /etc/pykota. 306 317 307 318 You need to adapt these files to your own needs. Especially you may … … 311 322 commented files, so that you'll encounter less problems later. 312 323 313 Also be sure to double check that commands that query printers314 for their internal page counter work from the command line315 before using them in PyKota's configuration.316 317 324 The rest of the installation depends on your printing system : 318 325 … … 339 346 $ /etc/init.d/cupsys restart 340 347 341 or : 342 343 $ /etc/rc.d/init.d/cupsys restart 344 345 or any similar command depending on your operating system. 348 for example under Debian, or any similar command depending 349 on your operating system of choice. 346 350 347 351 For new printers : … … 367 371 368 372 The new pkturnkey command can help you with correct settings 369 for your printers, but don't rely on it because it is still 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 : 373 374 $ pkturnkey --doconf 373 for your printers. To have pkturnkey give you some hints 374 about what to put into pykota.conf for a particular 375 print queue, just use its --doconf command line switch : 376 377 $ pkturnkey --doconf TheNameOfThePrintQueue 375 378 376 379 pkturnkey will try to tell you what is the best accounting … … 387 390 That's all. 388 391 389 For existing printers : 390 391 The easiest is to directly modify the DeviceURI lines 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 : 392 For existing print queues : 393 394 You want to route the print queue through PyKota, 395 and you can do this in several manners. 396 397 $ pkprinters --add --cups TheNameOfThePrintQueue 398 399 or 400 401 if your printer's DeviceURI is something like : 402 403 socket://myprinter.example.com:9100 404 405 then you can do this : 406 407 $ pkprinters --add TheNameOfThePrintQueue 408 $ lpadmin -p TheNameOfThePrintQueue \ 409 -v cupspykota://socket://myprinter.example.com:9100 410 411 Finally, you could do it manually by modifying the 412 the DeviceURI lines in /etc/cups/printers.conf : 413 You would have to preprend 'cupspykota://' in front 414 of what is already on these lines. For example, replace : 395 415 396 416 DeviceURI socket://myprinter.example.com:9100 … … 398 418 with : 399 419 400 DeviceURI cupspykota: socket://myprinter.example.com:9100420 DeviceURI cupspykota://socket://myprinter.example.com:9100 401 421 402 422 or : … … 404 424 DeviceURI cupspykota://socket://myprinter.example.com:9100 405 425 406 Save the file and restart CUPS .426 Save the file and restart CUPS for the changes to take effect. 407 427 408 428 Here too, you may find it interesting to use the pkturnkey command as … … 439 459 Create users : 440 460 441 $ pkusers --add --limitby balance --balan e 10.0 jerome461 $ pkusers --add --limitby balance --balance 10.0 jerome 442 462 443 463 would create user jerome and give him ten credits to spend … … 446 466 Finally create print quota entries : 447 467 448 $ edpykota --add - P hp2100 jerome449 450 This will create a print quota entry for user jeromeon468 $ edpykota --add --printer hp2100 john paul george ringo 469 470 This will create print quota entries for The Beatles on 451 471 printer hp2100. The print quota entry holds the number of 452 472 pages printed on a particular printer for a particular … … 455 475 pages for details. 456 476 457 Restart CUPS, for example under Debian GNU/Linux systems :458 459 $ /etc/init.d/cupsys restart460 461 477 Your users now should be able to print but not exceed their 462 478 printing quota. … … 473 489 along with totals, if you are a PyKota Administator. If you are 474 490 a regular user, only your own quota report will be produced. 491 492 You can also use these commands : 493 494 $ pkusers --list 495 $ edpykota --list 496 497 $ pkusers --list john paul george ringo 498 $ edpykota --list --printer hp2100 john paul george ringo 475 499 476 500 Quota reports are also available remotely by using the CGI script … … 484 508 485 509 To diagnose a problem when something doesn't work as expected, 486 please read the very first entry in the FAQ document. 510 please read this FAQ entry : 511 512 http://otrs.librelogiciel.com/otrs/public.pl?ID=2 487 513 488 514 ============================================================ … … 508 534 PyKota commands to be present to successfully manage 509 535 PyKota's database. 536 537 However this tool is very old now and doesn't work 538 with more recent versions of PyKota. It could be 539 a good starting point if you planned to develop such 540 a web user interface though. 510 541 511 542 Additionnal software will be listed here when they will be