Error about Ghostscript
Kurt Pfeifle
k1pfeifle at gmx.net
Tue Oct 16 07:55:24 PDT 2007
chris wrote:
>> And if you want to be even more sophisticated in your debugging, you'd
>> create a separate file for the output of each filter, and a separate
>> *.err error log (and you probably can simplify your $args to the dummy
>> "1 2 3 4 5" too, and test the full swag later):
>>
>>
>> PPD=/etc/cups/ppd/isc2428ps.ppd \
>> /usr/lib/cups/filter/texttops 1 2 3 4 5 /etc/cups/mime.types \
>> 2> texttops.err \
>> | tee output-from-texttops.prn \
>> | PPD=/etc/cups/ppd/isc2428ps.ppd \
>> /usr/lib/cups/filter/pstops 1 2 3 4 5 \
>> 2> pstops.err \
>> | tee output-from-pstops.prn
>>
>> PPD=/etc/cups/ppd/isc2428ps.ppd \
>> /usr/lib/cups/filter/foomatic-rip 1 2 3 4 5 output-from-pstops.prn \
>> 2> foomatic-rip.err \
>> | tee resulting-printfile.prn
>>
>>
>> --
>> Kurt Pfeifle
>> System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
>> Infotec Deutschland GmbH ..................... Hedelfinger Strasse 58
>> A RICOH Company ........................... D-70327 Stuttgart/Germany
>
>
>
>
> Thanks , I follow your example and I can get the file should be fed to
> the gs command line.
No, you got it wrong.
The file you get from
PPD=/etc/cups/ppd/isc2428ps.ppd /usr/lib/cups/filter/texttops [....]
is "output-from-pstops.prn". And it is meant to be fed to "foomatic-rip",
not gs. If you feed it to foomatic-rip like the next command above shows:
PPD=/etc/cups/ppd/isc2428ps.ppd /usr/lib/cups/filter/foomatic-rip 1 2 3 4 5 output-from-pstops.prn
then foomatic-rip will run gs on behalf of you. However, it is important
that you run these commands as the same user the backends do run as when
started by CUPS. So you may need to do a "su - lp" (from being root, and
make sure that the su command will really let you change user...)
Only then you can assume to have tested the chain manually within an en-
vironment that resembles the real CUPS processes. The *.err messages may
give you more hints about what is wrong.
BTW, here is another thought:
CUPS usually uses a "temp" dir in /var/spool/cups/temp to temporarily
store temp files
Grep for "TMPDIR" in your debug level log file to see where your CUPS does
look for it.
You should make sure it exists and your user "lp" has write and read access
to it. You may want to cd to that dir to run the manual commands.
You also may want to set additional env vars (as can be seen in error_log
when grepping for "envp["
> If I manully run gs and lp the printer works
> fine. If they run in cups automately, I has this error.
Don't run gs manually, run foomatic-rip manually. And do it as user
lp. And make it output its files to $TMPDIR.
--
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH ..................... Hedelfinger Strasse 58
A RICOH Company ........................... D-70327 Stuttgart/Germany
More information about the cups
mailing list