1 | # $Id$ |
---|
2 | |
---|
3 | Tea4CUPS : Tee for CUPS |
---|
4 | |
---|
5 | This program is free software; you can redistribute it and/or modify |
---|
6 | it under the terms of the GNU General Public License as published by |
---|
7 | the Free Software Foundation; either version 2 of the License, or |
---|
8 | (at your option) any later version. |
---|
9 | |
---|
10 | This program is distributed in the hope that it will be useful, |
---|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | GNU General Public License for more details. |
---|
14 | |
---|
15 | You should have received a copy of the GNU General Public License |
---|
16 | along with this program; if not, write to the Free Software |
---|
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
---|
18 | |
---|
19 | ============================================================================= |
---|
20 | |
---|
21 | Tea4CUPS is the equivalent of the *nix command 'tee', but as a CUPS |
---|
22 | backend. |
---|
23 | |
---|
24 | Tea4CUPS behaves just like any other CUPS backend, but allows you to |
---|
25 | transparently send print jobs' datas to any number of outputs : other |
---|
26 | CUPS backends, files or pipes. |
---|
27 | |
---|
28 | This for example allows you to output the same print job on several |
---|
29 | printers at the same time, which is not possible with CUPS. |
---|
30 | |
---|
31 | Another possibility would be for example to send the same document to |
---|
32 | a printer, a PDF generator, a Fax, and as an attachment to an email |
---|
33 | message, all of this by printing it a single time. |
---|
34 | |
---|
35 | Tea4CUPS provides three ways to launch commands : |
---|
36 | |
---|
37 | - prehooks : these are guaranteed to be launched before the |
---|
38 | print job is sent to the real printer. |
---|
39 | |
---|
40 | - tees : these are launched at the same time the job is being |
---|
41 | sent to the real printer. |
---|
42 | |
---|
43 | - posthooks : these are guaranteed to be launched after the |
---|
44 | print job has been sent to the real printer. |
---|
45 | |
---|
46 | To help your own commands, Tea4CUPS makes available as part of the |
---|
47 | environment several variables which can be used as part of the |
---|
48 | commands you use : |
---|
49 | |
---|
50 | TEAPRINTERNAME : The print queue name. |
---|
51 | TEADIRECTORY : Tea4CUPS output directory. |
---|
52 | TEADATAFILE : Full name of Tea4CUPS work file (in $TEADIRECTORY). |
---|
53 | TEAJOBSIZE : Job's size in bytes. |
---|
54 | TEAMD5SUM : MD5 sum of the job's datas. |
---|
55 | TEACLIENTHOST : Client's hostname or IP address. |
---|
56 | TEAJOBID : Job's Id. |
---|
57 | TEAUSERNAME : Name of the user who launched the print job. |
---|
58 | TEATITLE : Job's title. |
---|
59 | TEACOPIES : Number of copies requested. |
---|
60 | TEAOPTIONS : Options of the print job. |
---|
61 | TEAINPUTFILE : Print job's data file or empty when job read from stdin. |
---|
62 | TEASTATUS : Original CUPS backend's exit code : ONLY AVAILABLE FROM |
---|
63 | post hooks, obviously. |
---|
64 | |
---|
65 | In the case you want to use both Tea4CUPS and PyKota, you MUST install |
---|
66 | PyKota v1.22alpha2 or higher to avoid a race condition. |
---|
67 | |
---|
68 | ============================================================================= |
---|
69 | |
---|
70 | Installation : |
---|
71 | -------------- |
---|
72 | |
---|
73 | 0 - Download Tea4CUPS from : |
---|
74 | |
---|
75 | http://www.librelogiciel.com/software/Tea4CUPS/action_Presentation |
---|
76 | |
---|
77 | and extract it : |
---|
78 | |
---|
79 | $ tar -zxf tea4cups-x.yy.tar.gz |
---|
80 | |
---|
81 | where x.yy is Tea4CUPS' version number. |
---|
82 | |
---|
83 | 1 - Copy the 'tea4cups' command into CUPS' backend directory, |
---|
84 | for example : |
---|
85 | |
---|
86 | $ cp tea4cups /usr/lib/cups/backend |
---|
87 | |
---|
88 | 2 - Restart CUPS in order for this new backend to be detected. |
---|
89 | |
---|
90 | 3 - Either from CUPS' web interface, add new printers with |
---|
91 | 'Tea4CUPS managed' in front of the device's name. |
---|
92 | |
---|
93 | Or by directly modifying CUPS' printers.conf file, prepend |
---|
94 | each DeviceURI value with 'tea4cups://', and restart CUPS. |
---|
95 | |
---|
96 | 4 - Copy tea4cups.conf into CUPS' configuration directory (where |
---|
97 | cupsd.conf resides) : |
---|
98 | |
---|
99 | $ cp tea4cups.conf /etc/cups/ |
---|
100 | |
---|
101 | 5 - Modify tea4cups.conf to suit your needs. Several examples |
---|
102 | are included. |
---|
103 | |
---|
104 | 6 - There's no 6 ! |
---|
105 | |
---|
106 | ============================================================================= |
---|
107 | |
---|
108 | Troubleshooting : |
---|
109 | ----------------- |
---|
110 | |
---|
111 | 1 - Set "LogLevel debug2" in CUPS' cupsd.conf |
---|
112 | |
---|
113 | 2 - Restart CUPS. |
---|
114 | |
---|
115 | 3 - Set "debug: yes" in the [global] section of tea4cups.conf |
---|
116 | |
---|
117 | 4 - Print something on a print queue managed |
---|
118 | by Tea4CUPS. |
---|
119 | |
---|
120 | 5 - Look at CUPS' error_log file for diagnostic and error messages. |
---|
121 | |
---|
122 | ============================================================================= |
---|
123 | |
---|
124 | CUPS (Common UNIX(r) Printing System) is trademark property of Easy Software |
---|
125 | Products. |
---|
126 | |
---|
127 | You can download CUPS from : |
---|
128 | |
---|
129 | http://www.cups.org |
---|
130 | |
---|
131 | ============================================================================= |
---|
132 | |
---|
133 | Please e-mail bugs to : alet@librelogiciel.com (Jerome Alet) |
---|