282 | | - CUPS Print Backend : |
283 | | |
284 | | Modify the PPD files for each printer on which you want to manage |
285 | | print quotas, for example /etc/cups/ppd/lp.ppd : |
286 | | |
287 | | --- Add the line below exactly as-is somewhere near the top --- |
288 | | *cupsFilter: "application/vnd.cups-postscript 0 /usr/bin/pykota" |
289 | | --- Add the line above exactly as-is somewhere near the top --- |
290 | | |
291 | | Modify the path to the pykota executable if needed, unfortunately |
292 | | you have to supply the correct absolute path here due to CUPS |
293 | | internals, or put the pykota executable into /usr/lib/cups/filter |
294 | | instead of into /usr/bin. |
295 | | |
296 | | Do this for each ppd file present in this directory if you want |
297 | | to enable quota on every printer. |
298 | | |
299 | | WARNING : In the case you've got a non-postscript printer, chances |
300 | | are that the *cupsFilter is already filled-in and points |
301 | | to cupsomatic or such a print filter. In this case please |
302 | | check if you can switch your printer to PostScript mode |
303 | | or if there's a way to make it accept PostScript jobs. |
304 | | If yes then ensure that your workstations uses a PostScript |
305 | | printer driver, and replace the *cupsFilter line with the |
306 | | one pointing to the pykota filter. This should work, but |
307 | | is currently untested. |
308 | | If your printer really needs the original *cupsFilter line |
309 | | then you may not be able to use PyKota easily for now. |
310 | | |
311 | | - LPRng Print Backend : |
| 282 | - CUPS Printing System : |
| 283 | |
| 284 | Once and for all : |
| 285 | |
| 286 | Create a symbolic link to the cupspykota backend |
| 287 | in CUPS's backend directory : |
| 288 | |
| 289 | $ cd /usr/lib/cups/backend |
| 290 | $ ln -s /usr/bin/cupspykota cupspykota |
| 291 | |
| 292 | Restart CUPS so that the new backend can be detected. |
| 293 | |
| 294 | $ /etc/init.d/cupsys restart |
| 295 | |
| 296 | For new printers : |
| 297 | |
| 298 | Go to CUPS management interface (http://localhost:631) |
| 299 | and choose the appropriate PyKota managed device depending |
| 300 | on the type of printer you use. For example, if your |
| 301 | printer is waiting on : |
| 302 | |
| 303 | socket://myprinter.domain.com:9100 |
| 304 | |
| 305 | Then choose : |
| 306 | |
| 307 | cupspykota:socket://myprinter.domain.com:9100 |
| 308 | |
| 309 | Configure your printer as usual. |
| 310 | |
| 311 | That's all. |
| 312 | |
| 313 | For existing printers : |
| 314 | |
| 315 | If you had already installed PyKota, then remove |
| 316 | the *cupsFilter lines in your PPD files for each |
| 317 | printer already managed printers. Each line to |
| 318 | remove is of the form : |
| 319 | |
| 320 | *cupsFilter: "application/vnd.cups-postscript 0 /usr/bin/pykota" |
| 321 | |
| 322 | Don't touch anything else, especially any other *cupsFilter line. |
| 323 | Then save each of these files and restart CUPS. |
| 324 | |
| 325 | Then, the easiest is to directly modify the DeviceURI lines |
| 326 | in /etc/cups/printers.conf, you just have to put |
| 327 | 'cupspykota:' in front of what is already on these lines. |
| 328 | For example, replace : |
| 329 | |
| 330 | DeviceURI socket://myprinter.domain.com:9100 |
| 331 | |
| 332 | with : |
| 333 | |
| 334 | DeviceURI cupspykota:socket://myprinter.domain.com:9100 |
| 335 | |
| 336 | Save the file and restart CUPS. |
| 337 | |
| 338 | - LPRng Printing System : |