From owner-freebsd-questions Tue Nov 17 00:30:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA09125 for freebsd-questions-outgoing; Tue, 17 Nov 1998 00:30:22 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gwdu60.gwdg.de (gwdu60.gwdg.de [134.76.10.60]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA09118 for ; Tue, 17 Nov 1998 00:30:18 -0800 (PST) (envelope-from kheuer@gwdu60.gwdg.de) Received: from localhost (kheuer@localhost) by gwdu60.gwdg.de (8.9.0/8.9.0) with SMTP id JAA03261; Tue, 17 Nov 1998 09:29:42 +0100 (CET) Date: Tue, 17 Nov 1998 09:29:42 +0100 (CET) From: Konrad Heuer Reply-To: Konrad Heuer To: Marius Bendiksen cc: Clarence_Griffin@ed.gov, freebsd-questions@FreeBSD.ORG Subject: Re: printers In-Reply-To: <3.0.5.32.19981116160308.0094ec80@mail.scancall.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 16 Nov 1998, Marius Bendiksen wrote: > >If you make a printer queue with an input filter which uses Ghostscript to > >convert PostScript you can directly print to that queue by lpr -Pqueue > >from inside an application. Furthermore, if you set the environment > >variable PRINTER to the queue name, you won't have to do anything special > >inside an application - just print (PRINTER defines the default printer). > > So, I should mkfifo a queue, cat it into ghostscript onto the cu-device? That is not the right way. If you set up a printer on a BSD-like UNIX-System, you * make it known to the system by /etc/printcap and * you write an input or other filter which processes the data. PLease please read the handbook. In /etc/printcap, you give the device where the data will be sent to *after* the filter has taken effect. Your filter will be a shell script like this: -- cut here -- #!/bin/sh PATH=/bin:/usr/bin:/usr/local/bin exec 3>&1 1>&2 gs -dNOPAUSE -sSAFER -sDEVICE=epson -sOutputFile="| cat 1>&3" -q - -- cut here -- >From the shell, enter `gs -h' to see the devices available. Ghostscript is available as a precompiled package on the Walnut Creek CDs or at ftp.freebsd.org. Prefer version 4.03 or 5.xx. Regards Konrad Heuer // Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH // Goettingen (GWDG), Am Fassberg, D-37077 Goettingen, Germany // // kheuer@gwdu60.gwdg.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message