[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to print to a printer connected to win2000prof



Hi Kent.

On Thu, Jan 03, 2002 at 02:28:07PM -0600, Kent West wrote:
 
| I'm not using CUPS (just lprng and samba), and have been trying for a 
| year and a half (off-and-on of course) to print from a Linux box to a 
| printer hanging off a Windows box.

I suggest you try CUPS then.  It is as simple as making a symlink
(could be done automatically, maybe it is now) and telling CUPS that
the printer is smb://<machine>/<printer>.

| The real magic apparently takes place in the smbprint file.

Perhaps, but my CUPS system is using '/usr/bin/smbspool' for handling
the data transfer.

| This file is 
| in the /usr/share/doc/samba-doc/examples/examples/printing/smbprint 
| directory on my box, but I copied it to /etc/samba, although it might 
| more properly go into a /bin directory.
| 
| The core magic of this script seems to be this section:
|         if [ $TRANS -eq 1 ]; then
|           echo translate
|         fi
|         echo "print -"
|         cat
| ) | smbclient "\\\\$server\\$service" -U $password -N -P >> $logfile
| 
| I'm able to successfully connect to the share/service, but according to 
| the log file (which I set earlier in the smbprint file to be 
| /tmp/smb-print.log) shows this:
| 
| SERVER = helpdesk3
| SERVICE = zel319hp
| added interface ip=xxx.yyy.zzz.qqq bcast=xxx.yyy.abc.def nmask=255.255.248.0
| Got a positive name query response from xxx.yyy.zzz.dns ( xxx.yyy.zzz.nn )
| Domain=[ACU] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
| smb: \> smb: \> echo: command not found
| smb: \> cat: command not found
| smb: \> ): command not found
| smb: \> smb: \> echo: command not found
| smb: \> smb: \>

This appears to be a messed up shell script.  I'm looking at my copy
of smbprint and I don't see any (syntactical) problems though.

| I could give up on lprng/magicfilter/samba and just use CUPS, but I'm 
| strapped for memory, and have just barely enough for X and Galeon 
| without any extraneous stuff -- if I ever get it working it'll go into 
| production along with 3 clones as a web-browsing-only kiosk.

On my system right now cupsd has an RSS of 1768.  gvim is using more
than that!  (for the large files I have open)  (BTW, you still need
samba to use CUPS over samba, it just plugs together really easily and
works too!)

-D

-- 

If we claim to be without sin, we deceive ourselves and the truth is not
in us.
        I John 1:8



Reply to: