2 !== PRINTER_DRIVER.txt for Samba release TNG-prealpha 11 Feb 2000
4 ==========================================================================
5 Supporting the famous PRINTER$ share
7 Jean-Francois.Micouleau@utc.fr, 10/26/97
8 modified by herb@sgi.com 1/2/98
10 ===========================================================================
14 This ONLY works with Windows 95
15 It does NOT work with Windows NT 4
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.
25 It's a three step config.
27 First, create a new directory, where you will put the driver files, and
28 make a share in smb.conf pointing to it.
33 path=/usr/local/samba/printer
38 Second, you have to build the list of drivers required for a specific
39 printer. This is the most complicated thing to do. Get the files
40 'msprint.inf' and 'msprint2.inf' from Windows 95, the easiest way is to
41 grab them from a working Windows 95 computer. They are usually located
42 in 'c:\windows\inf'. Look in them for the printer you have. Run the new
43 program 'make_printerdef' with the file name and the printer name as
44 parameters. If you have drivers for an unsupported or updated printer,
45 first install these drivers on an Windows 95 system. There will be a
46 file created in your inf directory named 'oem?.inf' (where the ? is some
47 number). Use this file instead of msprint.inf.
49 Example: (from the /usr/local/samba/lib directory)
51 make_printerdef msprint.inf "Apple LaserWriter" >> printers.def
53 The program will print out a list of required files to stderr.
54 Copy all the files listed into the directory you created in step 1.
55 If you have "preserve case = yes" make sure your files names match
56 EXACTLY the names listed.
58 Third, you need to add 2 new parameters in smb.conf. One is in the
59 [global] section, called 'printer driver file' pointing to the printer
60 description file you just created, and the other in each printer share,
61 called 'printer driver location' pointing to where the client will get
62 the drivers. Don't forget to set correctly the printer driver parameter
63 to the Windows printer name.
68 printer driver file=/usr/local/samba/lib/printers.def
71 comment = My old printer laser
77 printer driver=Apple LaserWriter
78 printer driver location=\\%h\PRINTER$
80 %h will expand to the computer name, and PRINTER$ is the name of the
81 share created in step one.
84 If it doesn't work for you, don't send flame ! It worked for me. In case of
85 trouble don't hesitate to send me a mail with your smb.conf file and
89 ******* added by herb@sgi.com
91 For those of you who like to know the details, and in case I have guessed
92 wrong on some of the fields - The following is the format of the entries
93 in the printers.def file: (entries are 1 single line - they are split here
96 <Long Printer Name>:<Driver File Name>:<Data File Name>:<Help File Name>:
97 <Language Monitor Name>:<Default Data Type>:<Comma Separated list of Files>
99 The <Help File Name> and the <Language Monitor Name> can be empty.
100 If no <Driver File Name> or <Data File Name> are specified in the inf file,
101 these will default to the section name for the printer.
103 The following is an excerpt from the MSPRINT2.INF file on a WIN95 machine.
104 I have deleted all but the entries relating to installing a driver for the
105 "QMS ColorScript 100 Model 30" printer. Using this "file" I'll try to
106 explain how the printers.def file is created.
108 make_printerdef is run with the first argument being the name of this
109 file (MSPRINT2.INF in this case) and the second argument being the
110 name of the printer ("QMS ColorScript 100 Model 30" in this case).
112 The printer name is first found in the "Model section" to obtain the
113 name of the "Installer Section" (this is the name after the equal sign).
114 We ignore the alternate name.
116 The "Installer Section" contains entries for "CopyFiles" and "DataSection".
117 The "CopyFiles" line gives a list of all the required files for this
118 printer. If the name begins with an @ it is the name of a file (after
119 you strip off the @), otherwise it is the name of a "Copy Section" which
120 in turn is a list of files required. This printer has one file listed
121 "QCS30503.SPD" and two sections "COLOR_QMS_100_30" and "PSCRIPT". The
122 "COLOR_QMS_100_30" section is listed in the "[DestinationDirs]" as
123 having a value of 23. This means that all files listed in this section
124 should go into the "color" subdirectory. The list of files to copy for
125 this printer is thus:
127 QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI,
128 TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL
130 From the "Data Section" we obtain values for "DriverFile", "HelpFile",
131 and "LanguageMonitor". The % around the value for "LanguageMonitor"
132 indicates that it is a string that can be localized so its actual value
133 is obtained from the "[Strings]" section. The "Data Section" could also
134 have contained an entry for "DefaultDataType".
136 Using the information we have obtained we can now construct the entry
137 for the printers.def file.
139 <Long Printer Name> -> QMS ColorScript 100 Model 30 (name given
141 <Driver File Name> -> PSCRIPT.DRV (given in Data Section)
142 <Data File Name> -> QCS30503.SPD (defaults to Install Section name)
143 <Help File Name> -> PSCRIPT.HLP (given in Data Section)
144 <Language Monitor Name> -> PostScript Language Monitor (given in Data Section)
145 <Default Data Type> -> RAW (default if not specified)
148 So.... the enty (actually one line but split here for readability) would
151 QMS ColorScript 100 Model 30:PSCRIPT.DRV:QCS30503.SPD:
152 PSCRIPT.HLP:PostScript Language Monitor:RAW:
153 QCS30503.SPD,color\QMS10030.ICM,PSCRIPT.DRV,PSCRIPT.HLP,PSCRIPT.INI,
154 TESTPS.TXT,APPLE380.SPD,FONTS.MFM,ICONLIB.DLL,PSMON.DLL
156 ---------------------- Info from MSPRINT2.INF ------------------------
158 ; The Manufacturer section lists all of the manufacturers that we will
159 ; display in the Dialog box
166 ; Model sections. Each section here corresponds with an entry listed in the
167 ; [Manufacturer] section, above. The models will be displayed in the order
168 ; that they appear in the INF file.
170 ; Each model lists a variation of its own name as a compatible ID. This
171 ; is done primarily as an optimization during upgrade.
174 "QMS ColorScript 100 Model 30" = QCS30503.SPD,QMS_ColorScript_100_Model_30
180 ; These sections control file installation, and reference all files that
181 ; need to be copied. The section name will be assumed to be the driver
182 ; file, unless there is an explicit DriverFile section listed.
185 CopyFiles=@QCS30503.SPD,COLOR_QMS_100_30,PSCRIPT
186 DataSection=PSCRIPT_DATA
190 ; Lists of files that are actually copied. These sections are referenced
191 ; from the installer sections, above. Only create a section if it contains
192 ; two or more files (if we only copy a single file, identify it in the
193 ; installer section, using the @filename notation) or if it's a color
194 ; profile (since the DestinationDirs can only handle sections, and not
214 ; These sections contain data that is shared between devices.
217 DriverFile=PSCRIPT.DRV
219 LanguageMonitor=%PS_MONITOR%
223 ; Color profiles go to the colors directory. All other files go to the
230 COLOR_TEKTRONIX_200I=23
231 COLOR_TEKTRONIX_III_PXI=23
235 ; Localizable Strings
239 PS_MONITOR="PostScript Language Monitor,PSMON.DLL"