simple printer setup

Warren Block wblock at wonkity.com
Fri Feb 6 13:22:38 PST 2009


On Fri, 6 Feb 2009, Pieter Donche wrote:

> FreeBSD 7.0: what is the most simple and quickest way to set up printing
> from the unix command line to a few HP printers (all Postscript enabled)
> that have an IP address (direct printer to IP address) ? (printing of
> unix text files and postscript files)

The Handbook covers it, but takes its time getting around to network 
printers.  Here's a short form:

Put printer hostnames in /etc/hosts or DNS.
Make a spool directory.
Create a filter script for autodetecting PS and formatting text to PS.
Put an entry in /etc/printcap.
Enable and run lpd.

Then use lpr to print.

/usr/ports/print/enscript-* is useful for formatting text into PS.

If you need to print something right now, you can use nc(1) to send 
files to the printers:

nc myhplaser 9100 < file.ps
enscript -o - file.txt | nc myhplaser 9100

-Warren Block * Rapid City, South Dakota USA


More information about the freebsd-questions mailing list