Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2002 14:58:57 -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:  <OF81987709.AEC39A20-ON88256B9E.0076490E-88256B9E.0078CE48@simrad.no>

next in thread | raw e-mail | index | archive | help
Garance A Drosihn <drosih@rpi.edu> wrote on 04/17/2002 01:53:39 PM:

> At 9:13 AM -0700 4/17/02, chip.wiegand@simrad.com wrote:
> >When I try to print
> >
> >     #lptest 20 5 | lpr -Php
> >
> >I get the following error -
> >
> >     Apr 17 07:57:42 cwiegand2 lpd[90655]:
> >         cannot execv /usr/local/libexec/if-simple
> >     Apr 17 07:57:42 cwiegand2 lpd[90654]:
> >         hp: job could not be printed (cfA000cwiegand2)
> >
> >The file if-simple is directly from the handbook
> >
> >#!/bin/sh
> ># if-simple - Simple text input filter for lpd
> ># Installed in /usr/local/libexec/if-simple
> ># Simply copies stdin to stdout.  Ignores all filter arguments.
> >/bin/cat && exit 0
> >exit 2
> >
> >According to the error the problem is with the if-simple
> >filter, which is direct from the handbook.
> 
> The error certainly does imply it would be a problem
> with the filter.  Try running the filter by yourself.
> You don't need to send any output to the printer, as all
> you care is whether the filter works.
> 
> 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.
--
Chip 

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?OF81987709.AEC39A20-ON88256B9E.0076490E-88256B9E.0078CE48>