lpd: filters not working quite right

lpd: filters not working quite right

Post by B.A.McCau.. » Wed, 17 May 1995 04:00:00




>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):

>#!/bin/sh
> date
> echo ------- > /tmp/test.out
> cat |gs -q -NOPAUSE -dDEVICE=djet500 -sOutputFile=/tmp/dj500.out -

Hmmm... are you entering for the "useless cat award"?

Quote:> 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
>altogether?

This probably means gs is not on the PATH or is not execuatable by the
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

 
 
 

1. mail not quite working right

I've gotten a server set up and I thought I had DNS working (it mostly
does) but one thing isn't right yet.  I want a user's address to be

I could use that but I'd rather not.  Is this a DNS issue or a
sendmail issue?  What did I do wrong (or more likely, what did I not
do)?

Henry Hartley

2. how display directory colors in rxvt?

3. DHCP SERVER not working quite right? (RH6.0)

4. Need a .h file for LILO 0.12

5. Help! shared libraries not working quite right.

6. Linux Frequently Asked Questions with Answers (Part 4 of 6)

7. lpr, lpd... not working right

8. The latest version of Lunix

9. My Lovely Openwin... not quite right.

10. source rpm's not quite right

11. 2.5.29: fbcon palette not quite right

12. lpd/lpr problem solved (well, not quite)

13. NetBSD 1.4.1 setup on hp300 not quite right