From owner-freebsd-hackers Mon Sep 22 12:35:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA12224 for hackers-outgoing; Mon, 22 Sep 1997 12:35:33 -0700 (PDT) Received: from arg1.demon.co.uk (arg1.demon.co.uk [194.222.34.166]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA12219 for ; Mon, 22 Sep 1997 12:35:28 -0700 (PDT) Received: (from arg@localhost) by arg1.demon.co.uk (8.8.5/8.8.5) id UAA28417; Mon, 22 Sep 1997 20:35:24 +0100 (BST) Date: Mon, 22 Sep 1997 20:35:24 +0100 (BST) From: Andrew Gordon X-Sender: arg@server.arg.sj.co.uk To: hackers@freebsd.org Subject: lpr/lpd and HP networked printers Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk For a long time (at several different sites) I have been using HP laserjets with the 'jetdirect' internal ethernet option, spooling on a FreeBSD box and driving the printer via the lpr protocol. This works fine, but the HP prints a fairly useless 'banner' page after each job; since people are mostly printing documents of only a couple of pages, this is a considerable waste of paper, but I had been unable to discover any way to switch it off. In particular, it is not affected by the "sh" capability in /etc/printcap. Having recently discovered that printing direct to the HP from an old 4.3BSD system did _not_ produce the cover page, I investigated more closely, and discovered that FreeBSD's lpr/lpd do not process the "sh" capability except when printing to a local printer. This is easy enough to fix, though it is not obvious which is the correct way. There are a number of possibilities: 1) Do nothing. I suspect the authors of this code would say that this is how it's meant to be, and that the HP ought to implement its own equivalent of /etc/printcap for this purpose. However, it doesn't, and getting HP to change their code is probably impossible. 2) Change lpr so that it takes into account the "sh" capability when constructing the control file ("sh" would override any -h, -C, -J, -U options on the command line). This is the easiest to do, but in the situation where you have multiple workstations printing through a central server, it requires that the administrator's policy (headers or not) be replicated on all the workstations that access the printer. 3) Change the network output side of lpd to take account of "sh", as it already does when printing to a local printer (ie. modify the control file before sending). 4) As 3), but introduce a new capability to control this behaviour rather than using "sh". 5) Modify both lpr and lpd as above. Any comments? If there is consensus on a change, I will contribute patches.