On 2015-10-27, Stuart Henderson <s...@spacehopper.org> wrote: > On 2015-10-25, Jona Joachim <j...@joachim.cc> wrote: >> Hi, >> I was tired of CUPS so I decided keep it simple and stupid and use >> lpd/lpr. Strangely, things don't work out as expected. It seems that >> lpd never executes input filters. >> >> Here is the content of /etc/printcap: >> lp|hl6050|Brother HL6050:\ >> :lp=:rm=hl6050.lan:\ >> :if=/home/jaj/bin/printbrother.sh:\ >> :sh: >> >> mg3150|canon|Canon MG3150:\ >> :lp=:rm=canon.lan:\ >> :if=/home/jaj/bin/printcanon.sh:\ >> :sh: >> >> Here is the content of printcanon.sh: >> #!/bin/sh >> >> logger "printcanon called $@" >> >> /usr/local/bin/a2ps -BRq --columns=1 -o - | \ >> /usr/local/bin/foomatic-rip -q -P Canon-PIXMA-MG3150 \ >> --ppd /home/jaj/bin/Canon-PIXMA-MG3150-ijs-simplified.ppd >> >> printbrother.sh is the same except for driver and ppd. >> Both scripts are executable. >> I never see the "printcanon called" message in syslog and the printers >> get incorrect data. The first printer understands a subset of >> postscript so it prints fine, the second printer however does not. >> If I run a document manually through the filter and the enqueue it to >> lpr, the printers are more than happy to print. >> >> I see no error nowhere. >> >> $ cat /var/log/lpd-errs >> Oct 25 07:47:01 asterix lpd[9652]: restarted >> Oct 25 14:57:06 asterix lpd[17953]: restarted >> >> $ cat /var/spool/output/lpd/status >> sending to hl6050.lan >> >> I went through the code of lpd to see where things could go wrong but >> it's a bit complex and I couldn't understand the bits. >> >> Does anybody know where I could look to solve this? >> >> Best regards, >> Jona >> >> > > Does the lpd user have permission to run those scripts? Maybe run lpd > under ktrace -i for more clues. lpd filters definitely worked in -current > as of April because I was using them for the music queue at p2k15.
I found out that it is related to using 'rm' instead of 'lp'. It executes filters if I set lp=5...@hl6050.lan. It does not if I set rm=hl6050.lan.