[ale] Remote printing won't work.

Jim Lynch jwl at sgi.com
Wed Apr 21 15:50:39 EDT 1999


I've got a wierd problem I need help with. 
I'm running 2.0.34 from Debian.  Using lprng for lpd support.

I reinstalled my system from hamm a while back and am having trouble
with remote printing.  I've run magicfilterconfig and set my old
laserjet series II printer up to work locally.  When I print files from
the Linux machine all is well.  I'm trying to print from a
remote machine and things aren't going well.  It doesn't print.
Now, I've set up numerous remote printers both on Linux and other
Unixes, so this isn't my first attempt.  In fact before I installed
from hamm this was working fine.  I even found a copy of the original
printcap and tried it, but no go.  

So to debug I replaced the input filter with a small shell script
that simply catted the file to /tmp.  That worked, so I figured that
magicfilter wasn't handling postscript output.  The file I was printing
from the remote computer is coming across as postscript.  
So I tried to print the file that I had just redirected to /tmp (and 
fixed the printcap file back to original, of course) and it prints fine.

So for some reason magicfilter is not handling the file right when
invoked
from a remote source but works fine if invoked from a local file. 
Strange.

So two questions.  Magic filter has a --debug option that writes debug
info out to the stderr.  The first line of my laserjet-lo filter looks 
like:
#! /usr/sbin/magicfilter --debug 2>/tmp/sss 

I didn't think that would work, but I tried.  It didn't.  Can someone
tell me how to get the stderr from magicfilter into a log?

Second, does anyone have any idea why this is behaving this way?

So I thought I'd write a script wrapper around magicfilter and try
that.  But when I did, magicfilter fails immediately with:
/var/log/lp-acct:1: Syntax error    
(That's in the stderr file that I was able to redirect, /tmp/sss)

So I wondered what was going on and echoed $* to another file just to
see what was being passed to magicfilter.  

-- -Cdogwood.peachtree.sgi.com -Ff -Hdogwood.peachtree.sgi.com
-Jstandard_input
-Ljwl -Plp -a/var/log/lp-acct -d/var/spool/lpd/hplj4l/
-e/var/spool/lpd/hplj4l/d
fA152dogwood.peachtree.sgi.com -fstandard_input
-hdogwood.peachtree.sgi.com -j15
2 -k/var/spool/lpd/hplj4l/cfA152dogwood.peachtree.sgi.com -l66 -njwl
-sstatus -w
80 -x1440 -y0 /var/log/lp-acct  

(This is in /tmp/ah)

Note the last field.  Where did that come from?

By the way, it also fails when I attempt to print locally in the same
manner.

Here is the printcap file:

#
# Copyright (c) 1983 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of California at Berkeley. The name of the
University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
#       @(#)etc.printcap        5.2 (Berkeley) 5/5/88
#
# > This file was generated by /usr/sbin/magicfilterconfig. <
#
lp|lp|hplj4l|HP Laserjet Seris II:\
        :lp=/dev/lp1:sd=/var/spool/lpd/hplj4l:\
        :sh:pw#80:pl#66:px#1440:mx#0:\
        :if=/tmp/pargs:\
       
:af=/var/log/lp-acct:lf=/var/log/lp-errs:                             
Here is
/tmp/pargs

#!/bin/sh
echo -- $* >/tmp/ah
/usr/sbin/magicfilter $* --debug 2>/tmp/sss
exit






More information about the Ale mailing list