| Stacey Roberts on Fri, 15 Nov 2002 20:07:51 +0100 (CET)(envelope-from owner-apsfilter-help@apsfilter.org) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Printing to Win2K share printer with apsfilter via samba fails |
Hello Michael,
Right.., I've re-installed apsfilter-7.2.4 and before I do
anything, I'd like to show you what installing apsfilter has done to
/etc/printcap:
# ls -la /etc/printcap
-rw-r--r-- 1 root wheel 2468 Nov 15 18:40 /etc/printcap
# cat /etc/printcap
# @(#)printcap 5.3 (Berkeley) 6/30/90
# $FreeBSD: src/etc/printcap,v 1.10.2.2 2002/08/07 10:33:39 blackend Exp
$
#
# This enables a simple local "raw" printer, hooked up to the first
# parallel port. No kind of filtering is done, so everything you pass
# to the "lpr" command will be printed unmodified.
#
# Remember, for further print queues you're going to add, you have
# to choose different spool directories (the "sd" capability below),
# otherwise you will greatly confuse lpd.
#
# For some advanced printing, have a look at the "apsfilter" package.
# It plugs into the lpd system, allowing you to print a variety of
# different file types by converting everything to PostScript(tm)
# format. For more information about apsfilter visit
#
# http://www.apsfilter.org/
#
# If you don't have a PostScript(tm) printer, don't panic, but do
# also install the latest "ghostscript" package for best printer
support.
#
# Do also refer to the "printing" section of the handbook.
#
# http://www.freebsd.org/doc/handbook/printing.html
#
# A local copy can be found under
#
# /usr/share/doc/handbook/handbook.{html,latin1}.
#
# Banner pages are now suppressed by default. Remove the :sh:
capability
# to turn them back on.
#
#lp|local line printer:\
# :sh:\
# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
#
# Sample remote printer. The physical printer is on machine "lphost".
# You can perform any kind of local filtering directly. If you need
# local filters (e.g. LF -> CR-LF conversion for HP printers), create
# a filter script that sends the proper escape sequence to the printer
# and then concatenates stdin to stdout.
#
#remote|sample remote printer:\
# :sh:\
# :rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs:\
# :if=/usr/local/libexec/if-script:
#
# Simple Russian printer with hardware CP866 character set, output
filter
# used for KOI8-R -> CP866 conversion
#
#lp|Russian local line printer:\
# :sh:of=/usr/libexec/lpr/ru/koi2alt:\
# :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
# APS1_BEGIN:printer1
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
hp845c|ijs/DESKJET_845;r=600x300;q=high;c=full;p=a4;m=auto:\
:lp=/dev/null:\
:if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
:sd=/var/spool/lpd/hp845c:\
:lf=/var/spool/lpd/hp845c/log:\
:af=/var/spool/lpd/hp845c/acct:\
:mx#0:\
:sh:
# APS1_END - don't delete this
#
Like I said earlier, I've not doing anything out the ordinary here. I
simply went through the varius option in the menu config script that
runs at "make install" time for printing to a windows shared printer,
and this is what happens.., Your comment:
> So during the setup (in "interface setup") you must've
> entered "/dev/null" as the target device, but it should
> rather be "/dev/lp0" or something like that.
here confuses me somewhat. I'm not sure what you mean by "target
device".., There were *no* fields that I recall where I was asked to
enter a value for anything called the "target device". If anything, I
was asked to enter the name for the queue, which apsfilter suggested
"lp" as default. I wanted and entered hp845c as the printer queue name.
That's it. If this is not the SETUP option you were referring to, then
please tell me where in ./SETUP I am supposed to supply a value for
"target device".
Lets see the state of apsfilterrc file that was being complained about:
# ls -la /usr/local/etc/apsfilter/hp845c/apsfilterrc
-rw-r--r-- 1 root wheel 244 Nov 15 18:40
/usr/local/etc/apsfilter/hp845c/apsfilterrc
#
It exists, and with those permissions that I have *not* touched.
Restarting the print queue:
# lpc restart all
hp845c:
no daemon to abort
printing enabled
daemon restarted
#
Not sure exactly what this means, but here's the status of the queue:
# lpc status all
hp845c:
queuing is enabled
printing is enabled
no entries in spool area
printer idle
#
Checking spool log file:
# ls -la /var/spool/lpd/hp845c/log
-rw-r--r-- 1 root daemon 0 Nov 15 18:40 /var/spool/lpd/hp845c/log
#
Attempting to print from AbiWord:
$ file test
test: ASCII English text
$
$ lpr -Php845c test
$
Checking queue:
$ lpc status all
hp845c:
queuing is enabled
printing is enabled
1 entry in spool area
hp845c is ready and printing
$
At this point, there is *nothing going on at the printer.
Checking messages:
$ tail /var/log/messages
Nov 15 18:41:42 Demon lpd[14521]: Demon.vickiandstacey.com requests
printjob hp845c
Nov 15 18:48:13 Demon lpd[14544]: Demon.vickiandstacey.com requests
printjob hp845c
Nov 15 18:56:28 Demon lpd[14559]: Demon.vickiandstacey.com requests
printjob hp845c
Nov 15 18:56:30 Demon hpijs: unable to write to output, fd=6,
count=1000: m
Nov 15 18:57:01 Demon last message repeated 161193 times
$
Checking spool dir:
# ls -la /var/spool/lpd/hp845c/
total 25928
drwxr-xr-x 2 root daemon 512 Nov 15 18:56 .
drwxr-xr-x 3 root daemon 512 Nov 15 18:40 ..
-rw-r----x 1 root daemon 4 Nov 15 18:56 .seq
-rw-r--r-- 1 root daemon 0 Nov 15 18:40 acct
-rw-rw---- 1 daemon daemon 130 Nov 15 18:56
cfA000Demon.vickiandstacey.com
-rw-rw---- 1 stacey daemon 1110 Nov 15 18:56
dfA000Demon.vickiandstacey.com
-rw-rw-r-- 1 root daemon 26513073 Nov 15 18:58 errs.ZSoELXF
-rw-rw-r-- 1 root daemon 37 Nov 15 18:56 lock
-rw-r--r-- 1 root daemon 0 Nov 15 18:40 log
-rw-rw-r-- 1 root daemon 29 Nov 15 18:56 status
#
Checking that error log:
# more /var/spool/lpd/hp845c/errs.ZSoELXF
apsfilter warning: unknown option 'Demon.vickiandstacey.com'
/usr/local/etc/apsfilter/basedir/bin/apsfilter: line 661:
/usr/local/etc/apsfilter/hp845c/smbclient.conf: Permission denied
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
unable to write to output, fd=6, count=1000: m
<snipped, pretty much goes on like that for ages>
#
For your benefit, I'll leave things as they are, except that I had to
kill that print job as /var/spool/lpd/hp845c/errs.ZSoELXF would keep
growing unless I kill the print job:
$ lpr -Php845c -
^Cstacey@Demon ~ $ lprm -Php845c -
dfA000Demon.vickiandstacey.com dequeued
cfA000Demon.vickiandstacey.com dequeued
$
What I've tried to do here is to (as best as I can) is describe what
happens with a virgin installation for apsfilter and what actually
happens as against what is expected (to simply print that text file as
apsfilter was able to print the test page).
Get back to me as and when you can, please.
Looking forward to hearing from you again.
Stacey
--
Stacey Roberts
B.Sc (HONS) Computer Science
Web: www.vickiandstacey.com