From owner-freebsd-ports@FreeBSD.ORG Wed Feb 27 01:43:58 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04C09360 for ; Wed, 27 Feb 2013 01:43:58 +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 AD8A1D1 for ; Wed, 27 Feb 2013 01:43:57 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.6/8.14.6) with ESMTP id r1R1hvWu049674; Tue, 26 Feb 2013 18:43:57 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.6/8.14.6/Submit) with ESMTP id r1R1hv74049671; Tue, 26 Feb 2013 18:43:57 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Tue, 26 Feb 2013 18:43:56 -0700 (MST) From: Warren Block To: Matthias Apitz Subject: Re: FreeBSD port for redirecting printer In-Reply-To: <20130226180645.GA1161@tiny.Sisis.de> Message-ID: References: <20130226180645.GA1161@tiny.Sisis.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="3512871622-2026383708-1361929437=:49330" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Tue, 26 Feb 2013 18:43:57 -0700 (MST) Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 01:43:58 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --3512871622-2026383708-1361929437=:49330 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 26 Feb 2013, Matthias Apitz wrote: > El día Tuesday, February 26, 2013 a las 06:16:37PM +0100, Wojciech Puchar escribió: > >> i need to emulate print server on device running FreeBSD (which do other >> things in the same time) - as standard port 9100 not lpd. >> >> Can it be done. >> >> yes i know i can just add to inetd.conf cat >/dev/ulpt0 BUT >> >> - it will accept a connection even if printer is not connected >> - it doesn't work bidirectionally (usually not needed but anyway) >> >> Anyone knows a program from ports (or not) to do this? > > Install CUPS (from our ports), catch the incoming data on 9100 with > ncat(1) (from ports) and pipe the data to a "lpr -P.... -o raw" command (of CUPS) > which puts a job on the queue for your printer until the > printer comes ready. netcat is already in base as nc(1). --3512871622-2026383708-1361929437=:49330--