[samba] windows client use Linux printer

Joel Hammer Joel at HammersHome.com
Fri Feb 21 00:36:18 GMT 2003


Congratulations. Getting an understanding of printing problems, rather
than just blindly trying this or that printing software solution,
is really the way to go with printing.

I am not sure why you are just getting black and white printing. Is there a
configuration setting in the HP driver on the windows box that is set to B&W
only?  Can you print color from the linux server?

I have no good idea why the use of a postscript driver on the windows client
is not a universal solution for all windows clients. Maybe it is too
simple. Maybe they think they will get better results if they use the
driver supplied by the printer manufacturer. 

There is at least one problem if you use the lexmark windows driver and
send the jobs to the "raw" queue. My lexmarkz53 windows driver had an
option for two way communication with the printer. Such communication
is impossible with the samba server between you and the printer, and
printing won't work. You have to turn the two way communication option
off in the lexmark windows software. This minor item took me a LONG time
to figure out.

Joel



On Wed, Feb 19, 2003 at 05:45:45PM +0200, David Harel wrote:
> Hi and thanks Joel,
> 
> This information is priceless.
> I did what you recommended and got it printing. As I see the problem, 
> the most problematic part is to set the driver on the windows client 
> that will produce the desired postscript image. The printer you 
> recommended is not on the list as you typed it. I found the printer: "HP 
> Laser Jet III Postscript Plus v2010.118"  which works black and white 
> only. Now I am looking for a printer driver that will produce color images.
> As the role of the driver on the windows system is only to produce 
> postscript image I think samba documents should include a recommendation 
> for such a driver.
> 
> Joel Hammer wrote:
> 
> >This is always a tricky situation. There is nothing simple about printing.
> >It may look simple, but it is not.  So, to get it done, I keep it as
> >simple as possible.
> >
> >Basics:
> >The windows client transfers the job, prefiltered, to the spool directory
> >listed in the samba print share. Then, the command you have supplied in the
> >samba print share is invoked to print that file. The file name is %s.
> >Now, things are hard to follow when you get fancy and use (perhaps
> >unknowingly) a bunch of default settings which may not be what you need.
> >Attempting to load the drivers onto you samba server to allow easy
> >configuration on the windows clients is also another source of error.
> >
> >Now, a basic question is this: Can you print from the samba server directly
> >to your printer? lexmark does provide some nice drivers for their printers
> >for linux, but other drivers might be available. Anyway, if you have a
> >driver for your lexmark printer that works in linux, that means you can
> >convert postscript files to a format your printer understands. If so, you
> >can just use a generic postscript driver on your windows client. HP Laserjet
> >III + works fine for me. Then, direct your printjobs to the queue that does
> >all your other printing on the linux server, and the problem is solved.
> >
> >Here is what I have in my set up:
> >
> >This is /etc/printcap
> >
> >ps|z53:\
> >        sh:sd=/var/spool/lpd/z53:mx#0:\
> >        :lp=/dev/lp0:\
> >        :if=/usr/local/lexmark/z53/z53.sh  
> >        :mc#1
> >        :sh:
> >
> >lp|LP|z53-outfiles:\
> >	:sd=/var/spool/lpd/lp:\
> >	:mx#0:\
> >	:lp=/dev/lp0:\
> >	:sh:rw:
> >
> >The first handles postscript jobs, the second handles jobs that are
> >already filtered for this printer, ie, a raw queue. This raw queue is
> >there to print test pages from the linux server, too. If you filter
> >your jobs on your clients with the lexmark driver, you would use queue #2
> >(lp). If you send postscript jobs, you would use #1 (ps).  Notice there
> >is no "if" parameter in the raw queue.
> >
> >Here is my printer share definitions. I don't use the special printer share,
> >because I don't have dozens of printer to service, and I want to be sure I
> >know what samba is really trying to do.
> >smb.conf:
> >
> >[lp]
> >	comment = Raw Printer for Z53
> >	path = /tmp
> >	create mask = 0700
> >	guest ok = yes
> >	hosts allow = 192.168.
> >	printable = Yes
> >	printing = lprng
> > 	print command = echo %J %p %s  >>  /tmp/junkJ;\
> >                       a="`echo '%J' | sed "s/^.*- //"`" ;\
> >	               echo This is truncated $a >> /tmp/junkJ;\
> >                       /usr/bin/lpr -Plp  -J"$a"  %s;\
> >                       rm %s
> >	lpq command = /usr/bin/lpq -Plp
> >	lprm command = /usr/bin/lprm -Plp %j
> >	lppause command = /usr/sbin/lpc hold -Plp %j
> >	lpresume command = /usr/sbin/lpc release -Plp %j
> >	printer name = lp
> >	share modes = No
> >
> >[ps]
> >	comment = Filtered for Z53
> >	path = /tmp
> >	read only = No
> >	create mask = 0700
> >	guest ok = yes
> >	hosts allow = 192.168.
> >	printable = Yes
> >	printing = lprng
> > 	print command = echo %J %p %s  >>  /tmp/junkJ;\
> >                       a="`echo '%J' | sed "s/^.*- //"`" ;\
> >	               echo This is truncated $a >> /tmp/junkJ;\
> >                       /usr/bin/lpr -Pps  -J"$a"  %s;\
> >                       rm %s
> >	lpq command = /usr/bin/lpq -Pps
> >	lprm command = /usr/bin/lprm -Pps %j
> >	lppause command = /usr/sbin/lpc hold ps %j
> >	lpresume command = /usr/sbin/lpc release ps %j
> >	share modes = No
> >        use client driver = yes     
> >
> >Notice I state the printing system in each share, and explicitly
> >state all commands which might be encountered. (Samba uses BSD as
> >the default.) Actually, samba understands a few more commands than
> >this. strings `which smbd` | grep command is interesting.  When you
> >realize that you can customize each of these commands, things start
> >getting interesting. My print command is a bear, but it simply captures
> >the banner page title, which is the file name in windows, and removes
> >unnecessary garbage so your queue name looks nice (lpq) and is meaningful.
> >
> >Assuming that the ps queue can handle postscript files, if you just
> >configure the ps share here on your windows client with the HP postscript
> >driver, all should go well.
> >
> >Joel
> >
> >
> >On Tue, Feb 18, 2003 at 08:38:49PM +0200, David Harel wrote:
> >  
> >
> >>Hi,
> >>
> >>Well, my previous attempt to get info on that matter was lame and 
> >>therefore no one replied. Here is a second attempt.
> >>
> >>I need info about how to configure samba server and the windows (2000) 
> >>client to use a printer on the samba server machine.
> >>
> >>I read the article: 
> >>http://de.samba.org/samba/ftp/docs/htmldocs/Samba-HOWTO-Collection.html#AEN833
> >>but all I got from it was confusion. I need a simple step by step 
> >>explanation.
> >>
> >>By the way, you can review details of my attempt on the message I posted 
> >>a few days ago to this same list titled:
> >>[samba] Help request setting w2000 to use Lexmark z25 printer on Linux 
> >>RH7.3 running samba.
> >>
> >>-- 
> >>Thanks for your effort and good will.
> >>
> >>David Harel,
> >>
> >>==================================
> >>
> >>Home office +972 4 6921986
> >>Fax:        +972 4 6921986
> >>Cellular:   +972 54 534502
> >>Snail Mail: Amuka
> >>            D.N Merom Hagalil
> >>            13802
> >>            Israel
> >>Email:      harel at ergolight-sw.com
> >>
> >>
> >>
> >>-- 
> >>To unsubscribe from this list go to the following URL and read the
> >>instructions:  http://lists.samba.org/mailman/listinfo/samba
> >>    
> >>
> >
> >  
> >
> 
> 
> -- 
> Thanks.
> 
> David Harel,
> 
> ==================================
> 
> Home office +972 4 6921986
> Fax:        +972 4 6921986
> Cellular:   +972 54 534502
> Snail Mail: Amuka
>             D.N Merom Hagalil
>             13802
>             Israel
> Email:      harel at ergolight-sw.com
> 
> 
> 


More information about the samba mailing list