Well, you have been getting by on the cheap. You are "supposed" to print with a print queue on your Solaris box which is configured to run the smbclient command. This can get complicated, but it can be made simple. I am not doing this now, so my advice here is generic. Also, I use linux, not Solaris, whatever that is (wasn't that a SciFi movie?)
Read the smbprint file. It should be part of your samba sources. If you are lucky, it will work for you. Essentially, the print filter just says: cat | smbclient (Command you currently use might work, without the < file at the end.) I have not tried it, but I suspect that the command above might be all you would need in your print filter. Complexity is bad. If you are new to print filters, be aware that stdin and stdout are redefined when the filter runs. Stdin is the file you are printing, stdout is what lp is in the printcap definition for the queue. (To be more exact, stdin is the datafile created in your print spool directory by lpr, but this way lies madness.) In your printcap, have :lp=/dev/null So, anything sent to stdout is just sent to oblivion. And, then fool with it. Once you have this working, call this queue lp. It is confusing that the queue name and the output device parameter are both called lp. Now, if you know nothing about print queues and printcaps, readaboutit and ask questions.. Joel On Wed, Jan 15, 2003 at 06:45:40PM +0800, Neo Gigs wrote: > Hi there, > > I was trying print to a Windows shared printer from Solaris 2.5 using the > following command: > > # smbclient //windowspc/printer1 -U abc -c 'print -' < somefile.txt > > with success. Now, my application in Solaris was hardcoded to send print to > lp, if I wanto change the destination of printing from lp to the windowspc's > printer, how do I do this without changing my application source codes? > > I know that we can achieve that using a filter in the lp, shall anyone can > give me sample or example code how to code the filter? > > Thanks > > Neo Gigs > [EMAIL PROTECTED] > > -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
