I'm trying to get my new workgroup printer (HP LJ4000N) to work.
Data flows and ink sticks to paper like it should but there's
some trouble with invoking a filter with lpr command.
My /etc/printcap entry looks like this:
HP4000N|hp4000n:lp=:sd=/var/spool/lpd/stips3:rm=ip.address.here:\
:if=/var/spool/lpd/stips3/filter:lf=/var/log/lpd-errs:
And my /var/spool/lpd/stips3/filter looks like this:
#!/bin/sh
/usr/bin/tr -d '\r' | /var/spool/lpd/a2ps -x
The problem is such that when using lpr the data clearly doesn't
go through the filter. If the file doesn't contain ^M:s the printer
doesn't recognise line feeds. Also, the filter should make the
printer to print two pages on one with borders and some header
information.
'a2ps | lpr' works fine -> the problem is either in filter or
in printcap..
We currently have a HP LJ4MP machine connected to LPT1 and it
works fine with an printcap entry like this:
HP4MP|hp4mp:lp=/dev/lp1:sd=/var/spool/lpd/stips2:sh:mx#0:\
:if=/var/spool/lpd/stips2/filter:lf=/var/log/lpd-errs:
ls -la /var/spool/lpd/stips3/ shows:
drwxrwxr-x 2 root daemon 1024 Jan 8 11:53 .
drwxrwxr-x 7 root lp 1024 Jan 6 20:47 ..
-rw-rw---x 1 root lp 4 Jan 8 11:53 .seq
-rwxr-xr-x 1 root root 55 Jan 6 20:47 filter
-rw-rw-r-- 1 root daemon 19 Jan 8 11:53 lock
-rw-rw-r-- 1 root daemon 27 Jan 8 11:53 status
Any advice will be appreciated. Also email - but my address needs
some modification:
Erka