From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076339121687.tru64-unix-managers.marc@archive.invalid> From: Lam Tak Ming Date: Thu, 26 Sep 1996 01:53:20 +0000 To: tru64-unix-managers Subject: SUMMARY: printcap for HP jetdirect X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076339121687 Hi managers, Thanks for the responses from "WHITTAKER, Bruce" and "Henning Eli Lang" for their advice on making a DU box to act as a print server. Both of them point to the same solution which is to use two print queues in order to make a DU box to act as a print server. One of them will be used by users and the input filter will redirect the actual printing to the second print queue. The key point is to make the system believes that the first print queue is local and so the input filter will be activated. The second print queue use the rm and rp printcap entries to define the actual print server (the HP printer). Below are their parts of their originals: ------------------------------------------------------------------- From: "WHITTAKER, Bruce" I had done something similar over here once before and the answer is actually somewhat screwy. You need to convince UNIX that it the printer is physically connected to the machine before it will use the filters. This is probably a feature that is left over from the days when all printers had to have a computer physically connected to them - so that computer would do the filtering. I did the following to fix the problem.... #This calls hpfilter which then prints to b53lsrx b53lsr|hp-serial|lp1|1|hpjet|B53lsr|B53LSR|b53LSR:\ :br#19200:\ :ct=dev:\ :fc#0177777:\ :fs#03:\ :if=/usr/local/etc/hpfilter:\ :lf=/usr/adm/lp1err:\ :lp=/dev/null:\ :mx#0:\ :of=/usr/lib/lpdfilters/ln03rof:\ :lo=lock:\ :pl#66:\ :pw#80:\ :rw:\ :sd=/usr/spool/lpd1:\ :uv=4.0:\ :sh:\ :xc#0177777:\ :xf=/usr/lib/lpdfilters/xf:\ :xs#044000: # This prints straight to the printer. It is called by lp1 b53lsrx|lp2|2:\ :lp=:\ :rm=hpjet:\ :rp=lp0:\ :mx#0:\ :sd=/usr/spool/lpd2: So what is happening is that the first spool runs my filter program (hpfilter) and then directs the print job to /dev/null. The filter program then processes the input and prints back out to the second spool which then goes to the remote printer. -------------------------------------------------------------------------- From: "Henning Eli Lang" I've experienced the same kind of problem. I my case the problem was to direct the print to a Novell remote printer. I also found out that using the rm and rp option neglected the if field in the printcap. What I've found for a solution was to use a "dummy" printcap entry for the remote printer, and for the real printer I use a shell script ,which invoked the print filter ( /usr/local/bin/pcl5 ) and piped the output to the dummy printer: The printcap file: dummy: rm=novell1:rp=113:sd=/usr/spool/dummy real if=/usr/local/bin/sh_it : ( I've removed the none interesting things from the above file ) The /usr/local/bin/sh_it looks like this #!/bin/sh cat | /usr/local/bin/pcl5 $* | lpr -Pdummy -------------------------------------------------------------------------- Thanks again. Regards, TM Lam