Skip site navigation (1)Skip section navigation (2)
Date:      09 Nov 2002 12:38:34 +0000
From:      Stacey Roberts <stacey@Demon.vickiandstacey.com>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Cc:        ports@freebsd.org
Subject:   Printing to Win2K share printer with apsfilter via samba fails with unable to write to output, fd=6, count=1000: m
Message-ID:  <1036845516.387.30.camel@Demon.vickiandstacey.com>

next in thread | raw e-mail | index | archive | help

--=-9X6WQCmu/R7jdnTG1q5V
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello,
     I've got samba-2.2.6 running on FreeBSD 4.7 Stable set up and
working okay.

I'm trying to enbale printing to an HP 845c printer attached to a Win2K
Pro box on the network.

I installed apsfilter-7.2.3_1, which claims to be able to do this, but
after configuring / printing test page / installation, nothing prints,
from *any* application, or command line. This is what I get in spool dir
logs:

# more /var/spool/lpd/hp845c/errs.FvAEICA=20
apsfilter warning: unknown option 'Demon.vickiandstacey.com'
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m
unable to write to output, fd=3D6, count=3D1000: m


The printcap produced by apsfilter:
hp845c|ijs/DESKJET_845;r=3D600x300;q=3Dmedium;c=3Dfull;p=3Da4;m=3Dauto:\
    :lp=3D/dev/null:\
    :if=3D/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=3D/var/spool/lpd/hp845c:\
    :lf=3D/var/spool/lpd/hp845c/log:\
    :af=3D/var/spool/lpd/hp845c/acct:\
    :mx#0:\
    :sh:
# APS1_END - don't delete this
#=20

Printer section of smb.conf:
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment =3D All Printers
   path =3D /var/spool/lpd/
   printable =3D yes
   browseable =3D no

smbprint:
TRANS=3D0
eval acct_file=3D\${$#}
spool_dir=3D`dirname $acct_file`=20
config_file=3D$spool_dir/.config

# Should read the following variables set in the config file:
#   server
#   service
#   password
#   username (optional)
#   IP (optional)
#   debug (optional)
#   debugsmb (optional)
#   debugfile (optional)
. $config_file

if [ "x$password" =3D "x" ] ; then
        password=3D"-N"
fi

if [ "x$username" =3D=3D "x" ] ; then
        username=3D"$server";
fi

while test $# -gt 0; do
        case "$1" in
        -t)
                TRANS=3D1
                ;;

         *)   # Bad Parameters, ignore them ...
                ;;
         esac
         shift
done

command=3D"print - ;"
if [ $TRANS -eq 1 ]; then
        command=3D"translate;$command";
fi

debugfile=3D"/tmp/smb-print.log"
if [ "x$debug" =3D "x" ] ; then=20
                debugfile=3D/dev/null debugargs=3D
else
        if [ $debug -eq 0 ] ; then
                debugfile=3D/dev/null debugargs=3D
        else
                set -x; exec >>$debugfile 2>&1
                debugargs=3D"$debugfile."
                #[ "x$debugsmb" =3D=3D "x" ] || debugargs=3D"$debugargs -d
$debugsmb"
        fi
fi

if [ "x$smbconf" !=3D "x" ]; then

        smbconf=3D"-s $smbconf"

fi

if [ "x$IP" !=3D "x" ]; then

        IP=3D"-I $IP"

fi

if [ "x$debugargs" !=3D "x" ]; then

        debugargs=3D"-l $debugargs"

fi

/usr/local/bin/smbclient \ <-- changed from $smbclient for investigation
        "\\\\$server\\$service" \
        $password \
        $smbconf \
        $IP \
        $debugargs \
        -U $username \
        -P \
        -c "$command"
#

I'd appreciate any help with this. I've searched google and the
apsfilter list archives for pointers, but only found lots of references
to other people having the same problem, but not replies with answers,
or solutions - well the solutions that *were* suggested are advisories
to use CUPS instead.

Hope to hear from "anyone" soon. Thanks in advance.

Regards,
Stacey


--=20
Stacey Roberts
B.Sc (HONS) Computer Science

Web: www.vickiandstacey.com


--=-9X6WQCmu/R7jdnTG1q5V
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQEVAwUAPc0ByJvQeubckvvXAQHXkwf/TJn/fSdtlA2laraMQXazoaa+gEzqhyar
4nc4mjKHQKK8pT9Vt9xEuT7hvwdIRkeepemFCV+LsN2duZvS7KjRMFRzJW6V/H5f
PKCvUBhSxJSCAAdCZFCmaM/g0+iERzIq8Gf7xgCpfbEKqIpY4WxnY91AdiEUakeM
J5MRnJP/eyeLZtlKXPYCoLQllg441zJAN5ypatieRfQoh7thnd9pZat3dl9NZW7x
l+lpbp3dTPs7Jvg7DdQ459Bosw6kG5MfXG7iJvFtDw1Z6aT8nJc09IQxVMoHNqQd
o6QrsK8N7XfGZ7pWqjaSYEaQExESTARF/LOOxryWaAKVY/1/S5QMLw==
=7YJq
-----END PGP SIGNATURE-----

--=-9X6WQCmu/R7jdnTG1q5V--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1036845516.387.30.camel>