Date: Thu, 18 Apr 2002 09:50:53 -0700 From: chip.wiegand@simrad.com To: drosih@rpi.edu Cc: freebsd-questions@freebsd.org Subject: Re: if-simple filter won't work with printer Message-ID: <OF1215AB55.ED599D60-ON88256B9F.005A4295-88256B9F.005C9A2C@simrad.no>
next in thread | raw e-mail | index | archive | help
Garance A Drosihn <drosih@rpi.edu> wrote on 04/17/2002 05:17:37 PM: > At 2:58 PM -0700 4/17/02, chip.wiegand@simrad.com wrote: > >Garance A Drosihn <drosih@rpi.edu> wrote on 04/17/2002 01:53:39 PM: > >> try something like: > >> > >> echo "test" | /usr/local/libexec/if-simple > >> > >> and see what happens. 'cat /etc/printcap', and copy the > >> exact name of the filter as found in the if entry of the > >> print queue -- I don't know how much time I've wasted due > >> to some letter being the digit '1' when I thought it was > >> a lowercase L or uppercase i. See what errors you get. > >> > >> -- > >> Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu > > > >I ran that command, as root and as user, and it responds > >with test at stdout, as expected. And of course no errors > >written to the lpd-errs file. I then re-ran the lptest > >command and it does give the error mentioned above. As for > >the filter name - it is the same, exactly, in the printcap. > >--------- > >hp|lp|952C|HP952C:\ > >:sh:\ > >:sd=/var/spool/lpd/hp:\ > >:lp=/dev/lpt0:\ > >:if=/usr/local/libexec/if-simple: > >---------- > >The more I mess with this and get nowhere the more > >frustrated I get. > > I can appreciate that lpd can be mighty frustrating in some > situations. But when trying to help you remotely via email, > it's even harder to come up with good ways to figure out a > problem like this. I apologize for the negativity. Just one of those days living with a network of all NT boxes and the 2 freebsd boxes I set up. I appreciate any help you can provide. > Is it true that your real /etc/printcap file does not have > any blanks before the ':' characters? Is the above your > entire printcap file? The freebsd box can't send mail to this list, I have to use Lotus Notes. So I copied the printcap from fbsd to NT then copied/pasted from wordpad into this message, but the cr/lf don't come across properly. The original printcap has a tab before the lines starting with the ":" character. I changed that to 4 spaces, but it still does not work, gives the same error message. the printcap file (now) - ---- hp|lp|952C|HP952C:\ :sh:\ :sd=/var/spool/lpd/hp:\ :lp=/dev/lpt0:\ :if=/usr/local/libexec/if-simple: ---------- The errors again - ------ Apr 18 09:27:51 cwiegand2 lpd[13771]: cannot execv /usr/local/libexec/if-simple Apr 18 09:27:51 cwiegand2 lpd[13770]: hp: job could not be printed (cfA023cwiegand2) -------- the if-simple has these permissions - -r-xr-xr-x The if-simple file with the comments removed - ----- #!/bin/sh /bin/cat && exit 0 exit 2 ------ That's also 4 spaces in front of the second and third lines. I tried apsfilter, used it to add a new queue to the existing printcap, so now this is the printcap - ----- hp|lp|952C|HP952C:\ :sh:\ :sd=/var/spool/lpd/hp:\ :lp=/dev/lpt0:\ :if=/usr/local/libexec/if-simple: # @(#)printcap 5.3 (Berkeley) 6/30/90 # $FreeBSD: src/etc/printcap,v 1.10.2.1 2001/03/06 02:04:52 obrien Exp $ # APS1_BEGIN:printer1 # - don't delete start label for apsfilter printer1 # - no other printer defines between BEGIN and END LABEL 952|hpdj/unspec;r=300x300;q=medium;c=full;p=letter;m=auto:\ :lp=/dev/lpt0:\ :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\ :sd=/var/spool/lpd/952:\ :lf=/var/spool/lpd/952/log:\ :af=/var/spool/lpd/952/acct:\ :mx#0:\ :sh: # APS1_END - don't delete this --------- When I print to the printer 952 I get the following in the log - ------ apsfilter warning: unknown option 'cwiegand2' apsfilter: unsupported file type 'assembler source' apsfilter: If you think you can help us to support files of this type, apsfilter: please contact us on <apsfilter-hackers@apsfilter.org>. ------ That is, I think, just a apsfilter problem. I cannot print the lptest command to the 952 queue. Hopefully this new info will help somehow. -- Chip > -- > Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OF1215AB55.ED599D60-ON88256B9F.005A4295-88256B9F.005C9A2C>