[wplug] CUPS with LPR

Bill Moran wmoran at potentialtech.com
Mon Sep 26 16:38:32 EDT 2005


Brandon Kuczenski wrote:
> I am delving into the intricacies of Unix printing, owing to the fact that
> my lab recently purchased a pretty fancy color laserjet printer (it's
> practically the size of a TV).
>
> I have the printer set up on CUPS and it works in SAMBA -- which was quite
> an adventure, but at least I learned about the 'rpcclient' command, along
> with a little bit more about how Windows does its secret stuff.
>
> But I can't get the other end to work: printing a post-script file from
> the command line.
>
> CUPS's own documentation says to use the commands 'lp' and 'lpr' -- but
> they complain that lpd, the daemon, isn't running.  I would accept that I
> need to start a separate daemon IN ADDITION to cupsd (which IS running),
> but I doubt that because the CUPS documentation doesn't mention such a
> thing anywhere.
>
> So -- is that what I'm supposed to do? Start lpd along with cupsd on boot?
> or is there some other 'frontend' command to CUPS that I'm missing?
>
> The computer is FreeBSD, but that shouldn't matter, right?

I'm assuming you installed CUPS from ports.

FreeBSD comes with a version of lpr, which is probably installed in /bin
or /usr/bin (maybe even /sbin|/usr/sbin, I'm not in front of a FreeBSD
machine today)

Anyway, CUPS installs its own version of lpr, which uses the CUPS daemon
instead of lpd (keep in mind that, originally, lpr was just a front-end
to the lpd daemon, so making another version of lpr that is a front-end
for cupsd makes sense).

Anyway, I'm guessing the problem is that the CUPS version of lpr is in
/usr/local/something and your path finds the BSD lpr first.  This can
be fixed a number of ways ... moving the BSD lpr to lpr.bsd (or something)
and symlinking the CUPS lpr is one technique.  Others are possible.
Use which(1) to verify this before you change things.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug mailing list