smbprint.exe - Samba Print Command for OS/2 =========================================== CONTENTS: A. Introduction B. Installation C. Limitations, To-Do list D. FAQ E. Author A. Introduction: The Samba Server requires an external print command script or program to pick up the spoolfile, send it to the printer and remove it afterwards. This is what smbprint.exe does. It acts as a bridge between Samba and OS/2's current printer subsystem. B. Installation: 1. Put smbprint.exe into the Samba directory (the one where smbd.exe resides). 2. Make sure you have VROBJ.DLL somewhere in your LIBPATH (should be there anyway, as it comes with all recent OS/2 and eCS versions. 3. Add the following lines to the [global] section of smb.conf: printing = bsd 4. Add a printer section to smb.conf: Example: -------------------------------------------------------------- ;Name of the printer share [stylus] ; Make sure this directory exists! path = x:/samba/var/spool/stylus create mask = 0700 printable = Yes ; Do not change this line except the path to smbprint.exe! ; smbprint.exe requires the parameters exactly in that order! ; The "print command" may be added either separately for each ; printer or in the [global] section. In this case is is used ; for every printer print command = x:/samba/smbprint.exe "%s" "%p" "%J" "%c" "%z" ; Set the OS/2 printer queue (shown as "physical name" on the ; first notebook page of a printer object) as the printer name. ; This is required by smbprint.exe in order to know to which OS/2 ; printer a file should be printed. printer name = OMNIStyl -------------------------------------------------------------- 5. Install the appropriate driver on the client. 6. You are done. C. Limitations, To-Do list: - smbprint should remember its position - smbprint should be configurable to run optionally invisibly - smbprint should have configurable fonts, colours etc. - smbprint should have a wizard-like mode to add printers to smb.conf (This functionality has gone into the Small Samba Config Center (SSCC)). D. FAQ: 1. Q: Why this? A 'print command = PRINT.EXE /D:LPT1 /B %s' should be sufficient. A: No, not at all. The spool files will not be removed and you only can print to printers connected to LPTx, COMx but not to all others. By using smbprint.exe you can print to ANY printer KNOWN to OS/2, regardless how it is connected to your machine and the spoolfile will be removed after printing. In addition the print job shows up with the appropriate title in the OS/2 printer objects. 2. Q: I have CUPS - do I still need this utility? A: Depends. In case you have installed and working CUPS, you do not need this utility. In case the "normal" OS/2 printer subsystem, is sufficient for you, you need smbprint.exe E. Author: Herwig Bauernfeind, bww bitwiseworks GmbH. mailto:herwig.bauernfeind@bitwiseworks.com