>I am trying to write an if filter to print postscript on my dj500. The
>problem is that for some reason, when lpd uses the filter (or is it lpr),
>it skips right over the line that is suppoed to run ghostscript. For
>example, if I use the filter (called ps.filter):
> echo ------- > /tmp/test.out
> cat |gs -q -NOPAUSE -dDEVICE=djet500 -sOutputFile=/tmp/dj500.out -
This probably means gs is not on the PATH or is not execuatable by theQuote:> date >/tmp/test2.out
>(the date at the top is to give some output on stdout, otherwise lpd will
>loop and keep trying to send the data to the filter)
>and run the command:
> lpr -Pps test.ps
>both of the files: test.out and test2.out get created, however, gs
>does not run (or at least produce the file dj500.out. Even when I
>remove the -q option and add "> /tmp/gs.out" to the end of the line,
>the file /tmp/gs.out gets created, but it is of zero length.
> Also if I type the command:
> cat test.ps |/var/spool/lpd/ps/ps.filter
>all of the files are created, with data in them, including
>dj500.out and gs.out.
> SO, do I have a buggy version of lpd or lpr? Am I missing
>some key environment variable? Or is there some other thing askew
GID/UID under which the filter runs.
Try adding, this should give you some evidence.
( id ; env ) > /tmp/test.out
. _\\__[oo from | Phones: +44 121 471 3789 (home)
. l___\\ /~~) /~~[ / [ | PGP-fp: D7 03 2A 4B D8 3A 05 37
# ll l\\ ~~~~ ~ ~ ~ ~ | A1 93 FE EA BE E3 2A 91