matter@blake.acs.washington.edu (Matthew Trunnell) (12/07/89)
I have just installed CAP on our local network which, on the UNIX side, consists of a DECstation 3100 (running the atalkad), two SPARCstations, and about 15 SUN-3's. I have a problem with the papif input filter. The problem is that the only printer papif seems to know about is that which was set in the root environment when the lpd was started. The -P flag of lpr spools to the right place, but the printjob module of lpd, which invokes papif, never passes the printer name (I guess none of the standard input filters need to know the printer). When papif makes its getenv("PRINTER") call, it seems to look to the root environment present when the lpd was initiated, rather than to the user's environment. What am I doing wrong? matter Matthew Trunnell Ec-2 matter@ocean.washington.edu School of Oceanography, WB-10 matter@UWAVM.BITNET University of Washington Seattle, Washington 98195 206.543.7003
edmoy@violet.berkeley.edu (12/08/89)
In article <4787@blake.acs.washington.edu> matter@blake.acs.washington.edu (Matthew Trunnell) writes: > >I have just installed CAP on our local network which, on the UNIX side, >consists of a DECstation 3100 (running the atalkad), two SPARCstations, and >about 15 SUN-3's. I have a problem with the papif input filter. The problem >is that the only printer papif seems to know about is that which was set in >the root environment when the lpd was started. The -P flag of lpr spools >to the right place, but the printjob module of lpd, which invokes papif, >never passes the printer name (I guess none of the standard input filters >need to know the printer). When papif makes its getenv("PRINTER") call, it >seems to look to the root environment present when the lpd was initiated, >rather than to the user's environment. > >What am I doing wrong? I've gotten it to work on the 3100, as well as a Suns and NeXT. I think what you need to do is change your printcap if= entry to something like: :if=/usr/local/cap/lib/name:\ Then make the symbolic link: # cd /usr/local/cap/lib # ln -s papif name Papif is smart enough to know that if the name it is called by is not papif, it assumes that it is the lpd printer name. (You don't need to make the link symbolic, as a hard link works as well, but the symbolic link makes updating papif easier). Edward Moy Principal Programmer - Macintosh & Unix Workstation Support Services Workstation Software Support Group University of California Berkeley, CA 94720 edmoy@violet.Berkeley.EDU ucbvax!violet!edmoy
guyton%condor@RAND.ORG (12/08/89)
Another useful trick with papif is to make the filter a shell script. We have: if=/usr/local/cap/rover but "/usr/local/cap/rover" isn't a link to papif, but instead is a shell script containing: #!/bin/sh DEBUG=1 export DEBUG /usr/local/cap/papif -P rover $* > test.log 2>&1 This lets you monitor the output from the printer (called "test.log" in the spool directory). Useful for tracking down the occasional postscript errors. -- Jim Guyton guyton@rand.org