Printing problem from Linux to Windoze...HELP PLS!

Printing problem from Linux to Windoze...HELP PLS!

Post by Jeffrey S. Mullike » Thu, 07 Feb 2002 04:49:39



Ok,
     I tried posting this in the Samba group, and got no response, so
I'll see if there are better brains here.

     I'm sure it's me, or something I've done, but ever since I upgraded
my RH 6.2 to 7.0, I have not been able to print to my Windoze printer. I
am not up to RH 7.2, and still no luck.

     I have beaten my head against this problem until, I'm sure that
I've  been blinded to what's wrong.

     I've got LPRng v. 3.7.4-28, and Samba 2.2.1a-4, which both came with

the RH7.2 upgrade I did recently.

     First, after trying to use printconf-gui, and Webmin, and reading as

much doc as I can find, I still can't determine for certain, whether a
share name referenced in the script.cfg file should use the '/' or the
'\'s.  Anyone...anyone..?

     Second, if I encant the following:

     # smbclient //MYSHAREHOST/MYPRINTER -I 192.168.1.11 -W WORKGROUP

...after the password prompt, I just hit enter, and I get the smb:>
prompt just fine.  But if I issue a: > print ./path/myfile.txt
command, still nothing prints.  So, here's my stuff:

+++++++++++++++++++++++++++++++++++
/etc/printcap:

lp:\
     :sh:\
     :ml=0:\
     :mx=0:\
     :sd=/var/spool/lpd/lp:\
     :af=/var/spool/lpd/lp/lp.acct:\
     :lp=|/usr/share/printconf/util/smbprint:\
     :lpd_bounce=true:\
     :if=/usr/share/printconf/util/mf_wrapper:

+++++++++++++++++++++++++++++++++++++++
/usr/share/printconf/util/smbprint: (without the comments)

#!/bin/sh
config_file=script.cfg

eval `cat $config_file`

share=`echo $share | sed "s/[\]/\//g"`

if [ "$user" != "" ]; then
    usercmd="-U"
else
    usercmd=""
fi

if [ "$workgroup" != "" ]; then
    workgroupcmd="-W"
else
    workgroupcmd=""
fi

if [ "$translate" = "yes" ]; then
  command="translate ; print -"
else
  command="print -"
fi

#echo $share $password $translate $x_command > /tmp/smbprint.log

cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
      $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \
      -c "$command" 2>/dev/null
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

/var/spool/lpd/lp/script.cfg

share='//MYSHAREHOST/MYPRINTER'
hostip='192.168.1.11'
user=''
password=''
workgroup='WORKGROUP'
translate='no'

++++++++++++++++++++++++++++++++++++++++++++++++
/var/spool/lpd/lp/mf.cfg

# foomatic/magicfilter configuration
# Make:        Canon
# Model:    S450
# Printer Id:    479986
# Driver:    bjc6000b1.upp
# TERMINATION=
# FILTER_LOCALE=C

