From owner-freebsd-ports@FreeBSD.ORG Tue Feb 26 18:06:58 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E96B5964 for ; Tue, 26 Feb 2013 18:06:58 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 9E0AB14F5 for ; Tue, 26 Feb 2013 18:06:58 +0000 (UTC) Received: from [89.204.155.139] (helo=tiny.Sisis.de) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1UAOvS-0003Xg-Aq for freebsd-ports@freebsd.org; Tue, 26 Feb 2013 19:06:50 +0100 Received: from tiny.Sisis.de (localhost [127.0.0.1]) by tiny.Sisis.de (8.14.5/8.14.3) with ESMTP id r1QI6lEN001608 for ; Tue, 26 Feb 2013 19:06:47 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de (8.14.5/8.14.3/Submit) id r1QI6kqe001607 for freebsd-ports@freebsd.org; Tue, 26 Feb 2013 19:06:46 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de: guru set sender to guru@unixarea.de using -f Date: Tue, 26 Feb 2013 19:06:46 +0100 From: Matthias Apitz To: freebsd-ports@freebsd.org Subject: Re: FreeBSD port for redirecting printer Message-ID: <20130226180645.GA1161@tiny.Sisis.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT r226986 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 89.204.155.139 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Matthias Apitz List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 18:06:59 -0000 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. matthias -- Sent from my FreeBSD netbook Matthias Apitz | - No system with backdoors like Apple/Android E-mail: guru@unixarea.de | - Nerver being an iSlave WWW: http://www.unixarea.de/ | - No proprietary attachments, no HTML/RTF in E-mail phone: +49-170-4527211 | - Respect for open standards