Date: Mon, 29 Jul 1996 10:28:40 -0700 (PDT) From: Wayne Hernandez <hernanw@FSL.ORST.EDU> To: questions <freebsd-questions@freebsd.org> Cc: kuku@gilberto.physik.rwth-aachen.de Subject: smbprint samba -> Windows 95 Message-ID: <Pine.SUN.3.91.960729101710.3509A-100000@picea.FSL.ORST.EDU>
next in thread | raw e-mail | index | archive | help
This weekend, I finally got samba type printing working with lpd. This
is my current script:
#!/bin/sh
logfile=/tmp/smb-print.log
eval acct_file=\$$#
spool_dir='dirname $acct_file'
config_file=$spool_dir/.config
eval 'cat $config_file'
echo "server $server, service $service, job $job" >> $logfile
read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ] ; then
/usr/local/bin/gs -dNOPAUSE -q -sDEVICE=laserjet -sOutputFile=- -
quit.ps | (echo translate; echo "print -"; echo; cat) |
/usr/local/samba/bin/smbclient \\\\"$server"\\"$service" -d1 -P -N >>
$logfile && exit 0
else
(echo translate; echo "print -"; echo; echo $first_line; cat) |
/usr/local/samba/bin/smbclient \\\\"$server"\\"$service" -d1 -P -N >>
$logfile && exit 2
fi
exit 2
.config should contain lines:
server="server name"
service="printer name"
This was tested with Windows 95, NT should work, which I will test by
this weekend.
Wayne
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.960729101710.3509A-100000>
