[cups.general] Cups

Anonymous anonymous at easysw.com
Sun May 9 18:20:27 PDT 2004


Bernd Schubert wrote:
> > Also the path /usr/share/gs-esp/... instead of
> > /usr/share/ghostscript/... could be wrong.
>

Or, more likely, a certain or all fonts could be missing from
the path gs is searching for them....

> The output of 'gs-esp -h' says it searches for the the files
> there, so how should gs-pathes related with cups?
> Anyway, I linked /usr/share/gs-esp/7.07
> with /usr/share/ghostscript/7.07 and
> it didn't help.
>
> > You could fix it with soft-links.
> > CUPS is very sensitive. :-)

..and so is the Bash or Unix in general if you have missing
files.

> All of this would be much easier to debug, if there would
> be intermediate files

You can easily run all the filters on the commandline.
You don't need intermediate files by default.

Just use the same environemnt variables as you can see
from the error_log (in the lines which have "StartJob:
envp[n]"-type of messages), and use the same commandline
paramters for each filter (see "argv = "-line in error_log)

Note that you must call each filter with 6 arguments
(as listed in error_log in the "argv = "-line...) :

  filtername  job-id  username  title  copies  options  printfile

You can in part use dummy arguments, like

  "filtername 1 a b 2 "number-up=2,sides=two-sided-long-edge" /path/to/printfile"

Some useful info I also found from the regular contributions
of Kurt Pfeifle on the Samba mailing list. For example here:

  http://www.mail-archive.com/samba%40lists.samba.org/msg14147.html
  http://www.linuxprinting.org/pipermail/samsung-list/2002q3/000316.html
  http://www.linuxprinting.org/pipermail/general-list/2002q3/002718.html

I think in the last on he has an excellent explanation how to
run CUPS filters from the commandline for debugging purposes.

The wrapper script you are looking for is easy to write. I would
take a "proxy" filter approach. Do it like this:

* -->  su
* -->  cd /usr/lib/cups/filter
* -->  FILTERLIST=`ls -1 *`

then write the "proxy" filter:

* -->  vi proxy

It could look like this:

-------------------------------------
#!/bin/sh
exec $0.orig $@ | tee /tmp/my-special-cups-debug-log-file
-------------------------------------

* -->  chmod a+x proxy
* -->  for i in ./* ; do mv $i $i.orig; done
* -->  for i in $FILTERLIST ; do ln -s proxy $i ; done

You only need to write one wrapper, and symlink the name of
the real filter programs to it.


But that's all too heavy weapons. A closer look at your system
may reveal a relatively simple thing missing......





More information about the cups mailing list