From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 21:22:38 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89290106566C for ; Fri, 6 Feb 2009 21:22:38 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 4863E8FC08 for ; Fri, 6 Feb 2009 21:22:37 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id n16LMbRJ044274; Fri, 6 Feb 2009 14:22:37 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id n16LMaAG044271; Fri, 6 Feb 2009 14:22:37 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 6 Feb 2009 14:22:36 -0700 (MST) From: Warren Block To: Pieter Donche In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (wonkity.com [127.0.0.1]); Fri, 06 Feb 2009 14:22:37 -0700 (MST) Cc: "mail.list freebsd-questions" Subject: Re: simple printer setup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2009 21:22:38 -0000 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