| 1 | A CUPS and eCS (OS/2) How To: Revision 1 14/08/2008 |
| 2 | |
| 3 | Author: Peter Brown |
| 4 | email: losepete@ntlworld.com |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | CONTENTS |
| 10 | |
| 11 | |
| 12 | Brief Preamble |
| 13 | |
| 14 | Why install CUPS? - and what is it? |
| 15 | |
| 16 | List of required software |
| 17 | |
| 18 | Brief description of the software packages |
| 19 | |
| 20 | Installation |
| 21 | |
| 22 | Configuration of CUPS Printer |
| 23 | |
| 24 | USB printers |
| 25 | |
| 26 | CUPS printer |
| 27 | |
| 28 | Creating a Desktop Printer Object to use with CUPS |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | Brief Preamble |
| 35 | ============== |
| 36 | |
| 37 | |
| 38 | Hopefully this text will provide a clear enough "How To" for anyone to be able to follow. |
| 39 | |
| 40 | I am using my experience of getting a Canon PIXMA iP4000 inkjet printer working with, firstly, CUPS and then creating an OS/2 Printer Object that is capable of outputting print jobs through CUPS. |
| 41 | |
| 42 | I do use specific Drive Letter(s) in the following text that would need to be changed to reflect the correct drive letter on other systems. Most of the Paths used are specific to the CUPS installation; those that are not would need to be changed for other systems. |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | Why install CUPS? - and what is it? |
| 48 | =================================== |
| 49 | |
| 50 | |
| 51 | Common Unix Printing System answers the "what is it?" bit. |
| 52 | |
| 53 | |
| 54 | Why install CUPS? - Simply because it is capable of supporting a lot of modern printers and is continually updated. The old OS/2 printer drivers are not that good, if you can find a driver that works, with modern raster printers and those drivers will not be updated. |
| 55 | |
| 56 | CUPS can provide drivers for more current printers - and should provide any extra capabilities missing from the OS/2 drivers. |
| 57 | |
| 58 | |
| 59 | The object of the exercise is to end up with an eCS(OS/2) postscript printer object that prints using CUPS. |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | List of required software |
| 65 | ========================= |
| 66 | |
| 67 | |
| 68 | CUPS port - http://download.smedley.info/cups-1.3.7-gplgs-8.62-gutenprint-5.2.0-beta3-os2-20080616.zip |
| 69 | |
| 70 | LibC files required - http://download.smedley.info/libc064x.zip |
| 71 | - ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip |
| 72 | |
| 73 | Gutenprint printer driver package http://download.smedley.info/gutenprt-5.2.0-beta3-os2-20080713.zip |
| 74 | |
| 75 | eCUPS printer port - http://download.smedley.info/cupsportdriver-20080628.zip |
| 76 | |
| 77 | PRNDRV.EXE - http://www.os2site.com/sw/comm/faxworks/prndrv.exe |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | Brief description of the software packages |
| 83 | ========================================== |
| 84 | |
| 85 | |
| 86 | CUPS consists of several packages that work together to provide postscript printing on raster printers |
| 87 | |
| 88 | The LibC files are required support files |
| 89 | |
| 90 | The Gutenprint package is a replacement for the OS/2 pscript.drv package and has most of the popular CUPS PPD (simplified) files already included |
| 91 | |
| 92 | The eCuPS printer port provides the "hook up" between the OS/2 Printer Object and the CUPS printer |
| 93 | |
| 94 | PRNDRV.EXE - a useful command line utility for listing installed printers and deleting those that are not wanted |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | Installation |
| 100 | ============ |
| 101 | |
| 102 | |
| 103 | Put the PRNDRV.EXE file somewhere that you can find it; I put it into J:\Programs\Utils\PrnDrv |
| 104 | |
| 105 | The libc0*.dll files should be put into either \ecs\dll or \os2\dll |
| 106 | |
| 107 | The basic CUPS Install consists of unzipping the package: |
| 108 | |
| 109 | The CUPS package MUST be unzipped to the ROOT of the drive, which should give you 3 new directories: \cups, \gutenprint and \gs |
| 110 | NOTE: the readme.os2 file will end up in the drive root directory unless unzipped seperately into the \cups directory - which is how I unzipped it. |
| 111 | |
| 112 | Have a read of the readme.os2 before proceeding just to get an idea of what you are going to do; especially if attempting to setup a USB printer. |
| 113 | |
| 114 | |
| 115 | Other files are unzipped later as/when/if they are required |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | Configuration of CUPS Printer |
| 121 | ============================= |
| 122 | |
| 123 | |
| 124 | |
| 125 | USB printers |
| 126 | ------------ |
| 127 | |
| 128 | |
| 129 | CUPS does not currently support printing to USB printers but there is a workaround. |
| 130 | |
| 131 | 1] Create a Printer object using the Null printer driver and select the USB port as the Output Port in the printer object Properties |
| 132 | |
| 133 | 2] Start the OS/2 lpd daemon (\tcpip\bin\lpd.exe) |
| 134 | |
| 135 | |
| 136 | When creating the CUPS printer in the below section (CUPS printer) use lpd://localhost/<printer_name> as the Device URI: where <printer_name> is the name given to the OS/2 Printer object created in 1] above. |
| 137 | |
| 138 | |
| 139 | |
| 140 | CUPS printer |
| 141 | ------------ |
| 142 | |
| 143 | Start \cups\sbin\cupsd.exe |
| 144 | |
| 145 | I created a program object for this with the Start Minimized and Close Window on exit checked in the Properties, Session tab. This object can be put in the Startup folder so that cupsd.exe is started automatically at bootup. |
| 146 | |
| 147 | |
| 148 | As the CUPS browser admin interface seems to be working here I recommend using that interface to Add a Printer. Fire up your browser and point it at http://localhost:631/ (cups home page) and when that has loaded click Add Printer. |
| 149 | |
| 150 | |
| 151 | I added the following Canon PIXMA P4000 colour inkjet (raster) printer and will be using this printer as the example. The text after the "-" is to outline the purpose |
| 152 | |
| 153 | Name: PIXMA - what you want to call the printer |
| 154 | |
| 155 | Location: Router LPT1 - where it is physically located; ie connected to the Router's LPT1 port |
| 156 | |
| 157 | Description: Canon PIXMA iP4000 Inkjet - brief description of printer |
| 158 | |
| 159 | Continue - click when happy with above section |
| 160 | |
| 161 | |
| 162 | Device: LPD/LPR Host or Printer - type of Device connection |
| 163 | |
| 164 | Continue - click when happy with above section |
| 165 | |
| 166 | |
| 167 | Device URI: lpd://192.168.2.1/lpt1 - address of device |
| 168 | |
| 169 | Continue - click when happy with above section |
| 170 | |
| 171 | |
| 172 | Make: Canon - select printer make |
| 173 | |
| 174 | Continue - click when happy with above section |
| 175 | |
| 176 | |
| 177 | Model: Canon PIXMA iP4000 - CUPS+Gutenprint v5.2.0-beta3(en) Simplified - select correct driver; Simplified recommended |
| 178 | |
| 179 | Add Printer - click when happy with above section |
| 180 | |
| 181 | |
| 182 | |
| 183 | After clicking Add Printer the interface informs me that the printer has been added and loads the options for the printer - this can take a little while. It is a good idea to have a look through and make sure the options look useable - especially Media Size, Resolution and Image Type. When satisfied click Set Printer Options and the interface reports "Printer PIXMA has been configured successfully." |
| 184 | |
| 185 | I then clicked on the Printers tab and then clicked the Print Test Page button. Shortly after the Test Page popped out of the printer looking fine. |
| 186 | |
| 187 | Well, that is the very easy bit finished... |
| 188 | |
| 189 | |
| 190 | |
| 191 | Referring to the readme.os2 file I used the command line to print a 2 page document; I opened a command line window in \cups\bin and gave it a try:- |
| 192 | |
| 193 | |
| 194 | [H:\cups\bin]lpr -P PIXMA \cups\share\cups\data\PReCS20.ps |
| 195 | |
| 196 | |
| 197 | After a short wait the printer burst into action and delivered 2 pages of output that look fine. |
| 198 | |
| 199 | |
| 200 | That is the next easy bit finished... |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | Creating a Desktop Printer Object to use with CUPS |
| 208 | ================================================== |
| 209 | |
| 210 | |
| 211 | Now to hook CUPS up to the rest of the system so that CUPS can be used for output by applications such as OpenOffice Writer (wordprocessor) and PMView (images). |
| 212 | |
| 213 | |
| 214 | Unzip cupsportdriver-20080628.zip |
| 215 | |
| 216 | cups.pdr into h:\os2\dll |
| 217 | |
| 218 | cupslpr.exe into h:\tcpip\bin |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | Right Mouse Button on the new Desktop Printer Object and select Properties |
| 224 | |
| 225 | Select Printer driver tab |
| 226 | Check the Default printer driver is correctly selected |
| 227 | Set Job Properties: Paper Size, Tray, Media Type, Resolution must match the settings in the CUPS printer - and Save |
| 228 | |
| 229 | Select Output port tab |
| 230 | Click Install new port button |
| 231 | Select the CUPS1 port and click Install |
| 232 | - if the port is not visible but the CUPS.pdr file is in \os2\dll Click New port drivers and set the |
| 233 | directory to \os2\dll and click Find. The CUPS ports should appear. |
| 234 | The settings for the CUPS port are |
| 235 | Host: localhost - or use 127.0.0.1 |
| 236 | Printer: PIXMA (this should be the same name as used for the CUPS printer) |
| 237 | |
| 238 | Close Printer Properties |
| 239 | |
| 240 | |
| 241 | That should be setup complete so time to print a test page |
| 242 | |
| 243 | Verify that cupsd.exe is running *Before* testing |
| 244 | |
| 245 | Drag'n'Drop \cups\share\cups\data\testprint.ps onto the new Desktop Printer Object |
| 246 | |
| 247 | Select Printer-specific in the following dialog |
| 248 | |
| 249 | |
| 250 | You should get the CUPS Test Page printed from your OS/2 Desktop Printer Object |
| 251 | |
| 252 | You can repeat the above test using the \cups\share\cups\data\PReCS20.ps file to test 2 page document printing. |
| 253 | |
| 254 | |
| 255 | Both tests were successful here. |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | An earlier version of the How To:- |