Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 1996 20:35:58 +0000
From:      "Anil John" <ajohn@cyberforge.com>
To:        questions@freebsd.org
Subject:   Printing from FreeBSD to Win95 Printer using Samba
Message-ID:  <199611060136.UAA08126@onramp.i95.net>

Next in thread | Raw E-Mail | Index | Archive | Help
Greetings,

I have a Win95 machine(flame) connected to a FreeBSD box(hammer) by
Ethernet.  A Cannon BJC4000 inkjet is connected to the Win95
machine(flame).  I am trying to print from the Unix Box to the
inkjet.  When I try to print using the command lpr -P cannon
<filename>, nothing happens. printer is available as a 'share'. I
confirmed that using smbclient on my freebsd box. The filter file
'printc' has been made executable.  The rest of my configuration
files are given below. Any help to troubleshoot this would be
appreciated...

Anil

My /etc/printcap:

cannon|remote printer|lp:\
        :lp=/dev/null:\
        :sd=/var/spool/output/cannon:\
        :lf=/var/log/lpd-errs:\
        :if=/usr/local/samba/bin/printc:

My /usr/local/samba/bin/printc:

!/bin/sh
# Print from Unix on a printer on SMB network.  An assumption is that
#'printer' was posted as a passwordless "share"
#
client="flame"   # client name here...
pshare="cannon"  # and here printer share name
printfile="/tmp/smbspool.$$"

cat > $printfile
if [ -s $printfile ] ; then
   ( echo "translate" ; echo "print $printfile" ; echo "quit" ) \
   | smbclient \\\\$client\\$pshare -P -N
fi
rm -f $printfile
exit 0


___________________________________________________________
CyberForge Group LLC                * Internet Consulting
E-Mail: ajohn@cyberforge.com        * WWW Publishing
410-597-8139                        * LAN & WAN Integration
            URL:  http://www.cyberforge.com



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?199611060136.UAA08126>