Problems setting up printer.

Polytropon freebsd at edvax.de
Fri Sep 11 15:54:17 UTC 2015


On Fri, 11 Sep 2015 08:19:31 -0600 (MDT), Warren Block wrote:
> On Fri, 11 Sep 2015, Polytropon wrote:
> 
> > On Thu, 10 Sep 2015 21:49:41 -0600, reg at dwf.com wrote:
> >>
> >> I've read and reread the printers section of the
> >> Handbook, but haven't been able to put together
> >> a printcap that will print.
> >>
> >> I have a Postscript HPLJ4100.
> >> It exists with that name in the dns.
> >>
> >> lp:\
> >>         :/lp:=9100 at HPLJ4100:\
> >>         :sh:\
> >>         :mx#0:\
> >>         :sd=/var/spool/lpd/lp:\
> >>         :lf=/var/log/lpd-errs:\
> >>         :if=/usr/local/libexec/enscript:
> >
> > You're missing rm= I think, which is essential.
> 
> For HP port 9100 printing, there is the alternate form of 
> 9100 at printername.  Which, now that I look at that line, has two 
> problems:
> 
>    :/lp:=9100 at HPLJ4100:\
> 
> The slash before "lp" here is a mistake.

Yes, that's something which looked strange to me, too,
that's why I posted one of my printcap entries for
comparison.



> The colon after "lp" is the second problem.  Colons are field 
> separators, so the printer device is never set.

Which explains why the printer doesn't print. With the
setting "lp=9100 at HPLJ4100", and "HPLJ4100" being resolvable,
the correct printer IP and port should be addressed.

By the way, it's easy to test that with netcat:

	% nc HPLJ4100 9100 < /tmp/print.ps

where /tmp/print.ps is a printable PS file (test file or
generated from a program's printing function).



> > Also remember to use cap_mkdb.
> 
> It is not needed for /etc/printcap.  At least I've never used it for 
> that. :)

Really? Good to know. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list