Re: printcap rerouted filter
Hi. Just browsing through the list and found the following
excerpt from your message:
>It's like the input filter is never being called. If I set the printcap
>entry so it remote prints to our network printer, like so:
>beeper:\
> :if=/etc/magicfilter/beeper-filter:\
> :lp=:\
> :sd=/var/spool/lpd/beeper:\
> :rm=(the ip address):\
> :rp=nimrod_2:
I don't think this will work, regardless of what
type of script you use for a filter, the reason
being the following from the printing HOW-TO:
(the first sentence is the clue, and easily
overlooked. Someone previously brought this to
my attention after several days of fighting with
the remote filtering thing.)
{
10.8. Running an if for remote printers
One oddity of lpd is that the if is not run for remote printers. If
you find that you need to run an if, you can do so by setting up a
double queue and requeueing the job. As an example, consider this
printcap:
lj-5:remote-hplj:\
:lp=/dev/null:sh:\
:sd=/var/spool/lpd/lj-5:\
:if=/usr/lib/lpd/filter-lj-5:
lj-5-remote:lp=/dev/null:sh:rm=printer.name.com:\
:rp=raw:sd=/var/spool/lpd/lj-5-raw:
in light of this filter-lj-5 script:
#!/bin/sh
gs <options> -q -dSAFER -sOutputFile=- - | \
lpr -Plj-5-remote -U$5
The -U option to lpr only works if lpr is run as daemon, and it sets
the submitter's name for the job in the resubmitted queue correctly.
You should probably use a more robust method of getting the username,
since in some cases it is not argument 5. See the man page for
printcap.
}
Hope this helps.
--
tony mollica
tmollica@thegrid.net
Reply to: