Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2009 14:22:36 -0700 (MST)
From:      Warren Block <>
To:        Pieter Donche <>
Cc:        "mail.list freebsd-questions" <>
Subject:   Re: simple printer setup
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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 <
enscript -o - file.txt | nc myhplaser 9100

-Warren Block * Rapid City, South Dakota USA

Want to link to this message? Use this URL: <>