From owner-freebsd-questions Fri Mar 29 21:48:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from chivas.oneill.dhs.org (chivas.oneill.dhs.org [65.65.85.161]) by hub.freebsd.org (Postfix) with ESMTP id 0304F37B404 for ; Fri, 29 Mar 2002 21:48:12 -0800 (PST) Received: from v812r.seanoneill.info (dhcp1.NONROUTABLE [192.168.2.1]) by chivas.oneill.dhs.org (Postfix) with ESMTP id 42928767D; Fri, 29 Mar 2002 23:48:06 -0600 (CST) Message-Id: <5.1.0.14.0.20020329231924.00aad808@postoffice.swbell.net> X-Sender: swoneill@postoffice.swbell.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 29 Mar 2002 23:48:05 -0600 To: Glenn Johnson From: Sean O'Neill Subject: Re: apsfilter printing through samba Cc: FreeBSD questions list In-Reply-To: <20020330045107.GA98731@gforce.johnson.home> References: <200203292031354.SM00968@there> <1017437510.46170.20.camel@node1> <20020329212449.A22586@mail.clubplus.net> <20020330041434.GA1313@gforce.johnson.home> <200203292031354.SM00968@there> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 10:51 PM 3/29/2002 -0600, Glenn Johnson wrote: >In this case I want to make the printer the default printer so the name >'lp' is assigned to it in the printcap file. That should be what is >called if I just use 'lpr'. But I wonder if the name of the printer >share is somehow getting intermingled. I have this working in my environment no problem. Also, so I can print postscript documents - my BrotherMFC isn't postscript compatible, I have the LP printer in FreeBSD "shared" back out onto the network through Samba. This allows me to print postscript documents to the FreeBSD machine from laptop. FreeBSD then sends a rasterized image of the postscript document right back into my laptop to the printer. Works great. The following is a copy of my /etc/printcap: # APS1_BEGIN:printer1 # - don't delete start label for apsfilter printer1 # - no other printer defines between BEGIN and END LABEL lp|hl7x0;r=600x600;q=photo;c=gray;p=letter;m=auto:\ :lp=/dev/null:\ :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\ :sd=/var/spool/lpd/lp:\ :lf=/var/spool/lpd/lp/log:\ :af=/var/spool/lpd/lp/acct:\ :mx#0:\ :sh: # APS1_END - don't delete this Something that stumped me for a while was that fact that Apsfilter is using smbclient ... so its a SMB client. It has to authenticate itself to my laptop which is acting in this case as the server of the printer. To setup my printer I ran /usr/local/share/apsfilter/SETUP, it took me a couple of tries to get it right. After I finally got all the options right, SETUP created the directory /usr/local/etc/apsfilter/lp (notice it matches my printer name in /etc/printcap). In this directory, there are two files: -rw-r--r-- 1 root wheel 239 Mar 11 23:10 apsfilterrc -rw------- 1 daemon daemon 154 Mar 11 23:10 smbclient.conf Contents of apsfilterrc is: ----------------------------------- # # don't delete these settings # PRINTER='hl7x0' PAPERSIZE='letter' METHOD='auto' QUALITY='photo' COLOR='gray' RESOLUTION='600x600' # # additional configuration follows # insert settings as seen in /usr/local/etc/apsfilter/apsfilterrc # ----------------------------------- The contents of smbclient.conf is: SMB_SERVER='SMB Name of my laptop' SMB_IP='' <<- I could have used this but WINS service is working correctly through Samba - I think anyway :) SMB_PRINTER='BrotherMFC' <<- Name of the share on my laptop SMB_WORKGROUP='My NT domainname' SMB_BUFFER=1400 SMB_FLAGS='-N' SMB_USER='' SMB_PASSWD='