Subject: [netatalk-admins] how to configure papd for printing into a shell script?

From: "Markus" <[email-masked]>
Date: Wed, 13 Aug 1997 15:53:38 +0200

hi,
we have some macs and some pcs using one unix machine as a file server.
the unix box has samba and atalk running.

now i want the macs to print on the printers connected to the windows
boxes.
from samba docs i grabbed a nice little script that uses a windows printer
to print out everything piped into the script.

how can i configure papd to call that script instead of checking in
/etc/printcap?

markus

---

From: Nicolas Soriano <[email-masked]>
Date: Wed, 13 Aug 1997 17:34:34 +0200

Markus wrote:

> we have some macs and some pcs using one unix machine as a file  
> server. the unix box has samba and atalk running.

I have the same kind of configuration, King Linux amongst poor windoz 
and mac boxes.

> now i want the macs to print on the printers connected to the windows

That's what I did too. (and PCs printing on mac printers)

> from samba docs i grabbed a nice little script that uses a windows 
> printer to print out everything piped into the script.

You must be talking of smbprint ?

 > how can i configure papd to call that script instead of checking in

Well, I'm using printcap ;-)

declaration of a PC printer in printcap :

      smb:lp=/dev/null:sd=/usr/spool/lpd/smb:\
                              :sh:if=/usr/local/samba/bin/smbfilter:\
                              :af=/usr/spool/lpd/smb/acct:

You must have a file /usr/spool/lpd/smb/.config containing
server=Name_of_sharing_PC
service=name_of_printer
password=password

the PC printer is reachable from the U*x box.

Now you can share it with netatalk
first, declare it in /etc/papd.conf :

	Deskjet500@MY ZONE:\
                :pr=smb:op=root:\
                :pd=/usr/share/lib/ppd/deskjet.ppd:

and use a filter-script to convert the postscript (sent by mac)
to the language of your PC printer (that's the smbfilter declared in
printcap).

You can find one in an article I wrote (it's in french but the script
is international) it works with an HP Deskjet
http://zeus-rcg.univ-rennes1.fr/winatalk.html#4

If your PC printer is postscript, the script can be very simple. but if
one day you want to print a raw textfile from your U*x box to this
printer, it would be better to have a complete filter script ;-)

> markus

---
[email-masked]
_____________________________________________________________________
 Plus ça rate, plus on a des chances que ça marche...
 -Shadok-