On Thu, 14 Aug 1997, George Bonser wrote:

> My understanding is that samba allows Win95 to print to Linux, it you
> want to go the other way, (linux to Win95 resources) you need a program
> called rumba.  You can locate it on most of the NExT ftp archives, I do

No, you use rumba to "nfs mount" the win95 filesystems on the Linux box.
It's great. You don't need smbfs in the kernel or anything. It should be
Debian-ized!

> On Thu, 14 Aug 1997, Paul Miller wrote:
> 
> > I'm trying to add an entry to the /etc/printcap file to print on another
> > machine (win95) using samba.  I have a HP Deskjet 660C and I want to use
> > Magicfilter's DJ550C filters.  Here's the problem:
> > 
> > 1) how do I use two filters in the printcap file (dj550c-filter and 
> > smbprint)
> > 2) when I print w/ only smbprint, the printer's error light lights up and
> > if I press the retry button it works...

I don't use Magicfilter, but the following should help you see what needs
to be done.

I set up my Linux box to print on an old HP LJ Series II on a win95
machine a few weeks ago.

I have this in my /etc/printcap:

winhplj2|lp:\
        :cm=HPLJ2 on April's PC:\
        :lp=/dev/winhplj2:\
        :sd=/var/spool/lpd/winhplj2:\
        :af=/var/spool/lpd/winhplj2/acct:\
        :mx#0:\
        :if=/usr/local/bin/smbprint:


/usr/local/bin/smbprint comes with samba. At the end is the following bit.
I inserted the " | /usr/local/bin/lpf_hplj" after the "cat" that follows
the "echo print" statement. 

(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
#        echo translate
        echo "print -"
        cat | /usr/local/bin/lpf_hplj
) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P
>> $logfile


/usr/local/bin/lpf_hplj is a very simple filter that I must have gotten
out of the print HOW-TO long ago:

#!/bin/sh
# a crude filter, prints text or postscript only
read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`

if [ "$first_two_chars" = "%!" ]; then 
   /usr/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=laserjet -sOutputFile=- -
else 
   echo -n $first_line | /usr/local/bin/lpf
   cat | /usr/local/bin/lpf
   printf "\014"
fi


/usr/local/bin/lpf, looking at it now, looks somewhat redundant, but I'm
not going to start messing with it now:

#!/bin/sh
if [ "$1" = -c ]; then
  cat
else
/ sed -e s/$/
fi
# the ``echo -ne'' assumes that /bin/sh is really bash
# echo -ne \\f

...RickM...





--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to