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

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

Post by Michael Sweede » Fri, 20 Jul 2001 12:34:04



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!
 
 
 

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

Post by Robert Brad » Fri, 20 Jul 2001 21:00:00



> 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!

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

================================================

 
 
 

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

Post by Frank Ha » Sat, 21 Jul 2001 00:04:57


On Thu, 19 Jul 2001 03:34:04 GMT, Michael Sweeden

> 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?

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.

 
 
 

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

Post by Michael Sweede » Sat, 21 Jul 2001 21:59:27


Hey, Robert:
This worked great - thank you!
Michael



> > 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!

> 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

> ================================================

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