Subject: Re: Stupid printer question
To: D'Arcy J.M. Cain <email@example.com>
From: Jukka Marin <firstname.lastname@example.org>
Date: 09/22/1996 20:43:47
> I don't think that's even supposed to work. I think the if is used to
> track usage if I read the man page correctly.
if _does_ work, but lpd doesn't run if when you're using a remote printer.
> I had this exact problem. What you have to do is create two printers
> in your termcap. One is a raw interface to the remote filter (seemingly
> the only kind possible) and the other is an interface to a pseudo device
> with your filter as the output filter. Your filter should in turn write
> to the first printer - the raw one to the remote printer. I just used
> popen("/usr/bin/lpr -P lj5si", "w") where lj5si was the remote printer.
Yes, I heard this is the proper solution (and it works). I created a
wrapper script for my filter. This wrapper captures the output of the
filter and pipes it into 'lpr -Praw_printer'.
> One issue is the name of the lp device. /dev/null would be the
> obvious choice but I haven't looked at lpd to figure out what it does
> for locking. If it ises the lp device name then you may have a problem.
> I sidestepped the whole issue by using /dev/lp.lj5si.
/dev/null seems to work just fine.
> > Besides, if you have a comment in /etc/printcap ending with backslash,
> > it seems to confuse lpr/lprm/lpq. This _is_ a bug, isn't it? ;)
> What's a comment? :-)
Aren't the lines starting with '#' comments in /etc/printcap? :-)