Still having network/Postscript Printer problem

Warren Block wblock at wonkity.com
Sun Sep 13 13:37:41 UTC 2015


On Sun, 13 Sep 2015, reg at dwf.com wrote:

> I am having nothing but trouble in trying to get printing to work under
> FreeBSD with my HPLJ4100.  The printer works find from linux, and I might
> just give up and use the 'cups' implemenetation under FreeBSD if I can't
> get lpd to work.
>
> Here is where I stand.
>
> I have the environment variabalee
>
> setenv PRINTER=HPLJ4100

This is not used by lpd at all, as far as I know.

> HP-DP:\
>        :rm=9100 at HPLJ4100:\
>        :rp=raw:\
>        :sd=/var/spool/lpd/HP-DP:\
>        :lf=/var/spool/lpd/HP-DP/log:\
>        :af=/var/spool/lpd/HP-DP/acct:\
>        :mx#0:\
>        :sh:
>
> when I do a
>
> lpr sum.ps
>
> of a postscript file, I see
>
> root at FreeBSD:/home/reg # lpr sum.ps
> lpr: HPLJ4100: unknown printer

That is because the printcap shown above gives the printer the name of 
HP-DP.  To use that, the printer name must be given to lpr:

   lpr -PHP-DP sum.ps

However, I recommend giving the default printer the name "lp".  That is 
the default so that lpr can be used without specifying the printer name. 
Printers can be given multiple names, if desired.

> if I take the 9100@ out of the printcap file, viz
>
> HP-DP:\
>        :rm=HPLJ4100:\
>        :rp=raw:\
>        :sd=/var/spool/lpd/HP-DP:\
>        :lf=/var/spool/lpd/HP-DP/log:\
>        :af=/var/spool/lpd/HP-DP/acct:\
>        :mx#0:\
>        :sh:
>
> I see for the lpr
>
> root at FreeBSD:/home/reg # lpr sum.ps
> lpr: HPLJ4100: unknown printer
>
> so thats the same.
>
> I have tried about a thousand vaiations, anc always see
>
> root at FreeBSD:/home/reg # lpq
> lpq: printer not found
>
> I must be doing something basic that is wrong, but I dont see ir.
> Someone tell me what Im doing wrong, this can't be this hard.

In an earlier post, we showed what was wrong with that earlier broken 
printcap.  Did you not see that?

lp:\
 	:lp=9100 at HPLJ4100:\
 	:sh:\
 	:mx#0:\
 	:sd=/var/spool/lpd/lp:\
 	:lf=/var/log/lpd-errs:

This is shown in the Handbook printing section:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/printing-lpd.html


More information about the freebsd-questions mailing list