Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 1996 10:18:45 +0100 (MET)
From:      Christoph Kukulies <kuku@gilberto.physik.rwth-aachen.de>
To:        ajohn@cyberforge.com
Cc:        questions@freebsd.org
Subject:   Re: Printing from FreeBSD to Win95 Printer using Samba
Message-ID:  <199611060918.KAA07723@gilberto.physik.rwth-aachen.de>
In-Reply-To: <199611060136.UAA08126@onramp.i95.net> from Anil John at "Nov 5, 96 08:35:58 pm"

Next in thread | Previous 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

What does /var/log/lpd-errs say?
This is my smbprint:
#!/bin/sh
#
logfile=/tmp/smb-print.log
server=$1
service=$2
job=$3
echo "server $server, service $service, job $job" >> $logfile
(
#       echo translate
        echo "print -"
        cat
) | /usr/local/samba/bin/smbclient \\\\ACC503D\\HP_III -d3 -N -P >>$logfile

(I hardwired the server/service name though in that example above.
 maybe I had problems with that too at that time)

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

--Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de



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