1!== 2!== PRINTER_DRIVER.txt for Samba release 2.0.10 23 Jun 2001 3!== 4========================================================================== 5 Supporting the famous PRINTER$ share 6 7 Jean-Francois.Micouleau@utc.fr, 10/26/97 8 modified by herb@sgi.com 1/2/98 9 10=========================================================================== 11 12Disclaimer: 13 14 This ONLY works with Windows 95 15 It does NOT work with Windows NT 4 16 17 18Goal: 19 20 When you click on a samba shared printer, you can now install the driver 21 automatically onto the Windows 95 machine, as you would from an NT server. 22 23How To: 24 25 It's a three step config. 26 27 First, create a new directory, where you will put the driver files, and 28 make a share in smb.conf pointing to it. 29 30 Example: 31 32 [printer$] 33 path=/usr/local/samba/printer 34 public=yes 35 browseable=yes 36 37 Second, you have to build the list of drivers required for a specific 38 printer. This is the most complicated thing to do. Get the files 39 'msprint.inf' and 'msprint2.inf' from Windows 95, the easiest way is to 40 grab them from a working Windows 95 computer. They are usually located 41 in 'c:\windows\inf'. Look in them for the printer you have. Run the new 42 program 'make_printerdef' with the file name and the printer name as 43 parameters. If you have drivers for an unsupported or updated printer, 44 first install these drivers on an Windows 95 system. There will be a 45 file created in your inf directory named 'oem?.inf' (where the ? is some 46 number). Use this file instead of msprint.inf. 47 48 Example: (from the /usr/local/samba/lib directory) 49 50 make_printerdef msprint.inf "Apple LaserWriter" >> printers.def 51 52 The program will print out a list of required files to stderr. 53 Copy all the files listed into the directory you created in step 1. 54 If you have "preserve case = yes" make sure your files names match 55 EXACTLY the names listed. 56 57 Third, you need to add 2 new parameters in smb.conf. One is in the 58 [global] section, called 'printer driver file' pointing to the printer 59 description file you just created, and the other in each printer share, 60 called 'printer driver location' pointing to where the client will get 61 the drivers. Don't forget to set correctly the printer driver parameter 62 to the Windows printer name. 63 64 Example: 65 66 [global] 67 printer driver file=/usr/local/samba/lib/printers.def 68 69 [lp] 70 comment = My old printer laser 71 browseable = yes 72 printable = yes 73 public = yes 74 create mode = 0700 75 printer driver=Apple LaserWriter 76 printer driver location=\\%h\PRINTER$ 77 78 %h will expand to the computer name, and PRINTER$ is the name of the 79 share created in step one. 80 81 82If it doesn't work for you, don't send flame ! It worked for me. In case of 83trouble don't hesitate to send me a mail with your smb.conf file and 84printers.def 85 86 87******* added by herb@sgi.com 88 89For those of you who like to know the details, and in case I have guessed 90wrong on some of the fields - The following is the format of the entries 91in the printers.def file: (entries are 1 single line - they are split here 92for readability) 93 94<Long Printer Name>:<Driver File Name>:<Data File Name>:<Help File Name>: 95<Language Monitor Name>:<Default Data Type>:<Comma Separated list of Files> 96 97The <Help File Name> and the <Language Monitor Name> can be empty. 98If no <Driver File Name> or <Data File Name> are specified in the inf file, 99these will default to the section name for the printer. 100 101The following is an excerpt from the MSPRINT2.INF file on a WIN95 machine. 102I have deleted all but the entries relating to installing a driver for the 103"QMS ColorScript 100 Model 30" printer. Using this "file" I'll try to 104explain how the printers.def file is created. 105 106make_printerdef is run with the first argument being the name of this 107file (MSPRINT2.INF in this case) and the second argument being the 108name of the printer ("QMS ColorScript 100 Model 30" in this case). 109 110The printer name is first found in the "Model section" to obtain the 111name of the "Installer Section" (this is the name after the equal sign). 112We ignore the alternate name. 113 114The "Installer Section" contains entries for "CopyFiles" and "DataSection". 115The "CopyFiles" line gives a list of all the required files for this 116printer. If the name begins with an @ it is the name of a file (after 117you strip off the @), otherwise it is the name of a "Copy Section" which 118in turn is a list of files required. This printer has one file listed 119"QCS30503.SPD" and two sections "COLOR_QMS_100_30" and "PSCRIPT". The 120"COLOR_QMS_100_30" section is listed in the "[DestinationDirs]" as 121having a value of 23. This means that all files listed in this section 122should go into the "color" subdirectory. The list of files to copy for 123this printer is thus: 124 125QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI, 126TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL 127 128From the "Data Section" we obtain values for "DriverFile", "HelpFile", 129and "LanguageMonitor". The % around the value for "LanguageMonitor" 130indicates that it is a string that can be localized so its actual value 131is obtained from the "[Strings]" section. The "Data Section" could also 132have contained an entry for "DefaultDataType". 133 134Using the information we have obtained we can now construct the entry 135for the printers.def file. 136 137<Long Printer Name> -> QMS ColorScript 100 Model 30 (name given 138 on the command line) 139<Driver File Name> -> PSCRIPT.DRV (given in Data Section) 140<Data File Name> -> QCS30503.SPD (defaults to Install Section name) 141<Help File Name> -> PSCRIPT.HLP (given in Data Section) 142<Language Monitor Name> -> PostScript Language Monitor (given in Data Section) 143<Default Data Type> -> RAW (default if not specified) 144 145 146So.... the enty (actually one line but split here for readability) would 147be: 148 149QMS ColorScript 100 Model 30:PSCRIPT.DRV:QCS30503.SPD: 150PSCRIPT.HLP:PostScript Language Monitor:RAW: 151QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI, 152TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL 153 154---------------------- Info from MSPRINT2.INF ------------------------ 155; 156; The Manufacturer section lists all of the manufacturers that we will 157; display in the Dialog box 158 159[Manufacturer] 160"QMS" 161 162 163; 164; Model sections. Each section here corresponds with an entry listed in the 165; [Manufacturer] section, above. The models will be displayed in the order 166; that they appear in the INF file. 167; 168; Each model lists a variation of its own name as a compatible ID. This 169; is done primarily as an optimization during upgrade. 170; 171[QMS] 172"QMS ColorScript 100 Model 30" = QCS30503.SPD,QMS_ColorScript_100_Model_30 173 174 175; 176; Installer Sections 177; 178; These sections control file installation, and reference all files that 179; need to be copied. The section name will be assumed to be the driver 180; file, unless there is an explicit DriverFile section listed. 181; 182[QCS30503.SPD] 183CopyFiles=@QCS30503.SPD,COLOR_QMS_100_30,PSCRIPT 184DataSection=PSCRIPT_DATA 185 186; Copy Sections 187; 188; Lists of files that are actually copied. These sections are referenced 189; from the installer sections, above. Only create a section if it contains 190; two or more files (if we only copy a single file, identify it in the 191; installer section, using the @filename notation) or if it's a color 192; profile (since the DestinationDirs can only handle sections, and not 193; individual files). 194; 195[COLOR_QMS_100_30] 196QMS10030.ICM 197 198[PSCRIPT] 199PSCRIPT.DRV 200PSCRIPT.HLP 201PSCRIPT.INI 202TESTPS.TXT 203APPLE380.SPD 204FONTS.MFM 205ICONLIB.DLL 206PSMON.DLL 207 208 209; 210; Data Sections 211; 212; These sections contain data that is shared between devices. 213; 214[PSCRIPT_DATA] 215DriverFile=PSCRIPT.DRV 216HelpFile=PSCRIPT.HLP 217LanguageMonitor=%PS_MONITOR% 218 219 220; 221; Color profiles go to the colors directory. All other files go to the 222; system directory 223; 224 225[DestinationDirs] 226DefaultDestDir=11 227COLOR_QMS_100_30=23 228COLOR_TEKTRONIX_200I=23 229COLOR_TEKTRONIX_III_PXI=23 230 231 232; 233; Localizable Strings 234; 235[Strings] 236MS="Microsoft" 237PS_MONITOR="PostScript Language Monitor,PSMON.DLL" 238 239