From owner-freebsd-questions Mon Jul 29 10:29:31 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA11136 for questions-outgoing; Mon, 29 Jul 1996 10:29:31 -0700 (PDT) Received: from cornus.FSL.ORST.EDU (root@FSL.ORST.EDU [128.193.112.105]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA11131 for ; Mon, 29 Jul 1996 10:29:29 -0700 (PDT) Received: from picea.FSL.ORST.EDU (hernanw@picea.FSL.ORST.EDU [128.193.112.3]) by cornus.FSL.ORST.EDU (8.6.9/8.6.9) with ESMTP id KAA21760; Mon, 29 Jul 1996 10:28:45 -0700 Received: (from hernanw@localhost) by picea.FSL.ORST.EDU (8.7/8.6.9) id KAA04242; Mon, 29 Jul 1996 10:28:42 -0700 (PDT) Date: Mon, 29 Jul 1996 10:28:40 -0700 (PDT) From: Wayne Hernandez To: questions cc: kuku@gilberto.physik.rwth-aachen.de Subject: smbprint samba -> Windows 95 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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