From owner-freebsd-questions@FreeBSD.ORG Tue Dec 8 18:31:58 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 09247106566C for ; Tue, 8 Dec 2009 18:31:58 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id A4DD08FC14 for ; Tue, 8 Dec 2009 18:31:57 +0000 (UTC) Received: from r55.edvax.de (port-92-195-228-22.dynamic.qsc.de [92.195.228.22]) by mx02.qsc.de (Postfix) with ESMTP id BFDDC2537C; Tue, 8 Dec 2009 19:31:55 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id nB8IVr5t001633; Tue, 8 Dec 2009 19:31:54 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 8 Dec 2009 19:31:52 +0100 From: Polytropon To: David Southwell Message-Id: <20091208193152.756bb5dd.freebsd@edvax.de> In-Reply-To: <200912081111.18012.david@vizion2000.net> References: <200912081040.02500.david@vizion2000.net> <200912081052.nB8Aqf7X072178@banyan.cs.ait.ac.th> <200912081111.18012.david@vizion2000.net> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Olivier Nicole , freebsd-questions@freebsd.org Subject: Re: set up of hp laserjet 2200dn with Jetdirect 610N on network X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 18:31:58 -0000 On Tue, 8 Dec 2009 11:11:17 +0000, David Southwell wrote: > I really do not mind which facility to use provided I get the results!!! > . I do need to use as many of the printer features as possible. > I have enable the following: > IPP Printing : Enabled > FTP Printing : Enabled > LPD Printing : Enabled > 9100 Printing : Enabled > SLP Config : Enabled > EWS Config : Enabled If you already have LPD printing enabled in your printer, your computer's LPD subsystem should be able to hand the data over to the printer. For example, you can configure APSFILTER (a printer filter, similar to CUPS, but without the browser games and tons of dependencies) to create output for your printer. This depends on what your printer's language is. If it's already the standard, which is PS (Postscript), you don't need a filter at all, simply because PS is the default output format for printing. If it is PCL, you can easily setup APSFILTER (through its dialog driven install program) to output in form of PCL. Instead of specifying a local connection for the printer, you simply give its IP or name (if, for example, you have it in /etc/hosts). It's quite easy. If you then run lpr, lpq or lprm, inquiries and actions will be processed on the printer (by his lpd implementation). I'll share my working configuration for a HP Laserjet 4000 including duplexer. I've setup the printer name "Laserjet" in /etc/csh.cshrc: setenv PRINTER Laserjet Now all lp* command default to this printer name, instead the need of specifying -P or using "lp", the default. After installing apsfilter, I've run the setup program: # /usr/local/share/apsfilter/SETUP and configured the printer as needed. Note that if you don't find your specific model, you can choose a compatible one. The file SETUP.cfg contains: INTERFACE='parallel' DEVICE='/dev/lpt0' For your network printer, you would have different settings here. As I mentioned, those can be interactively set by the setup program. You will probably see something like rm='192.168.200.100' rp='raw' in this file. This created the directory /usr/local/etc/apsfilter/Laserjet with a file apsfilterrc, which I modified to run the duplexer by default. (If I really intend to NOT use it, I switch it off with the printer's controls.) GS_FEATURES='-q -dBATCH -dFIXEDMEDIA -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="HP LaserJet" -dDuplex=true -dIjsUseOutputFD -sPAPERSIZE=a4 -r600' DUPLEX=duplex BINDING=long Keep in mind that those settings have to be on one line, I just broke them up for better readability here. You can, by the way, easily setup two printers, one for duplex and one for no duplex, e. g. Laserjet and Laserjet-nodup. Both have the same settings, but differ in the GS_FEATURES line, e. g. GS_FEATURES='-q -dBATCH -dFIXEDMEDIA -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="HP LaserJet" -dIjsUseOutputFD -sPAPERSIZE=a4 -r600' See the -dDuplex=true is missing, so no duplex here. Finally, the APSFILTER setup program will adjust the system file /etc/printcap, which now contains an entry for the new printer called "Laserjet", e. g. Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\ :lp=/dev/lpt0:\ :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\ :sd=/var/spool/lpd/Laserjet:\ :lf=/var/spool/lpd/Laserjet/log:\ :af=/var/spool/lpd/Laserjet/acct:\ :mx#0:\ :sh: Again, for a network printer you would see rm= and rp= statements in this file, but not the lp= statement. If you've setup everything correctly, you should be able to: % lpq no entries % lpr /etc/rc.conf % lpq Laserjet is ready and printing Rank Owner Job Files Total Size 1st poly 483 /etc/rc.conf 2050 bytes % lprm - dfA483blahblah dequeued cfA483blahblah dequeued Of course, you will be able to print from any application now. Even piping to lpr is possible, e. g. % grep "bla" /some/files* | lpr Note that programs like Gimp require you to setup the printer again (in Gutenprint); you'll possibly have to set format and duplex and other things. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...