Hello! I?ve got trouble to print via Samba. But read to the end to understand: My printer (a Canon BJC 620) is connected to a Win98 box. Its network name is canon. The /etc/printcap entry is: ---/etc/printcap--- lp|smb|canon:\ :cm=unser Drucker:\ :sd=/var/spool/lpd/smb:\ :af=/var/spool/lpd/smb/acct:\ :if=/usr/local/samba/bin/smbprint:\ :mx=0:\ :lp=/dev/null: ---/etc/printcap--- I?m using the standard /etc/smb.conf printer settings as the follow: ---/etc/smb.conf--- [global] printing = BSD printcap name = /etc/printcap load printers = yes workgroup = WOHER interfaces = eth* map to guest = Bad User keepalive = 30 logon script = %U.bat domain logons = Yes os level = 2 domain master = True kernel oplocks = No [printers] path = /tmp comment = All Printers printable = yes create mask = 0700 ---/etc/smb.conf--- Now I can print text files from the Linuxbox to win98. This works fine BUT that?s not, what I want to archieve. I?ve got a 2nd Win98 box that is supposed to use this printer via Samba (the Win98 boxes work on different times). So Samba?s job is to spool the printing job. I can see the printer in the "Neighbourhood", I can install it and it also starts to print the first 2 lines, but no more. It just stopps. Do you have any idea, what can be changed to make it usable. The orig. Printertool cannot be used, it?s looking for a second share "wps", but copying the files doesnt work. Also printer drivers without this tool dont help. Thanks for any idea. Bye. Stefan
I assume that the printer is not a postscript printer. Do you realize that you will need (usually) two queues on your samba server? One will be a queue which will filter the print job (the jobs sent directly from the samba server in postscript) and a second queue which will simply passthrough the print job to the windows printer share. If you have a queue with a good filter which handles postscript files (originating from your samba server) for your printer, you can use that queue for all your printing. You could install a postscript driver on your windows boxes (HP laserjet3 plus seems to work fine) and send these postscript formatted jobs to the same queue as you use for jobs originating on the samba server. I know all this stuff because I have never had success using those GUI printer installation programs. Joel On Sat, May 11, 2002 at 01:24:48PM +0200, Stefan Schilling wrote:> Hello! > > I?ve got trouble to print via Samba. But read to the end to > understand: > My printer (a Canon BJC 620) is connected to a Win98 box. Its > network name is canon. The /etc/printcap entry is: > > ---/etc/printcap--- > > lp|smb|canon:\ > :cm=unser Drucker:\ > :sd=/var/spool/lpd/smb:\ > :af=/var/spool/lpd/smb/acct:\ > :if=/usr/local/samba/bin/smbprint:\ > :mx=0:\ > :lp=/dev/null: > > ---/etc/printcap--- > > I?m using the standard /etc/smb.conf printer settings as the > follow: > > ---/etc/smb.conf--- > [global] > printing = BSD > printcap name = /etc/printcap > load printers = yes > workgroup = WOHER > interfaces = eth* > map to guest = Bad User > keepalive = 30 > logon script = %U.bat > domain logons = Yes > os level = 2 > domain master = True > kernel oplocks = No > > [printers] > path = /tmp > comment = All Printers > printable = yes > create mask = 0700 > ---/etc/smb.conf--- > > Now I can print text files from the Linuxbox to win98. This works > fine BUT that?s not, what I want to archieve. I?ve got a 2nd > Win98 box that is supposed to use this printer via Samba (the > Win98 boxes work on different times). So Samba?s job is to spool > the printing job. > I can see the printer in the "Neighbourhood", I can install it > and it also starts to print the first 2 lines, but no more. It > just stopps. Do you have any idea, what can be changed to make it > usable. The orig. Printertool cannot be used, it?s looking for a > second share "wps", but copying the files doesnt work. Also > printer drivers without this tool dont help. > > Thanks for any idea. > > Bye. Stefan > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Guten Tag Joel Hammer, Am Samstag, 11. Mai 2002 um 13:53 schrieb Joel Hammer:> I assume that the printer is not a postscript printer.> Do you realize that you will need (usually) two queues on your samba > server? One will be a queue which will filter the print job (the jobs > sent directly from the samba server in postscript) and a second queue which will simply > passthrough the print job to the windows printer share.> If you have a queue with a good filter which handles postscript files > (originating from your samba server) for your printer, you can use that > queue for all your printing. You could install a postscript driver on your > windows boxes (HP laserjet3 plus seems to work fine) and send these postscript > formatted jobs to the same queue as you use for jobs originating on the > samba server.> I know all this stuff because I have never had success using those > GUI printer installation programs.> JoelHi! Thanks for this suggestion! But I wanted to let the sending Win98 box prepare the data to be printed. If that?s too complicated: all right: how can I do this? Thanks, Stefan> On Sat, May 11, 2002 at 01:24:48PM +0200, Stefan Schilling wrote: >> Hello! >> >> I?ve got trouble to print via Samba. But read to the end to >> understand: >> My printer (a Canon BJC 620) is connected to a Win98 box. Its >> network name is canon. The /etc/printcap entry is: >> >> ---/etc/printcap--- >> >> lp|smb|canon:\ >> :cm=unser Drucker:\ >> :sd=/var/spool/lpd/smb:\ >> :af=/var/spool/lpd/smb/acct:\ >> :if=/usr/local/samba/bin/smbprint:\ >> :mx=0:\ >> :lp=/dev/null: >> >> ---/etc/printcap--- >> >> I?m using the standard /etc/smb.conf printer settings as the >> follow: >> >> ---/etc/smb.conf--- >> [global] >> printing = BSD >> printcap name = /etc/printcap >> load printers = yes >> workgroup = WOHER >> interfaces = eth* >> map to guest = Bad User >> keepalive = 30 >> logon script = %U.bat >> domain logons = Yes >> os level = 2 >> domain master = True >> kernel oplocks = No >> >> [printers] >> path = /tmp >> comment = All Printers >> printable = yes >> create mask = 0700 >> ---/etc/smb.conf--- >> >> Now I can print text files from the Linuxbox to win98. This works >> fine BUT that?s not, what I want to archieve. I?ve got a 2nd >> Win98 box that is supposed to use this printer via Samba (the >> Win98 boxes work on different times). So Samba?s job is to spool >> the printing job. >> I can see the printer in the "Neighbourhood", I can install it >> and it also starts to print the first 2 lines, but no more. It >> just stopps. Do you have any idea, what can be changed to make it >> usable. The orig. Printertool cannot be used, it?s looking for a >> second share "wps", but copying the files doesnt work. Also >> printer drivers without this tool dont help. >> >> Thanks for any idea. >> >> Bye. Stefan
When you say you tried it and it doesn't work, what exactly did you do? Show me your /etc/printcap, your filter file, tell me what happened when you tried to print, what is in status.winlp or whatever. And, you did run checkpc -f and stopped and started lpd? Are you getting unformatted garbage on the printer? Joel On Sun, May 12, 2002 at 01:30:09AM +0200, Stefan Schilling wrote:> Hi! > > I?ve tried it, but it doesnt work... > > What may be wrong? > > Stefan > > > Am Samstag, 11. Mai 2002 um 17:32 schrieb Joel Hammer: > > > Sorry about the long delay. I was having trouble getting my filter to do > > anything. Finally hacked it. > > > I can't give you an exact solution, since I am not currently letting my > > printer hang off a windows box. It attaches to my linux box. However, I do > > have my samba server doing more or less the same thing as a windows server. > > > Here is the sort of thing you need. First, you need a queue on your > > linux box to accept jobs from the windows box. I can't give you the book > > solution, since I am not using the book. > > > First, in your printcap, something like this: > > winlp:\ > > :sd=/var/spool/lpd/winlp\ > > :if=/var/spool/lpd/winlp/filter\ > > :lp=/dev/null:\ > > :sh:mx#0 > > > Run checkpc -f and /etc/rc.d/init.d/lpd stop and start after you change > > /etc/printcap. > > > The filter won't have to to be much, since it will just be the command to > > send the file to your windows box with the printer. > > > The command: > > cat PrintFile | smbclient //windowsserver/printer -c "print -" > > works fine from the command line but I cannot get it to work from within my > > filter, so, here is a print filter that works: > > > #!/bin/bash > cat - >> output > > /usr/bin/smbclient //windowsserver/printer -N -c "print output" > > > Put this into your spool directory, chmod +x filter. > > You might want to run checkpc -f, but that isn't necessary I think. > > > This takes a file you have already formatted for your printer and sends > > it to the windows server, avoiding password prompts. You can embellish > > this filter, a lot. I would put in rm output just to avoid problems. > > > If you want to learn about print filters, I have attached a postscript file > > for your perusual which I think is a fine introduction. > > > I would also study smbprint, supplied with your distro, likely. When you > > figure out the print command in it, please tell me how it works. > > > Joel > > > >> Guten Tag Joel Hammer, > >> > >> Am Samstag, 11. Mai 2002 um 13:53 schrieb Joel Hammer: > >> > >> > I assume that the printer is not a postscript printer. > >> > >> > Do you realize that you will need (usually) two queues on your samba > >> > server? One will be a queue which will filter the print job (the jobs > >> > sent directly from the samba server in postscript) and a second queue which will simply > >> > passthrough the print job to the windows printer share. > >> > >> > If you have a queue with a good filter which handles postscript files > >> > (originating from your samba server) for your printer, you can use that > >> > queue for all your printing. You could install a postscript driver on your > >> > windows boxes (HP laserjet3 plus seems to work fine) and send these postscript > >> > formatted jobs to the same queue as you use for jobs originating on the > >> > samba server. > >> > >> > I know all this stuff because I have never had success using those > >> > GUI printer installation programs. > >> > >> > Joel > >> > >> Hi! > >> > >> Thanks for this suggestion! But I wanted to let the sending Win98 > >> box prepare the data to be printed. If that?s too complicated: > >> all right: how can I do this?