define(MAKE, `Canon')dnl
define(MODEL, `S450')dnl
define(COLOR, `true')dnl
define(PAGEsize, `Letter')dnl
define(TEXTfilter, pipe/postscript/ /usr/bin/mpage -b ifdef(`PAGEsize',
PAGEsize, Letter) -1 -o -P- -)dnl
define(PSfilter, `filter
/usr/share/printconf/util/mf_postscript_wrapper  --mfomatic -d
bjc6000b1.upp-479986.foo')dnl
define(PCLfilter, `cat')dnl
define(PJLfilter, `cat')dnl
define(DEFAULTfilter, `cat')dnl

+++++++++++++++++++++++++++++++++++++++++++++++++++++

And my /etc/samba/smb.conf file:

[global]
#    printer = lp
     debug level = 1
     writeable = Yes
     dns proxy = No
     security = share
     encrypt passwords = yes
     null passwords = yes
     server string = Samba Server
     workgroup = WORKGROUP
     socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
     comment = Canon S450
     guest ok = Yes
     netbios name = LINUX800
     log file = /var/log/samba/%m.log
     preferred master = no

[DriveH]
     path = /private
     comment = Linux 800
     allow hosts = 192.168.1.

[root]
     path = /
     comment = The whole Enchilada
     allow hosts = 192.168.1.

+++++++++++++++++++++++++++++++++++++++++++++++++++

If anybody can 'splain this to me, and give me a clue as to what the
heck is wrong with this picture, I'd sure be greatful.  And oh by the
way, I can print to the printer in question from other windoze machines
with no problem.  There is no password enabled on the printer share
setup dialog.

     Once again, thanks if you can help.

     Jeff.

 
 
 

Printing problem from Linux to Windoze...HELP PLS!

Post by Dean Thompso » Fri, 08 Feb 2002 00:20:08


Hi!,

Quote:> I'll see if there are better brains here.

>      I'm sure it's me, or something I've done, but ever since I upgraded
> my RH 6.2 to 7.0, I have not been able to print to my Windoze printer. I
> am not up to RH 7.2, and still no luck.

>      I have beaten my head against this problem until, I'm sure that
> I've  been blinded to what's wrong.

>      I've got LPRng v. 3.7.4-28, and Samba 2.2.1a-4, which both came with

> the RH7.2 upgrade I did recently.

>      First, after trying to use printconf-gui, and Webmin, and reading as

> much doc as I can find, I still can't determine for certain, whether a
> share name referenced in the script.cfg file should use the '/' or the
> '\'s.  Anyone...anyone..?

>      Second, if I encant the following:

>      # smbclient //MYSHAREHOST/MYPRINTER -I 192.168.1.11 -W WORKGROUP

> ...after the password prompt, I just hit enter, and I get the smb:>
> prompt just fine.  But if I issue a: > print ./path/myfile.txt
> command, still nothing prints.  So, here's my stuff:

You might like to grab a copy of the smbprint script which is in the SMB-HOWTO
located at http://www.linuxdoc.org.  In my configuration file for the resource
I have the following:

share=//mymachine/myprinter
user="****"
password="*******"

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

Printing problem from Linux to Windoze...HELP PLS!

Post by Andrew Stad » Fri, 08 Feb 2002 00:45:49



> Ok,
>      I tried posting this in the Samba group, and got no response, so
> I'll see if there are better brains here.

>      I'm sure it's me, or something I've done, but ever since I upgraded
> my RH 6.2 to 7.0, I have not been able to print to my Windoze printer. I
> am not up to RH 7.2, and still no luck.

>      I have beaten my head against this problem until, I'm sure that
> I've  been blinded to what's wrong.

>      I've got LPRng v. 3.7.4-28, and Samba 2.2.1a-4, which both came
>      with

> the RH7.2 upgrade I did recently.

>      First, after trying to use printconf-gui, and Webmin, and reading
>      as

> much doc as I can find, I still can't determine for certain, whether a
> share name referenced in the script.cfg file should use the '/' or the
> '\'s.  Anyone...anyone..?

>      Second, if I encant the following:

>      # smbclient //MYSHAREHOST/MYPRINTER -I 192.168.1.11 -W WORKGROUP

> ...after the password prompt, I just hit enter, and I get the smb:>
> prompt just fine.  But if I issue a: > print ./path/myfile.txt command,
> still nothing prints.  So, here's my stuff:

> +++++++++++++++++++++++++++++++++++
> /etc/printcap:

> lp:\
>      :sh:\
>      :ml=0:\
>      :mx=0:\
>      :sd=/var/spool/lpd/lp:\
>      :af=/var/spool/lpd/lp/lp.acct:\
>      :lp=|/usr/share/printconf/util/smbprint:\ :lpd_bounce=true:\
>      :if=/usr/share/printconf/util/mf_wrapper:

> +++++++++++++++++++++++++++++++++++++++
> /usr/share/printconf/util/smbprint: (without the comments)

> #!/bin/sh
> config_file=script.cfg

> eval `cat $config_file`

> share=`echo $share | sed "s/[\]/\//g"`

> if [ "$user" != "" ]; then
>     usercmd="-U"
> else
>     usercmd=""
> fi

> if [ "$workgroup" != "" ]; then
>     workgroupcmd="-W"
> else
>     workgroupcmd=""
> fi

> if [ "$translate" = "yes" ]; then
>   command="translate ; print -"
> else
>   command="print -"
> fi

> #echo $share $password $translate $x_command > /tmp/smbprint.log

> cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
>       $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \ -c
>       "$command" 2>/dev/null
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

> /var/spool/lpd/lp/script.cfg

> share='//MYSHAREHOST/MYPRINTER'
> hostip='192.168.1.11'
> user=''
> password=''
> workgroup='WORKGROUP'
> translate='no'

> ++++++++++++++++++++++++++++++++++++++++++++++++
> /var/spool/lpd/lp/mf.cfg

> # foomatic/magicfilter configuration
> # Make:        Canon
> # Model:    S450
> # Printer Id:    479986
> # Driver:    bjc6000b1.upp
> # TERMINATION=
> # FILTER_LOCALE=C

> define(MAKE, `Canon')dnl
> define(MODEL, `S450')dnl
> define(COLOR, `true')dnl
> define(PAGEsize, `Letter')dnl
> define(TEXTfilter, pipe/postscript/ /usr/bin/mpage -b ifdef(`PAGEsize',
> PAGEsize, Letter) -1 -o -P- -)dnl
> define(PSfilter, `filter
> /usr/share/printconf/util/mf_postscript_wrapper  --mfomatic -d
> bjc6000b1.upp-479986.foo')dnl
> define(PCLfilter, `cat')dnl
> define(PJLfilter, `cat')dnl
> define(DEFAULTfilter, `cat')dnl

> +++++++++++++++++++++++++++++++++++++++++++++++++++++

> And my /etc/samba/smb.conf file:

> [global]
> #    printer = lp
>      debug level = 1
>      writeable = Yes
>      dns proxy = No
>      security = share
>      encrypt passwords = yes
>      null passwords = yes
>      server string = Samba Server
>      workgroup = WORKGROUP
>      socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 comment
>      = Canon S450
>      guest ok = Yes
>      netbios name = LINUX800
>      log file = /var/log/samba/%m.log
>      preferred master = no

> [DriveH]
>      path = /private
>      comment = Linux 800
>      allow hosts = 192.168.1.

> [root]
>      path = /
>      comment = The whole Enchilada
>      allow hosts = 192.168.1.

> +++++++++++++++++++++++++++++++++++++++++++++++++++

> If anybody can 'splain this to me, and give me a clue as to what the
> heck is wrong with this picture, I'd sure be greatful.  And oh by the
> way, I can print to the printer in question from other windoze machines
> with no problem.  There is no password enabled on the printer share
> setup dialog.

>      Once again, thanks if you can help.

>      Jeff.

Given the information that you've posted, what happens when you type in
the following command?

echo 'testing' > ~/test.print

smbclient //MYSHAREHOST/MYPRINTER -c 'print test.print'

Andrew

 
 
 

Printing problem from Linux to Windoze...HELP PLS!

Post by Jeffrey S. Mullike » Sat, 09 Feb 2002 07:40:34


Andrew,

        I'm glad that you asked me to do that, because I think I discovered
something significant.  Here's the transcript of the output from running
the smbclient command to print the file I created called 'test.print'.
Note; I just hit enter at the password prompt, as my Win98 machine
doesn't have one configured on the share setup, and, nothing came out of
the printer when I issued the command.


-> ./test.print'
-> INFO: Debug class all level = 1   (pid 14161 from pid 14161)
-> added interface ip=192.168.1.12 bcast=192.168.1.255
-> nmask=255.255.255.0
-> Password:
-> putting file ./test.print as test.print-14161 (7.8 kb/s) (average 7.8
-> kb/s)

        But then, and I'm certain I'd looked at this before, but didn't see
anything, I went and looked at the /var/log/lpd/lp/status.lp file, and
found the following lines:

-> IF filter 'mf_wrapper' filter msg - 'foomatic-gswrapper: gs

-> '-sOutputFile=|cat >&3' '-' 3>&1 1>&2' at 2002-02-06-21:00:40.123

-> IF filter 'mf_wrapper' filter msg - 'Unable to open command line file
-> bjc6000a1.upp' at 2002-02-06-21:00:40.417

-> IF filter 'mf_wrapper' filter msg - 'tail process done writing data
-> to *main::STDOUT' at 2002-02-06-21:00:40.418

-> IF filter 'mf_wrapper' filter msg - 'Error closing pipe to gs

-> at /usr/sbin/lpdomatic line 422, <STDIN> line 284.' at
-> 2002-02-06-21:00:40.423

        Now, my printer is a Canon S450, and the setup for it in printconf-gui,
allows for two driver choices. 'bjc600a1.upp', and bjc6000b1.upp.  I
chose the 'b1' version.  I did a locate on my system for that file, and
sure enough, it ain't there.  I think that I've tried the 'a1' version
as well, with no better success, but I'm gonna try again.  If that is
the problem, I haven't got a clue how I lost it, nor where to get a
replacement.

        I'll keep the group posted on what I find, and would still appreciate
anyone's input.

        Thanks,

                        Jeff



>>Ok,
>>     I tried posting this in the Samba group, and got no response, so
>>I'll see if there are better brains here.

>>     I'm sure it's me, or something I've done, but ever since I upgraded
>>my RH 6.2 to 7.0, I have not been able to print to my Windoze printer. I
>>am not up to RH 7.2, and still no luck.

>>     I have beaten my head against this problem until, I'm sure that
>>I've  been blinded to what's wrong.

>>     I've got LPRng v. 3.7.4-28, and Samba 2.2.1a-4, which both came
>>     with

>>the RH7.2 upgrade I did recently.

>>     First, after trying to use printconf-gui, and Webmin, and reading
>>     as

>>much doc as I can find, I still can't determine for certain, whether a
>>share name referenced in the script.cfg file should use the '/' or the
>>'\'s.  Anyone...anyone..?

>>     Second, if I encant the following:

>>     # smbclient //MYSHAREHOST/MYPRINTER -I 192.168.1.11 -W WORKGROUP

>>...after the password prompt, I just hit enter, and I get the smb:>
>>prompt just fine.  But if I issue a: > print ./path/myfile.txt command,
>>still nothing prints.  So, here's my stuff:

>>+++++++++++++++++++++++++++++++++++
>>/etc/printcap:

>>lp:\
>>     :sh:\
>>     :ml=0:\
>>     :mx=0:\
>>     :sd=/var/spool/lpd/lp:\
>>     :af=/var/spool/lpd/lp/lp.acct:\
>>     :lp=|/usr/share/printconf/util/smbprint:\ :lpd_bounce=true:\
>>     :if=/usr/share/printconf/util/mf_wrapper:

>>+++++++++++++++++++++++++++++++++++++++
>>/usr/share/printconf/util/smbprint: (without the comments)

>>#!/bin/sh
>>config_file=script.cfg

>>eval `cat $config_file`

>>share=`echo $share | sed "s/[\]/\//g"`

>>if [ "$user" != "" ]; then
>>    usercmd="-U"
>>else
>>    usercmd=""
>>fi

>>if [ "$workgroup" != "" ]; then
>>    workgroupcmd="-W"
>>else
>>    workgroupcmd=""
>>fi

>>if [ "$translate" = "yes" ]; then
>>  command="translate ; print -"
>>else
>>  command="print -"
>>fi

>>#echo $share $password $translate $x_command > /tmp/smbprint.log

>>cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
>>      $hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \ -c
>>      "$command" 2>/dev/null
>>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>>/var/spool/lpd/lp/script.cfg

>>share='//MYSHAREHOST/MYPRINTER'
>>hostip='192.168.1.11'
>>user=''
>>password=''
>>workgroup='WORKGROUP'
>>translate='no'

>>++++++++++++++++++++++++++++++++++++++++++++++++
>>/var/spool/lpd/lp/mf.cfg

>># foomatic/magicfilter configuration
>># Make:        Canon
>># Model:    S450
>># Printer Id:    479986
>># Driver:    bjc6000b1.upp
>># TERMINATION=
>># FILTER_LOCALE=C

>>define(MAKE, `Canon')dnl
>>define(MODEL, `S450')dnl
>>define(COLOR, `true')dnl
>>define(PAGEsize, `Letter')dnl
>>define(TEXTfilter, pipe/postscript/ /usr/bin/mpage -b ifdef(`PAGEsize',
>>PAGEsize, Letter) -1 -o -P- -)dnl
>>define(PSfilter, `filter
>>/usr/share/printconf/util/mf_postscript_wrapper  --mfomatic -d
>>bjc6000b1.upp-479986.foo')dnl
>>define(PCLfilter, `cat')dnl
>>define(PJLfilter, `cat')dnl
>>define(DEFAULTfilter, `cat')dnl

>>+++++++++++++++++++++++++++++++++++++++++++++++++++++

>>And my /etc/samba/smb.conf file:

>>[global]
>>#    printer = lp
>>     debug level = 1
>>     writeable = Yes
>>     dns proxy = No
>>     security = share
>>     encrypt passwords = yes
>>     null passwords = yes
>>     server string = Samba Server
>>     workgroup = WORKGROUP
>>     socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 comment
>>     = Canon S450
>>     guest ok = Yes
>>     netbios name = LINUX800
>>     log file = /var/log/samba/%m.log
>>     preferred master = no

>>[DriveH]
>>     path = /private
>>     comment = Linux 800
>>     allow hosts = 192.168.1.

>>[root]
>>     path = /
>>     comment = The whole Enchilada
>>     allow hosts = 192.168.1.

>>+++++++++++++++++++++++++++++++++++++++++++++++++++

>>If anybody can 'splain this to me, and give me a clue as to what the
>>heck is wrong with this picture, I'd sure be greatful.  And oh by the
>>way, I can print to the printer in question from other windoze machines
>>with no problem.  There is no password enabled on the printer share
>>setup dialog.

>>     Once again, thanks if you can help.

>>     Jeff.

> Given the information that you've posted, what happens when you type in
> the following command?

> echo 'testing' > ~/test.print

> smbclient //MYSHAREHOST/MYPRINTER -c 'print test.print'

> Andrew

 
 
 

1. Handspring sync to Linux vs CLIE to Windoze -> Linux 1 Windoze 10

I've had a coworker load 1.5mb file onto his CLIE and according to him
it took 3-4 seconds over usb. It took over half a minute to load it on
my Visor. Usb on his windoze XP box just like usb on my RH machine also
predates 2.0

Is it a problem with pilot-xfer kernel 2.4.7-10 or what?
I don't think Visor is a nottleneck. Is it?
I run Palm OS 3.5.whatever he runs Palm OS 5.whatever

Why are transfers an order of magnitude slower in Linux?

2. SOCKS error GetDst

3. Pls. help with printing problem with lpd

4. auth in nested Location entries

5. New to printing on Linux..Pls help

6. Linux 2.5.6-dj2

7. Installing Windoze or linux first....<-reinstalling windoze

8. Anyone seen this error

9. HELP PRINTING -- HELP PRINTING -- HELP PRINTING

10. Windoze -> Linux LPD printing

11. -linux as file/print server for Windoze?

12. Printing from WinDoze -> Linux

13. Printing woes - pls. help