Printer settings and drivers from Samba server

Darrin M. Gorski dgorski at ford.com
Tue Nov 25 15:02:11 GMT 1997


I sent a patch to samba-bugs for this. You can use a printcap like this:

osgood|osgood|IBM 4019 E20 Clark (goblin Xstation)|driver=IBM 4019
LaserPrinter PS39:\

The string after driver= will be used as the 'printer driver'.

I'll dig it up and send it to you.


On Tue, 25 Nov 1997, Rick Cochran wrote:

> Luke,
> 
> One thought I have had on the printer driver issue is that it would be
> nice if pcap.c, et al, had some method of parsing the correct string
> for the 'printer driver' share parameter out of the Unix printcap
> file.
> 
>     printer driver = IBM 4019 LaserPrinter PS39
> 
> This would save having to maintain printer data in two places.  Our
> printcap entries look like this:
> 
> osgood|osgood|IBM 4019 E20 Clark (goblin Xstation), parallel:\
>         :lp=/dev/null:\
>         :sd=/usr/spool/lpd/osgood:\
>         :af=/usr/adm/osgood-acct:\
>         :lf=/usr/adm/osgood-errs:\
>         :mx#0:\
>         :if=/usr/local/lib/transcript/psif.goblin:\
>         :of=/usr/local/lib/transcript/psof:sb:\
>         :gf=/usr/local/lib/transcript/psgf:\
>         :tf=/usr/local/lib/transcript/pstf:\
>         :nf=/usr/local/lib/transcript/psnf:
> 
> Perhaps something like this would work:
> 
> osgood|osgood|IBM 4019 LaserPrinter PS39;E20 Clark (goblin Xstation), parallel:\
> 
> where the Samba printcap parser knows enough to use the first ';' delimited
> field of the 'comment' as the 'printer driver' share parameter.
> 
> The problem then becomes whether to include both fields in the
> 'comment' share parameter.  A long 'printer driver' name could push
> the 'comment' over the 32 character maximum, while having to repeat
> printer description data in the 'comment' field of the printcap entry
> could push a printcap line over the 80 character line limit (there are
> a lot of brain-dead lpd implementations).
> 
> Another possibility is to use the 'cm' parameter in printcap:
> 
>           cm  D   str  NULL        comment identifying printer (LPQ)
> 
> Just thinking out loud.
> 
> -Rick
> 
> -- 
> |Rick Cochran		  			      phone: 607-255-7223|
> |Cornell Materials Science Center			FAX: 607-255-3957|
> |E20 Clark Hall, Ithaca, N.Y. 14853	      email: rick at msc.cornell.edu|
> | "The Founding Fathers did not establish the United States as a	 |
> | democratic republic so that elected officials would decide trivia,	 |
> | while all great questions would be decided by the judiciary."		 |
> |					Judge Andrew Kleinfeld		 |
> 

                                [Darrin]

 "I have no special gift. I am only passionately curious."
				- A. Einstein

Darrin M. Gorski, Research Computer Systems Network Support
Scientific Research Laboratories, Ford Motor Company
Internet: dgorski at ford.com | Tel/Fax: +1 (313) 248-3753



More information about the samba mailing list