Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Aug 2001 13:22:18 -0700
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Chris Fedde" <chris@fedde.littleton.co.us>, "Victor Sudakov" <sudakov@sibptus.tomsk.ru>
Cc:        <questions@FreeBSD.ORG>
Subject:   RE: lpd(8): remote printing and input/output filters 
Message-ID:  <006001c12823$7a66ac00$1401a8c0@tedm.placo.com>
In-Reply-To: <200108181943.f7IJhHI08870@fedde.littleton.co.us>

next in thread | previous in thread | raw e-mail | index | archive | help
>-----Original Message-----
>From: owner-freebsd-questions@FreeBSD.ORG
>[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Chris Fedde
>Sent: Saturday, August 18, 2001 12:43 PM
>To: Victor Sudakov
>Cc: questions@FreeBSD.ORG
>Subject: Re: lpd(8): remote printing and input/output filters
>
>
>On Sun, 19 Aug 2001 01:21:34 +0800  Victor Sudakov wrote:
> +------------------
> | Colleagues.
> |
> | Can you tell for sure if the "if" and "of" filters should work
>for a remote
> | printer?

YES THEY DO!!!!!

>For example, in such a configuration.
> |
> | lp:remote printserver:\
> |         :rm=remote.host.com:\
> |         :if=/usr/libexec/some_filter.sh:\
> |         :rp=lpt1_TEXT:\
> |         :sd=/var/spool/output/lpd1:\
> |         :lf=/var/log/lpd-errs:\
> |         :lp=:\
> |         :mx#0:
> +------------------
>
>I'd love to be proven wrong, but I've found that that does not work.

NOT CORRECT!

I've got a number of printers on JetDirects that are remote printers behind
filters on the server that work just fine.

>It seems that the connection to the remote is made without the file going
>through the filter.
>

Unfortunately, the lpd daemon don't appear to understand that
there are things called error codes that are returned when you attempt to
open files that you don't own that really need to be reported back to the
user.  It also has a stick up it's ass when it came to parsing /etc/printcap -
the slightest error and lpd silently ignores capabilities.

if everything is PROPERLY set up then the filter works fine.  But if you make
one little mistake then the filter won't work but the daemon will say nothing
about it.

See the following for a little help:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/corp-net-guide/index.html

and keep in mind you have to be anal about the config file syntax.  I mean
REALLY anal.  Recently, one of the posters on the forum here had a problem
like this and he finally discovered that the text editor that he was using was
ignoring trailing garbage that was appended to the /etc/printcap file.  He
only could tell this by catting the file to stdout - otherwise the garbage
characters were invisible.  Another common problem is appending a space
character AFTER the trailing \ on a line in the printcap.  Also, spaces at the
beginning of a capability line seem
to be a bad thing too.


Ted Mittelstaedt                                       tedm@toybox.placo.com
Author of:                           The FreeBSD Corporate Networker's Guide
Book website:                          http://www.freebsd-corp-net-guide.com



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?006001c12823$7a66ac00$1401a8c0>