Subject: Re: lpd setup
To: Steve Blinkhorn <steve@prd.co.uk>
From: Greg A. Woods <woods@weird.com>
List: port-i386
Date: 12/14/2006 13:54:14
At Thu, 14 Dec 2006 17:58:05 +0000 (GMT),
Steve Blinkhorn wrote:
> 
> > 
> > On 2006.12.14 13:31:07 +0000, Steve Blinkhorn wrote:
> > > lp:\
> > >         :lp=:rm=ourprinter:rp=PASSTHRU:mx#0:sd=/var/spool/lpd/ln17ps:\
> > >         :lf=/var/log/lpd-errs:
> > 
> 
> No, it's not that.

Hmmm, you should probably remove the "lp=" entry, though I doubt that's
the cause since as you have a value specified for "rp" the daemon should
never try to reference the value of "lp" and the default will be OK.

Note that if it's not actually an LPR service running on the remote host
then you need to use "lp=port@host" to talk to the printer instead of
"rp=host".

I did find that with a local printer that didn't use any printer device,
e.g. when using appletalk via the netatalk PAP tools, then specifying
"lp=/dev/null" was the best way to avoid problems with device opening.


>   It looks as if there have been changes that
> matter though: there seems to be a new assumption that files spooled
> for printers go in /var/spool/output/lpd (I have always used
> /var/spool/lpd/printername),

I don't see where you're seeing that.  You _must_ specify a unique spool
directory for every print queue.  That's never changed.  This
requirement should be documented in printcap(5), but it is not.

If you turn on printer accounting then generally I think you also want a
unique "af" file per print queue too.  Only the "lf" file can be shared,
though even that can get difficult to read and sort out if writes to it
are not done consistently.


> and the printer named lp for spooling
> purposes seems to be treated specially.

That has always been the case -- "lp" is the default printer if $PRINTER
isn't in the environment or '-P' isn't given on the command line.

See the "lp.local.h" header in the source for DEFLP's definition.


>   The position of the printer
> definition in the printcap file seems to make some sort of a
> difference,

Well, no, not normally.

You do want to make sure you only have one "lp" key in /etc/printcap
though, as otherwise only the first one found by cgetent(3) will be
used.

-- 
						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>