Laserwriter setup - odd behaviour with lpr

Laserwriter setup - odd behaviour with lpr

Post by Brent Russel » Sat, 12 Oct 1996 04:00:00



I have an NEC Silentwriter connected to the parallel port of a P-Pro
running slackware v 1.3.77

I'm having trouble with filters and printcap to get this postscript-only
printer working on /dev/lp1

I have a postscript file /tmp/config.ps:

# cat /tmp/config.ps > /dev/lp1   (This works great)

I also have a script, /root/filt (-rwxr-xr-x root daemon), which eats
stdin and replaces stdout with that postscript file:

#!/bin/sh
cat /tmp/config.ps

So that the following works:

# ./filt > /dev/lp1

now, I write the following printcap:


#
lp0:\
        :if=/root/filt:\
        :lp=/dev/lp1:\
        :pl#66:\
        :pw#80:\
        :sd=/scratch1/spool/lp0:\
        :sh:        

now, if I lpr anything to -Plp0 it should print out config.ps right?
But it doesn't.  My understanding from the manual pages on printcap is
that lpr effectively takes the file to print, pipes it through the if
filter, and then straight to the printer - like this:

lpr %testfile.ps% is equivalent to cat %testfile.ps%|if_filter>/dev/lp1

needless to say I have also typed # cat anyfile.ps|/root/filt>/dev/lp1
and this works.

Can anyone help me out here? - all I want to do is lpr file.ps and have
it work.  I'm also trying to get a magic filter going, but I have to get
this going first :)

Thanks for any help anyone can give me.


as well as reply to the newsgroup if that is ok :) Taa!

Best Regards,

Brent Russell.