Date: Fri, 29 Mar 2002 23:48:05 -0600 From: Sean O'Neill <sean@seanoneill.info> To: Glenn Johnson <glennpj@charter.net> Cc: FreeBSD questions list <questions@FreeBSD.ORG> Subject: Re: apsfilter printing through samba Message-ID: <5.1.0.14.0.20020329231924.00aad808@postoffice.swbell.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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='<my NT domain LOGIN ID>' SMB_PASSWD='<my NT domain login password' I think when the apsfilter script notices that the device is /dev/null and/or the /usr/local/etc/apsfilter/lp directory has a smbclient.conf file, it knows the printer is connected to an NT server - I haven't really looked that hard at the apsfilter script. It then kicks off smbclient to do the printing with all the proper switches and stuff using the smbclient.conf file parameters. I've always meant to write this down - it took me 20 minutes of digging around to "figure" this all out again :( LOL Hope this helps. -- ........................................................ ......... ..- -. .. -..- .-. ..- .-.. . ... ............ .-- .. -. -... .-.. --- .-- ... -.. .-. --- --- .-.. ... Sean O'Neill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20020329231924.00aad808>