[Samba] windows print migrator + "add printer command"
mz at seh.de
Thu Jan 12 14:02:25 GMT 2006
Geoffrey Scott wrote:
> Hi all.
> I was wondering if anyone had a successful exampel of using the "add
> printer command" with cups so that the windows print migrator could be
> utilised. Seeing as Jerry as spent time on this it would be a shame not to
> know how to use it. ;-)
> I'm guessing that it would be along the lines of:
> add printer command = lpadmin option1 option2 && cupsaddsmb option1
Should really be that easy :-)
> but am currently unsure how to proceed. Can someone hit me with a clue by
> cheers geoff
I have 2 reasons why I'm not using a simple script like the above for years:
1st, the add_printer_hook is called by a "update_printer" function.
This function is called really frequently.
Using an add printer command and not commenting this line out of the
samba code slowed down everything in a massive way.
2nd, (and the true reason) - the add printer command is not really
functional without port handling.
E.g. CUPS wants a device uri like "socket://192.168.3.100:9100" to know
the destination of the printjob.
You could use the "location" or "description" in the add printer wizard
as a workaround. But that's not really a nice way.
So to make your "lpadmin option1 ..." line really functional, you'll
also need an "enumports comand" and the ability to create new ports and
keep them in sync with the cups printers.
Martin Zielinski mz at seh.de
SEH Computertechnik GmbH www.seh.de
More information about the samba