Printer won't work

Warren Block wblock at wonkity.com
Fri Jul 22 21:37:30 GMT 2005


[Please keep questions at freebsd.org CCed in case there is useful 
information for others in this thread.  Thanks.]

On Fri, 22 Jul 2005, service at fixer.com wrote:

> Thanks, I put 'lpd_enable="YES" in my rc.conf file and I now have a printer
> deamon.  I checked with your 'ps aux | grep lpd" and yes its there.

> lptest> /dev/lpt0 still works the same.

Sorry, can't recall what that was.

> When I run 'lpr somefile',  it will
> do absolutely nothing sometimes.  Othertimes it load a page and eject
> immedialtely without trying to print anything.

If your printer can print plain text, you still might only see the first 
line--the rest can "stairstep" off the page because lptest only sends 
linefeeds, not CRLF, between lines.

lptest sends 200 lines of text with linefeeds, enough to force a normal 
printer to eject at least a couple of pages.  While testing a new 
printer, though, it's easy to lose track of what may be left in the 
printer buffer.

Once the printer realizes that text will not be on the visible part of 
the page, it may not do anything until it has received enough linefeeds 
or a formfeed to eject the page.  You can send a formfeed directly:

   printf "\f" | lpr

Printers that can't handle plain text (euphemistically known as 
"host-based" or "winprinters") have to get preformatted data through a 
driver.  The driver is usually specified as an input filter (if=) in the 
printcap.  Check /var/log/lpd-errs for error messages from the driver.

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list