Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

(How)Can I print to Win 9X PC printers from Samba on SCO OpenServer?

0 views
Skip to first unread message

Michael Sweeden

unread,
Jul 18, 2001, 11:34:04 PM7/18/01
to
In the "Using Samba" online book within SWAT, there is an alleged
"smbprint" command. I downloaded, compiled, and installed Samba 2.2.0a,
but there is no such command that I can find. Is there a way for my
OpenServer 5.0.6 system running Samba to print to a shared PC printer?
Thanks!

Robert Brady

unread,
Jul 19, 2001, 8:00:00 AM7/19/01
to

copy the script below to /usr/spool/lp/model/winprint
and add a printer ( mkdev lp ) and choose winprint as the
model.
Change the script to suit your PC name and printer share name
Note: the line in the for loop is one line
===============winprint=======================

#

if [ -x "/usr/spool/lp/bin/drain.output" ]
then
DRAIN="/usr/spool/lp/bin/drain.output 1"
else
DRAIN=
fi

copies=$4
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
for file in $files
do
(echo "print -";echo\033&k2G\033&k2S\c";cat"$file";echo
"\014\033E\c")|/usr/local/samba/bin/smbclient \\\\PCNAME\\hp -P-N
done
i=`expr $i + 1`
done
${DRAIN}
exit 0
=====================end=========================

--
================================================
Robert Brady
rob...@crow.cfs.net.au
================================================

Frank Hahn

unread,
Jul 19, 2001, 11:04:57 AM7/19/01
to
I have not downloaded the 2.2.0a version of Samba but previous source
code versions of Samba had this script in the /examples/printing/
directory.

It needs to be installed manually.

--
Frank Hahn

"Virtual" means never knowing where your next byte is coming from.

Michael Sweeden

unread,
Jul 20, 2001, 8:59:27 AM7/20/01
to
Hey, Robert:
This worked great - thank you!
Michael

Robert Brady wrote:

--
L. Michael Sweeden
108 Foxwood Circle
Oliver Springs, TN 37840
Phone: (865)435-7025
Fax: (865)435-5023


0 new messages