Changes between Version 36 and Version 37 of HowTo


Ignore:
Timestamp:
Dec 17, 2011, 2:36:58 AM (12 years ago)
Author:
Alex Taylor
Comment:

Near-total rewrite (using embedded HTML) with new screenshots and lots of new information

Legend:

Unmodified
Added
Removed
Modified
  • HowTo

    v36 v37  
    1 = A CUPS and eCS (OS/2) How To =
    2 
    3 
    4 Author: Peter Brown[[BR]]
    5 email: losepete@ntlworld.com[[BR]]
    6 
    7 ||Revision 1||14/08/2008||Peter Brown||
    8 ||Revisions to filenames||29/12/2008||Paul Smedley||
    9 ||Revisions to USB section||29/03/2009||Paul Smedley||
    10 ||Revisions to the list of required software and brief description of software sections||11/04/2009||Ed Durrant||
    11 ||Additional details about using USB interface and visual instructions around set up of CUPS web admin printer install||12/04/2009||Ed Durrant||
    12 ||Additional visual instructions around set up of OS/2 printer object to use CUPS attached printer||13/04/2009||Ed Durrant||
    13 ||Changes to the desktop printer object setup based on the later versions of the files for clarification||10/07/2009||Ed Durrant||
    14 ||Various formatting improvements and clarifications||2010-11-08||Alex Taylor||
    15 ||Formatting improvements and clarifications, continued||2010-12-11||Alex Taylor||
    16 ||Added warning about the (hard-learned) pitfalls of {{{prndrv -d}}}||2011-02-17||Alex Taylor||
    17 
    18 [[BR]]
    19 [[BR]]
    20 
    21 
    22 
    23 
    24 
    25 
    26  
    27 
    28 == CONTENTS ==
    29 
    30 '''[#preamble Brief Preamble]'''
    31 
    32 '''[#whycups Why install CUPS? - and what is it?]'''
    33 
    34 '''[#requirements List of required software]'''
    35 
    36 '''[#packages Brief description of the software packages]'''
    37 
    38 '''[#installation Installation]'''
    39 
    40     '''[#configuration Configuration of CUPS Printer]'''
    41 
    42     '''[#parallel Local printers - Parallel attached]'''
    43 
    44     '''[#usb Local printers - USB attached]'''
    45 
    46     '''[#cupsprinter CUPS printer install - Network attached and USB attached]'''
    47 
    48         '''[#visual Step by step visual CUPS printer setup in web admin program (USB or Network connected)]'''
    49 
    50     '''[#object Creating a Desktop Printer Object to use with CUPS]'''
    51 
    52         '''[#obj_visual Step by step visual OS2 printer object setup for a CUPS attached printer]'''
    53 
    54 [[BR]]
    55 [[BR]]
    56 
    57 
    58 [=#preamble]
    59 == Brief Preamble ==
    60 
    61 
    62 Hopefully this text will provide a clear enough "How To" for anyone to be able to follow.
    63 
    64 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.
    65 
    66 I do use specific Drive Letter(s) in the following text that may need to be changed to reflect the correct drive letter on your systems. Most of the Paths used are specific to the CUPS installation; those that are not may need to be changed for your systems.
    67 [[BR]]
    68 [[BR]]
    69 
    70 
    71 [=#whycups]
    72 == Why install CUPS? - and what is it? ==
    73 
    74 
    75 [http://www.cups.org/ Common Unix Printing System] answers the "what is it?" bit.  It's a generic framework for printer driver packages.  You install CUPS plus a driver package that supports your printer, and if all goes well you can print. :-)  See the CupsFaq for more information on how it works specifically.
    76 
    77 '''What does it support?''' - Support for actual printers is handled by the individual driver packages. 
    78  * List of supported printers under Gutenprint: http://gutenprint.sourceforge.net/p_Supported_Printers.php  (Gutenprint is the biggest and most commonly-used driver package)
    79  * List of supported printers under Splix: http://splix.ap2c.org/  (Splix supports some Samsung and Xerox printers)
    80  * List of supported printers under HPLIP: http://hplipopensource.com/hplip-web/supported_devices/index.html  (HPLIP supports various Hewlett-Packard printers)
    81 
    82 '''Why install CUPS?''' - Simply because it is capable of supporting a lot of modern printers and is being continually updated to support more. The old OS/2 printer drivers are not that good with new printers. If you are lucky enough to find a driver that works with your modern printer, those drivers will not be updated to take advantage of all the features whereas the CUPS driver will.
    83 
    84 CUPS can provide drivers for more current printers - and should provide many extra capabilities missing from the OS/2 drivers.
    85 
    86 It basically works by tricking the OS & applications into thinking that the printer is a !PostScript printer, even if it isn't.  !PostScript is a well-supported, standardized printer language; the object of the exercise is to end up with an eCS(OS/2) !PostScript printer object that prints using CUPS.
    87 [[BR]]
    88 [[BR]]
    89 
    90 
    91 [=#requirements]
    92 == List of required software ==
    93 
    94 The CUPS port is available at http://svn.netlabs.org/ecups/wiki/CupsPort - you can download in WPI format (all packages) or as individual ZIP files.  If you download the individual files, remember that you need the following packages.
    95 
    96 '''Always required:'''
    97 
    98  * CUPS OS/2 binary
    99 
    100  * !GhostScript OS/2 binary
    101 
    102  * At least one of the following driver packages (choose the one which supports your printer):
    103   * Gutenprint (many printers)
    104   * Splix (!Samsung/Xerox printers) - also requires custom GCC runtime: http://smedley.info/gcc432.zip
    105   * HPLIP
    106 
    107  * eCups port driver (CUPS.PDR)
    108 
    109  * eCups print driver (ECUPS.DRV), CUPS-specific !PostScript printer driver
    110 
    111  * Libc files required for CUPS - ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip (you may have these already, especially if you are running eComStation)
    112 
    113 '''May be required'''
    114 
    115  * USB helper driver (required for USB printing only) - http://en.ecomstation.ru/projects/usbtools/download/usbcalls-20060807.zip (again, you may have this already if you use a recent version of eCS)
    116 
    117  * PRNDRV.EXE (this is a program that will "clean up" printer entries in the INI files) - http://www.os2site.com/sw/comm/faxworks/prndrv.exe
    118 
    119  * ~~USB backend (if you are intending to use a USB connected printer)~~ - http://download.smedley.info/cups-usb-backend-20090309.zip
    120    (''Note:'' This is only required for older versions of CUPS.  The latest (1.4.4 and up) releases of the CUPS zip file include the USB backend, so this download is not needed.  However the tests here were performed when that was not the case, so I have left this link in for reference in any case). 
    121 
    122 These are described in more detail below.
    123 
    124 [[BR]]
    125 [[BR]]
    126 
    127 
    128 
    129 [=#packages]
    130 == Brief description of the software packages ==
    131 
    132 CUPS consists of several packages that work together to provide emulated !PostScript printing on raster printers.  The core components on all platforms are the CUPS daemon, !GhostScript, and the driver packages (Gutenprint, Splix, HPLIP etc.).
    133 
    134 The remaining packages are specific to the OS/2 port (a.k.a. eCups):
    135 
    136  * The Libc and GCC files are required support files (the GCC runtime is required by Splix).
    137 
    138  * PRNDRV.EXE - a useful command line utility for listing installed printers and deleting those that are no longer wanted.  ('''Note:''' Be careful when using '{{{prndrv -d}}}', as it is very easy to accidentally delete the key {{{PM_DEVICE_DRIVERS -> ECUPS}}} [= ''path to ECUPS.DRV''] from OS2.INI - which will prevent all ECUPS printers from working, until you either fix the INI file manually or install a new ECUPS device.)
    139 
    140  * The eCups printer driver (ECUPS.DRV) is a customized version of the OS/2 !PostScript driver (PSCRIPT.DRV) which has most of the popular CUPS PPD files already included, and can be updated as new printers become supported in CUPS.  It also has a few tweaks and bugfixes to make it work better with CUPS.  (For this reason, using the original IBM !PostScript driver for CUPS printing is not really recommended, although it may happen to work for you.)
    141 
    142  * The eCups printer port driver (CUPS.PDR) provides the "hook-up" between an OS/2 Printer Object and the actual CUPS printer. 
    143 
    144 The port driver component in particular is crucial, because normal OS/2 applications ''only'' know how to print to an OS/2 Printer Object - not a CUPS printer!  What happens is that the OS/2 Printer Object sends print data to a port (like a parallel/serial/USB port or an LPR network queue, and so on) which is defined by a ''port driver''.  In this case, we are implementing another type of port to be available alongside these.  This driver allows the OS/2 print "engine" to talk to the CUPS daemon, which turn talks to the physical printer either over the network or over a USB connection (using what it calls a "backend", which is basically CUPS's own internal equivalent of a port driver). 
    145 
    146 Note that we don't use the OS/2 USB port driver when using a USB attached printer via CUPS - we always use the CUPS port driver and then let the CUPS daemon control the physical IO traffic to the printer.  The same is true for other connection types like network connections - in all cases, CUPS manages the connection.
    147 
    148 As far as CUPS goes internally, the data flow is as follows:
    149 
    150 PRINTER <-> IO Driver "backend" <-> CUPS daemon (CUPSD.exe) <-- CUPS admin webpage (config, test print etc.)
    151 
    152 The above suffices for printing using CUPS's own internal mechanisms.  What the port driver does, in conjunction with an OS/2 Printer Object, is allow normal OS/2 programs (which know nothing about CUPS) to print to CUPS printers.  So the data flow becomes:
    153 
    154 PRINTER <-> IO Driver "backend" <-> CUPS daemon (CUPSD.exe) <-> eCups Port Driver (CUPS.PDR) <-> !PostScript printer driver (ECUPS.PDR) <-> OS/2 printer support <-> OS/2 application. 
    155 
    156 [[BR]]
    157 [[BR]]
    158 
    159 
    160 [=#installation]
    161 == Installation ==
    162 
    163 There is now a !WarpIN package available (see the CupsPort page) but it is still somewhat experimental, and may not contain the latest versions.  The instructions below assume you are installing manually, i.e. from zipfiles.
    164 
    165  * The basic CUPS install (using Gutenprint) consists of unzipping the packages in the root directory of a drive (doesn't have to be the boot drive):
    166 
    167    * !GhostScript needs to be unzipped into `\gs` - so that you end up with for example, `x:\gs\gs8.70` (some zip packages contain the `\gs` upper directory, some don't - so make sure you end up with the correct directory structure).
    168 
    169     * `cups-*.zip` needs to be unzipped into the '''root''' directory, thereby creating the `\cups` directory
    170 
    171     * `gutenprint*.zip` needs to be unzipped into the '''root''' directory, which will create the `\gutenprint` directory as well as add some required files to the `\cups` directory.
    172 
    173   At the end of this process, you should have 3 new directories of the root directory of your chosen drive:
    1741{{{
    175 \cups
    176 \gutenprint
    177 \gs
     2#!html
     3<head>
     4    <style>
     5        img.screen {
     6            border:          thin outset darkgray;
     7            margin:          0em 1em 0.5em 1em;
     8        }
     9        table {
     10            border-collapse: collapse;
     11            border:          thin outset;
     12        }
     13        .aside {
     14            border:         thin solid black;
     15            background:     #f0f0f0;
     16            font-size:      smaller;
     17            padding:        0 0.5em 0 0.5em;
     18        }
     19    </style>
     20</head>
     21<h1>A CUPS and eCS (OS/2) How To</h1>
     22
     23<p><br><a name="contents"></a></p>
     24<h2>CONTENTS</h2>
     25<p><a href="#preamble">1. Brief Preamble</a></p>
     26
     27<p><a href="#whycups">2. Why CUPS?  What is it?</a>
     28<ul style="list-style-type: none;">
     29<li><a href="#work">How does CUPS work?</a>
     30</ul></p>
     31
     32<p><a href="#required">3. List of Required Software</a>
     33<ul style="list-style-type: none;">
     34<li><a href="#packages">Brief description of the software packages</a>
     35</ul></p>
     36
     37<p><a href="#installation">4. Installation</a>
     38<ul style="list-style-type: none;">
     39<li><a href="#inst_wpi">Installing with WarpIN</a>
     40<li><a href="#inst_zip">Installing manually (from the ZIP files)</a>
     41<li><a href="#upgrading">Upgrading from a Previous Version</a>
     42<li><a href="#starting">Starting CUPS</a>
     43<li><a href="#cupsgui">Using the CUPS Web Interface</a>
     44</ul></p>
     45
     46<p><a href="#">5. Printing with CUPS</a>
     47<ul style="list-style-type: none;">
     48<li><a href="#cupsprint">Creating &amp; Configuring a CUPS Printer</a>
     49<ul style="list-style-type: none;">
     50<li><a href="#add_device">Selecting the printer connection</a>
     51<li><a href="#add_name">Identifying the printer</a>
     52<li><a href="#add_model">Selecting the printer model</a>
     53<li><a href="#add_options">Setting the default print options</a>
     54<li><a href="#cupstest">Testing the CUPS printer</a>
     55<li><a href="#cupslpr">Printing from CUPS</a>
     56</ul>
     57<li><a href="#os2print">Creating a desktop printer object to use with CUPS</a>
     58<ul style="list-style-type: none;">
     59<li><a href="#obj_prep">Preparation</a>
     60<li><a href="#object">Creating the printer</a>
     61<li><a href="#obj_set">Configuring the printer</a>
     62</ul>
     63</ul></p>
     64
     65<p><a href="#about">About this Document</a>
     66<ul style="list-style-type: none;">
     67<li><a href="#credits">Contributors</a>
     68<li><a href="#history">Revision History</a>
     69</ul></p>
     70
     71<p><br><a name="preamble"></a>
     72<h2>1. Brief Preamble</h2>
     73<p>Hopefully this text will provide a clear enough "How To" for anyone to be able to follow.</p>
     74
     75<p>I am using my experience of, firstly, getting a printer working with CUPS itself; and then,
     76creating an OS/2 desktop printer object that is capable of outputting print jobs through CUPS.</p>
     77
     78<p>The following text may refer to specific drive letter(s) that should be changed to reflect the
     79correct drive letter on your systems.  Most of the paths used are specific to the CUPS installation;
     80those that are not may need to be changed for your system.</p>
     81
     82
     83<p><br><a name="whycups"></a>
     84<h2>2. Why install CUPS?  What is it?</h2>
     85<p>To answer the "what is it" part: CUPS is the <a href="http://www.cups.org/">Common Unix Printing
     86System</a>.  In a nutshell, it's a generic framework for printer driver packages. You install CUPS
     87plus a driver package that supports your printer, and if all goes well you can print. <tt>:-)</tt>
     88</p>
     89
     90<p>Why install CUPS?  Simply put: because it is capable of supporting a lot of modern printers and
     91is continually being updated to support more. The old OS/2 printer drivers are not that good with
     92new printers. If you have a native PostScript printer, you can probably get it more or less working
     93with some fiddling, since OS/2 supports PostScript generically.  But for most consumer-level
     94printers, it's a different story.  If you are lucky enough to find a driver that works with your
     95modern printer, those drivers will not be updated to take advantage of all the features... whereas
     96the CUPS driver will.</p>
     97
     98<p>In short, CUPS can provide drivers for more current printers &mdash; and should provide many
     99extra capabilities missing from the OS/2 drivers.</p>
     100
     101<p>What does it support? Support for actual printers is handled by the individual driver
     102packages.  There are three basic packages available for OS/2 (not counting a couple of smaller
     103and more experimental ones which are beyond the scope of this document).
     104<ul>
     105  <li>Gutenprint (the biggest and most commonly-used driver package), list of supported printers:
     106      <a href="http://gutenprint.sourceforge.net/p_Supported_Printers.php ">http://gutenprint.sourceforge.net/p_Supported_Printers.php</a>
     107  <li>SpliX (supports various Samsung and Xerox printers), list of supported printers:
     108      <a href="http://splix.ap2c.org/">http://splix.ap2c.org/</a>
     109  <li>HP-LIP (supports various Hewlett-Packard printers), list of supported printers:
     110      <a href="http://hplipopensource.com/hplip-web/supported_devices/index.html">http://hplipopensource.com/hplip-web/supported_devices/index.html</a>
     111</ul>
     112
     113
     114<p><br><a name="work"></a>
     115<h3>How does CUPS work?</h3>
     116<p>You can think of CUPS as an emulation layer that presents all its printers as PostScript
     117printers, even if (at the hardware level) they aren't actually.  This allows all applications to
     118submit print jobs as standardized PostScript files (either themselves or by using a system
     119PostScript driver), and CUPS does the job of converting them into the printer's own native format.
     120If you're interested in the technical details, the
     121<a href="http://svn.netlabs.org/ecups/wiki/CupsFaq">CupsFaq</a> has more information.</p>
     122
     123<p>In terms of the actual implementation, CUPS itself runs as a background server (daemon) with its
     124own internal spooler. This daemon is responsible for managing all defined CUPS printers. Now, this
     125is entirely independent of OS/2's normal printing system, which knows nothing about CUPS. So we
     126need to also create a regular OS/2 printer object and queue that is capable of receiving print jobs
     127from applications. Then we configure this printer object to redirect all of its print jobs to the
     128correct queue within CUPS, by creating a virtual "port" that points to the CUPS daemon rather than
     129to a hardware port. CUPS itself ultimately takes care of communicating with the actual hardware.
     130See <a href="#packages">below</a> for more information.</p>
     131
     132<p>This HOWTO describes how to set this up.  The object is to end up with a desktop printer
     133object that prints seamlessly to the printer, but which uses CUPS to take advantage of the
     134extensive hardware support that provides.</p>
     135
     136
     137<p><br><a name="required"></a>
     138<h2>3. List of Required Software</h2>
     139<p>The CUPS port is available at <a href="http://svn.netlabs.org/ecups/wiki/CupsPort">http://svn.netlabs.org/ecups/wiki/CupsPort</a>.
     140You can download the software in WPI format or as individual ZIP files. In either case, you will
     141need the following products.</p>
     142
     143<p><u>Always required:</u></p>
     144<p><ul>
     145  <li>The basic CUPS package (this is the CUPS daemon and supporting files).
     146  <li>Ghostscript for OS/2 &mdash; version 8.71 is recommended, as later versions still have some
     147      outstanding issues with CUPS.
     148  <li>At least one of the following driver packages (choose the one which supports your printer):
     149      <ul>
     150        <li>Gutenprint (many printers)
     151        <li>SpliX (many Samsung/Xerox printers). Note that SpliX also requires custom GCC runtime,
     152            which is included in the WPI package, or available separately from
     153            <a href="http://smedley.info/gcc432.zip">http://smedley.info/gcc432.zip</a>
     154        <li>HP-LIP (various printers from HP)
     155      </ul>
     156  <li>CUPS port driver (CUPS.PDR).  If you use the WarpIN packages, this is included in the
     157      <tt>cups-base-*.wpi</tt> archive.
     158  <li>The eCups OS/2 printer driver, either ECUPS.DRV (for Gutenprint and SpliX) or ECUPS-HP.DRV
     159      (for HP-LIP).  These are modified versions of the standard OS/2 PostScript driver which
     160      include various fixes needed by CUPS.
     161  <li>LIBC runtime files required for CUPS and other components.  (You may have these already,
     162      especially if you are running eComStation).
     163      <ul>
     164        <li><a href="ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip">ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip</a>
     165        <li><a href="ftp://ftp.netlabs.org/pub/gcc/gcc4core.wpi">ftp://ftp.netlabs.org/pub/gcc/gcc4core.wpi</a>
     166      </ul>
     167
     168</ul></p>
     169<p>These are described in more detail below.</p>
     170
     171<p><u>May be required:</u></p>
     172<p><ul>
     173  <li>USB helper driver (required for USB printing only): <a href="http://en.ecomstation.ru/projects/usbtools/download/usbcalls-20060807.zip">http://en.ecomstation.ru/projects/usbtools/download/usbcalls-20060807.zip</a>
     174      (again, you may have this already, especially if you use a recent version of eComStation)
     175  <li><tt>PRNDRV.EXE</tt> is a useful program that can "clean up" printer entries in the INI files
     176      (not actually necessary for using CUPS, but can be very useful if you do a lot of creating
     177      and deleting of printers):
     178      <a href="http://www.os2site.com/sw/comm/faxworks/prndrv.exe">http://www.os2site.com/sw/comm/faxworks/prndrv.exe</a>
     179</ul>
     180
     181
     182<p><br><a name="packages"></a>
     183<h3>Brief description of the software packages</h3>
     184<p>CUPS consists of several packages that work together to provide emulated PostScript printing on
     185raster printers. The core components on all platforms are the CUPS daemon, GhostScript, and the
     186driver packages (Gutenprint, Splix, HPLIP etc.).</p>
     187
     188<p>The remaining packages are specific to the OS/2 port (a.k.a. eCups):
     189<ul>
     190  <li>The LIBC and GCC files are required support files (the GCC runtime is required by Splix).
     191  <li>PRNDRV.EXE - a useful command line utility for listing installed OS/2 (not CUPS) printers,
     192      and deleting those that are no longer wanted. (Note: Be careful when using 'prndrv -d', as
     193      it is very easy to accidentally delete the key <tt>PM_DEVICE_DRIVERS -> ECUPS [= path to
     194      ECUPS.DRV]</tt> from OS2.INI - which will prevent all ECUPS printers from working, until
     195      you either fix the INI file manually or install a new ECUPS device.)
     196  <li>The eCups printer driver (ECUPS.DRV or ECUPS-HP.DRV) is a customized version of the OS/2
     197      PostScript driver (PSCRIPT.DRV) which has most of the popular CUPS PPD files already included,
     198      and can be updated as new printers become supported in CUPS. It also has a few tweaks and
     199      bugfixes to make it work better with CUPS. (For this reason, using the original IBM PostScript
     200      driver for CUPS printing is not really recommended, although it may happen to work for you.)
     201  <li>The eCups printer port driver (CUPS.PDR) provides the "hook-up" between an OS/2 printer
     202      object/queue and the actual CUPS printer.
     203</ul>
     204The port driver component in particular is crucial, because normal OS/2 applications only know
     205how to print to an OS/2 Printer Object - not a CUPS printer! What happens is that the OS/2
     206printer Object sends print data to a port (like a parallel/serial/USB port or an LPR network
     207queue, and so on) which is defined by a port driver. In this case, we are implementing another
     208type of port to be available alongside these. This driver allows the OS/2 print "engine" to talk
     209to the CUPS daemon, which turn talks to the physical printer either over the network or over a USB
     210connection (using what it calls a "backend", which is basically CUPS's own internal equivalent of
     211a port driver).</p>
     212
     213<p>Note that we don't use the OS/2 USB port driver when using a USB attached printer via CUPS
     214&mdash; we always use the CUPS port driver and then let the CUPS daemon control the physical
     215IO traffic to the printer. The same is true for other connection types like network connections
     216&mdash; in all cases, CUPS manages the connection.</p>
     217
     218<p>As far as CUPS goes internally, the data flow is as follows:</p>
     219<p><tt>PRINTER <-> IO Driver "backend" <-> CUPS daemon (CUPSD.exe) <-- CUPS admin webpage (config, test print etc.)</tt></p>
     220<p>The above suffices for printing using CUPS's own internal mechanisms. What the port driver does,
     221in conjunction with an OS/2 Printer Object, is allow normal OS/2 programs (which know nothing about
     222CUPS) to print to CUPS printers. So the data flow becomes:</p>
     223<p><tt>PRINTER <-> IO Driver "backend" <-> CUPS daemon (CUPSD.exe) <-> eCups Port Driver (CUPS.PDR) <-> PostScript printer driver (ECUPS.PDR) <-> OS/2 printer support <-> OS/2 application.</tt></p>
     224
     225
     226<p><br><a name="installation"></a>
     227<h2>4. Installation</h2>
     228
     229<a name="inst_wpi"></a>
     230<h3>Installing with WarpIN</h3>
     231<p>There are now WarpIN (WPI) install packages available for eCups (see the
     232<a href="http://svn.netlabs.org/ecups/wiki/CupsPort">CupsPort</a> page).  It is generally
     233recommended that you use these, as they automate some of the tricker configuration steps
     234(especially when upgrading various components from earlier versions).  On the other hand, they are
     235still somewhat experimental, and are not always guaranteed to include the very latest versions of
     236all components.</p>
     237
     238<p>Download the required WPI packages into a single directory.  You will need:
     239<ul>
     240  <li>The main CUPS package (<tt>cups-base-<i>xx</i>.wpi</tt> where <i>xx</i> is the version
     241      number of CUPS); this includes both CUPS itself, and the CUPS port driver.
     242  <li>Ghostscript (version 8.71 is <i>strongly</i> recommended, unless you are doing development
     243      testing).
     244  <li>At least one printer support package (Gutenprint, SpliX, or HP-LIP).
     245  <li>The ECUPS printer driver in most cases, or alternatively the ECUPS-HP printer driver if
     246      you are installing HP-LIP specifically.
     247</ul>
     248<p>Install the selected packages by double-clicking on the <tt>cups-base-<i>xx</i>.wpi</tt> file
     249from the Workplace Shell.  Follow the instructions shown in the installer.</p>
     250<p>Once the installation completes, you should be able to continue with creating and configuring
     251a printer.</p>
     252
     253<p><br><a name="inst_zip"></a>
     254<h3>Installing manually (from the ZIP files)</h3>
     255<p>Basic manual installation consists of unzipping most of the packages into the root directory of
     256a selected drive.  It doesn't have to be the boot drive, but they must all be unzipped to the
     257<em>same</em> (non-FAT) drive.
     258<ul>
     259  <li><tt>cups-*.zip</tt> needs to be unzipped into the root directory, thereby creating the
     260      <tt>\cups</tt> top-level directory
     261  <li>Ghostscript needs to be unzipped into <tt>\gs</tt> - so that you end up with for example,
     262      <tt><i>x</i>:\gs\gs8.71</tt> (some zip packages contain the \gs upper directory, some don't
     263      &mdash; so make sure you end up with the correct directory structure).
     264  <li>The driver package(s) you will be using (<tt>gutenprint-*.zip</tt>, <tt>hplip-*.zip</tt>
     265      and/or <tt>splix-*.zip</tt>) must be unzipped into the root directory on the same drive.
     266      This will add various required files to the <tt>\cups</tt> directory, and in the case of
     267      Gutenprint will also create the <tt>\gutenprint</tt> top-level directory.
     268</ul>
     269<p>Once you have done the above, you should have the following directories off the root directory
     270of your chosen drive:</p>
     271<ul style="list-style-type: none;">
     272  <li><tt>\cups</tt>
     273  <li><tt>\gs</tt>
     274  <li><tt>\gutenprint</tt> (if using Gutenprint)
     275</ul>
     276<p>Have a read of the <tt>\cups\readme.os2</tt> before proceeding, to get an idea of what you are
     277going to do.  Pay particular attention to the need to check/modify the Ghostscript path in
     278<tt>\cups\lib\cups\filter\pstoraster</tt>.</p>
     279
     280<p>There are other required files which go into a couple of different locations:
     281<ul>
     282  <li>The port driver is needed to enable printing from applications.  <tt>CUPS.PDR</tt> must
     283      be placed in <tt>\OS2\DLL</tt> on your boot drive so that the port install dialog can
     284      find it.  Place <tt>CUPSLPR.EXE</tt> into the <tt>\TCPIP\BIN</tt> directory on whichever
     285      drive TCP/IP is installed to (usually the boot drive).
     286  <li>The <tt>LIBC0*.DLL</tt> and <tt>GCC*.dll</tt> files should be put into a directory specified
     287      within the LIBPATH &mdash; either <tt>\ECS\DLL</tt> or <tt>\OS2\DLL</tt> is fine.
     288</ul>
     289
     290<p>Other files can be unzipped now or later as they are required:</p>
     291<ul>
     292  <li>The ECUPS (or ECUPS-HP) printer driver can be put into a directory of your choice. You will
     293      point the printer install dialog to this directory during the install process; OS/2 will
     294      then automatically copy the files to <tt>\OS2\DLL\ECUPS</tt> (which it will create if
     295      necessary).
     296  <li>If installing PRNDRV.EXE, just copy the file somewhere that's convenient for you.
     297</ul>
     298
     299
     300<p><br><a name="upgrading"></a>
     301<h3>Upgrading from a Previous Version</h3>
     302<p>Whether installing from WPIs or ZIP files, you can generally just install over top of the
     303previous versions.  (If you installed from Peter Brown's old <tt>eCUPS003.wpi</tt> package, you
     304might want to uninstall the corresponding packages from WarpIN before installing the latest WPIs
     305&mdash; otherwise you'll probably end up with duplicated desktop objects and some orphaned entries
     306in the WarpIN database).
     307</p>
     308
     309<p>When upgrading to the most recent release of Gutenprint, you are advised to manually delete the
     310contents of <tt>\cups\share\cups\model\gutenprint\5.2\C</tt> <strong>before</strong> installing
     311the new version &mdash; otherwise, you may end up with a large number of duplicate entries in the
     312CUPS driver list.  Unfortunately, even the WPI installer does not do this automatically yet.  (This
     313is not necessary when installing a version of Gutenprint prior to 5.2.7.)</p>
     314
     315<p>If upgrading with the WPI packages, generally no additional steps are necessary.  However, when
     316upgrading from ZIP files, you will need to do a bit of extra work:
     317<ul>
     318  <li><p>When upgrading CUPS or any of the driver packages (Gutenprint, etc.), shut down the CUPS
     319      daemon by killing all running instances of <tt>cupsd.exe</tt> before starting.</p>
     320
     321  <li><p>When upgrading either CUPS or Ghostscript, edit the file
     322      <tt>\cups\lib\cups\filter\pstoraster</tt> and make sure the "<tt>prefix=</tt>" line points to
     323      your correct GhostScript path.</p>
     324
     325  <li><p>After upgrading Gutenprint, go into the CUPS web interface and do the following for
     326      <strong>all</strong> printers which use Gutenprint drivers:
     327      <ol>
     328         <li>Open the printer details by clicking on its queue name under the <i>Printers</i>
     329             page.
     330         <li>From the <i>Administration</i> drop-down, select "Modify Printer".
     331         <li>Leave all current settings on the first two pages unchanged; just click on
     332             <i>Continue</i> until you reach the printer manufacturer/model page.
     333         <li>Make sure the correct manufacturer and model for your printer are selected.
     334             Also make sure that the Gutenprint version shown in the driver name are
     335             correct for the version of Gutenprint you just installed.  Then click on
     336             <i>Modify Printer</i>.
     337         <li>It's a good idea to print a test page to make sure everything still works as it
     338             should.
     339      </ol></p>
     340      <p>(Alternatively, if you have Perl installed you can download and run the script
     341      <a href="http://smedley.info/cups-genppdupdate">http://smedley.info/cups-genppdupdate</a>,
     342      which does this automatically.)</p>
     343</ul></p>
     344
     345
     346<p><br><a name="starting"></a>
     347<h3>Starting CUPS</h3>
     348<p>If you installed from the WarpIN packages, CUPS should have been started automatically, and
     349you can skip this step.</p>
     350
     351<p>To activate CUPS, start the program <tt>\cups\sbin\cupsd.exe</tt>.  This program will run
     352continuously (until terminated), so you should run it either in a dedicated session or as a
     353background process using "<tt>detach</tt>".</p>
     354
     355<p>You will presumably want to create a program object which does this, and place it in your
     356Startup folder so that CUPS is started automatically at bootup.  You can make the program run
     357in the background by specifying "<tt>cmd.exe</tt>" as the program name, then setting the
     358parameters to "<tt>/c <i>x</i>:\cups\sbin\cupsd.exe</tt>" and the working directory to
     359"<tt><i>x</i>:\cups\sbin</tt>" (where <i>x</i> is the drive letter where CUPS is installed).</p>
     360
     361<p>Alternatively, you can start <tt>cupsd.exe</tt> from either your <tt>\STARTUP.CMD</tt> or
     362<tt>\TCPIP\BIN\TCPEXIT.CMD</tt> file.</p>
     363
     364
     365<p><br><a name="cupsgui"></a>
     366<h3>Using the CUPS Web Interface</h3>
     367<p><a href="/ecups/attachment/wiki/HowTo/cupsweb01.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb01.png" alt="[CUPS GUI - Top page]" width="35%" align="right"></a>
     368Once you've finished installing CUPS, you should make sure that it's up and running by opening the
     369CUPS web interface.  This is the main configuration tool for managing CUPS on your system.  You
     370can use it to create and manage printers, enable other computers to access your CUPS printers,
     371diagnose potential problems, and so on.</p>
     372
     373<p>Fire up your web browser and point it at <a href="http://localhost:631/">http://localhost:631/</a>.
     374If all goes well, this should bring up the CUPS Administration GUI.</p>
     375<ul>
     376  <li><p>If you get a "host not found" error, try using the address <a href="http://127.0.0.1:631/">http://127.0.0.1:631/</a>
     377      instead.  If that doesn't help, make sure that you have loopback enabled in your system TCP/IP
     378      configuration.</p>
     379  <li><p>Alternatively, if you get an HTTP 404 error, it means that the CUPS daemon is not running
     380      (or is broken somehow).  Make sure you start <tt>cupsd.exe</tt> as <a href="#starting">described
     381      above</a>.</p>
     382</ul>
     383<p>(In some recent CUPS versions, the logo graphic on the front page may be broken, but this
     384appears to be a harmless cosmetic issue.)</p>
     385
     386
     387<p style="clear: right;"><br><a name="printing"></a></p>
     388<h2>5. Printing with CUPS</h2>
     389<p>There are two basic parts to setting up a printer with CUPS.</p>
     390<ol>
     391  <li><a href="#cupsprint">Create and configure a CUPS printer queue</a>.  This sets things up so
     392      that CUPS itself knows about the printer and can print to it.
     393  <li><a href="#os2print">Create and configure a desktop printer object</a>.  This allows OS/2
     394      applications to actually print to the CUPS printer.
     395</ol>
     396<p>Unfortunately, this two-phase process makes things a bit complicated.  We'll describe how to
     397set everything up, step by step.</p>
     398
     399
     400<p><br><a name="cupsprint"></a>
     401<h3>Creating &amp; Configuring a CUPS Printer</h3>
     402<p><a href="/ecups/attachment/wiki/HowTo/cupsweb02.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb02.png" alt="[CUPS GUI - Administration page]" width="35%" align="right" class="screen"></a>
     403First of all, if your printer is locally-attached (e.g. via USB port), make sure that it is
     404turned on.</p>
     405
     406<p>Next, go into the CUPS web interface, click on the <i>Administration</i> tab at the top, and then
     407select the <i>Add Printer</i> button.</p>
     408
     409<p>The examples that follow will describe the process for adding an <strong>Epson PX-101</strong>
     410colour inkjet printer.</p>
     411
     412<a name="add_device"></a><h4 style="clear: right;">Selecting the printer connection</h4>
     413
     414<p style="clear: right;"><a href="/ecups/attachment/wiki/HowTo/cupsweb03.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb03.png" alt="[Add Printer - Device]" width="35%" align="right" class="screen"></a>
     415When you select <i>Add Printer</i>, CUPS scans for available printers.  Any locally-attached
     416printers that it finds will be shown as selectable options on the following screen.  It may also
     417detect network printers, but this seems to be a bit hit-and-miss (it probably depends on how
     418your network is organized, among other factors).</p>
     419
     420<p>On this screen, select the connection that is appropriate for your printer.
     421
     422<dl>
     423<dt><a name="local_usb"></a><u>Local printer (USB)</u>
     424<dd><p>At the moment, the only local (direct) connections that are supported directly are USB.
     425    There is a workaround which can be used to enable printing via parallel port, but it requires
     426    some special setup; <a href="#local_lpt">see below</a>.</p>
     427    <p>It has been reported that some older versions of the operating systems USB support files can
     428    cause problems, so please ensure you have the latest versions of the OS/2 USB stack as well as
     429    <a href="http://en.ecomstation.ru/projects/usbtools/download/usbcalls-20060807.zip">USBCALLS</a>
     430    before you attempt this configuration.</p>
     431    <p>If your USB printer is connected and powered on, it should show up as an option on this page.
     432    This assumes, of course, that everything is working as it should.  Refer to the box below if
     433    you are having trouble getting your USB printer recognized by CUPS.</p>
     434    <p style="clear: right;"><div class="aside">
     435    <p>If your CUPS version is older than 1.3.11, you may need to download the USB backend
     436    separately from
     437    <a href="http://download.smedley.info/cups-usb-backend-20090309.zip">http://download.smedley.info/cups-usb-backend-20090309.zip</a>
     438    and install it by unzipping into the <tt>\cups\lib\cups\backend</tt> directory.  However, all
     439    recent releases of CUPS include this file already.</p>
     440    <p>To verify that the USB support is working, open a command prompt and go to the
     441    <tt>\cups\lib\cups\backend</tt> directory.  Make sure your printer is turned on and run
     442    <tt>usb.exe</tt> with no parameters.  You should get a display like this:</p>
     443    <p>
     444    <tt>DEBUG: list_devices</tt><br>
     445    <tt>DEBUG: usb_find_busses=1</tt><br>
     446    <tt>DEBUG: usb_find_devices=2</tt><br>
     447    <tt>direct usb://EPSON/PX-101 "EPSON PX-101" "EPSON PX-101" "MFG:EPSON;CMD:ESCPL2,BDC,D4,D4PX;MDL:PX-101;CLS:PRINTER;DES:EPSON PX-101;" ""</tt>
     448    </p>
     449    <p>If you don't get such a display, check that your USB support is working correctly and that you have
     450    connected the printer with a known good cable to a known good port.</p>
     451    </div></p>
     452<!--
     453    <p><table border="1" cellspacing="0" cellpadding="3">
     454    <tr><td><b>Field</td>            <td><b>Description</b></td>                                   <td><b>Example</b></td></tr>
     455    <tr><td><i>Device URI: </i></td> <td>USB port address (automatically determined by CUPS) </td> <td><tt>usb://EPSON/PX-101</tt></td></tr>
     456    </table>
     457    </p>
     458-->
     459
     460<dt><a name="local_lpt"></a><u>Parallel port connection</u>
     461<dd><p>The OS/2 port of CUPS does not currently support printing directly to parallel printers
     462    but there is a workaround.</p>
     463    <p><ol>
     464      <li>Create an OS/2 printer object using the IBMNULL printer driver. Select LPT<i>n</i> as
     465          the Output Port in the printer object properties, where LPT<i>n</i> is the name of the
     466          parallel port to which the printer is connected.
     467      <li>Start the OS/2 LPD service (<tt>lpd.exe</tt>). To prevent LPD from printing the control
     468          file page (an almost-blank page with few lines of information good only for debugging
     469          purposes), specify the "-c" parameter.  You can use the OS/2 TCP/IP Configuration notebook
     470          to configure LPD.
     471    </ol></p>
     472    <p>When creating the CUPS printer, select <i>LPD/LPR Host or Printer</i> and enter
     473    "<tt>lpd://localhost/<i>printer_name</i></tt>" as the Device URI, where <i>printer_name</i> is
     474    the physical name &mdash; as shown on the Properties <i>View</i> page &mdash; of the OS/2 printer
     475    object just created.</p>
     476
     477    <p>For example: If you created a desktop printer with the object name "Canon iP4000", open the Properties
     478    for that printer and check the name displayed on the <i>View</i> page.  If the <i>Physical name</i>
     479    shows "CanoniP4", the device URI in CUPS should be "<tt>lpd://localhost/CanoniP4</tt>".
     480    <p><table border="1" cellspacing="0" cellpadding="3">
     481    <tr><td><b>Field</td>            <td><b>Description</b></td>                      <td><b>Example</b></td></tr>
     482    <tr><td><i>Device URI: </i></td> <td>Address of locally-shared LPD printer </td> <td><tt>lpd://localhost/CanoniP4</tt></td></tr>
     483    </table>
     484    </p>
     485
     486    <p>Thanks to Rodney and others who supplied the above information regarding using locally attached
     487    printers with CUPS.</p>
     488
     489    <p style="clear: right;"><div class="aside"><p>In fact, the current CUPS port does include a
     490    parallel port backend (driver), but it is completely untested due to the fact that none of
     491    developers/testers actually has a parallel-port printer.  So the above workaround may or may
     492    not still be necessary.</p></div></p>
     493
     494<dt><a name="tcpip"></a><u>Network printer</u>
     495<dd><p>These options allow you to connect to a network printer using various supported protocols.
     496    If the printer was not automatically detected, the following screen will prompt you to enter
     497    the necessary connection information in the form of a <i>URI</i> (a string specifying the
     498    connection protocol and address in a URL-like syntax).</p>
     499
     500    <p><a href="/ecups/attachment/wiki/HowTo/cupsweb03a.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb03a.png" alt="[Add Printer - URI]" width="35%" align="right" class="screen"></a>
     501    The format of the URI indicates which network protocol to use, and specifies the necessary
     502    options.  You have a choice of several different protocols; obviously, use whichever one your
     503    network printer or print server supports.</p>
     504    <ul>
     505      <li>Internet Printing Protocol (IPP) is the newest and most advanced; the URI format is
     506          "<tt>ipp://<i>server[</i>:<i>port]</i>/<i>printer[</i>?<i>option</i>=<i>value[</i>&<i>option</i>=<i>value</i>]]</tt>"
     507      <li>LPD (or LPR) is the oldest and most widely-supported; use the URI format
     508          "<tt>lpd://<i>[userid</i>@<i>]</i><i>server[</i>:<i>port]</i>/<i>printer</i></tt>"
     509      <li>AppSocket (also called JetDirect) is also widely used; use the URI format
     510          "<tt>socket://<i>server[</i>:<i>port]</i></tt>"
     511      <li>Samba is for printers which are being shared out via Windows networking,
     512          IBM LAN Server, Peer for OS/2, or a Samba server.  Use the URI format
     513          "<tt>smb://<i>[userid[</i>:<i>password]</i>@<i>]</i><i>server</i>/<i>printer</i></tt>"
     514    </ul>
     515    <p>Most TCP/IP network printers use either LPD or AppSocket (just try one or the other if
     516    you're not sure). For shared printers on a Windows server, use Samba.</p>
     517
     518    <p style="clear: right;"><div class="aside">
     519    <p>If you installed CUPS from ZIP files, be aware that support for Samba is not included by
     520    default.  If you want to use Samba, you need to first obtain the Samba Client Utilities package
     521    from <a href="http://svn.netlabs.org/samba">http://svn.netlabs.org/samba</a>.  Extract the
     522    file <tt>smbspool.exe</tt>, rename it to <tt>smb.exe</tt> and place it into the
     523    <tt>\cups\lib\cups\backend</tt> directory.  You should then be able to use the CUPS
     524    Samba support.</p>
     525    <p>The above is not necessary with the latest CUPS WarpIN packages, which include
     526    <tt>smb.exe</tt> out of the box.</p>
     527    </div></p>
     528
     529    <p><table border="1" cellspacing="0" cellpadding="3">
     530    <tr><td><b>Field</td>            <td><b>Description</b></td>          <td><b>Example</b></td></tr>
     531    <tr><td><i>Device URI: </i></td> <td>Address of network printer </td> <td><tt>lpd://192.168.2.1/lpt1 </tt></td></tr>
     532    </table>
     533    </p>
     534</dl>
     535
     536<p>Select the <i>Continue</i> button when you are done with this section.</p>
     537
     538<a name="add_name"></a><h4 style="clear: right;">Identifying the printer</h4>
     539
     540<p><a href="/ecups/attachment/wiki/HowTo/cupsweb04.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb04.png" alt="[Add Printer - Name/Description]" width="35%" align="right" class="screen"></a>
     541On the next page, you will be asked to give your printer a name, which CUPS itself will use to
     542identify it.  You will also need to enter a description and a location; these are for the benefit
     543of actual human beings.</p>
     544
     545<p><table border="1" cellspacing="0" cellpadding="3">
     546<tr><td><b>Field</td>             <td><b>Description</b></td>                                              <td><b>Example</b></td></tr>
     547<tr><td><i>Name: </i></td>        <td>A short name which CUPS will use to identify the printer </td>       <td>PX-101 </td></tr>
     548<tr><td><i>Description: </i></td> <td>A human-readable description of the printer </td>                    <td>Epson PX-101 inkjet </td></tr>
     549<tr><td><i>Location: </i></td>    <td>A brief description of where the printer is physically located </td> <td>Home </td></tr>
     550</table></p>
     551
     552<p>The <i>Share this printer</i> checkbox allows other computers on the local network to use this
     553printer (by accessing the current computer as a print server).</p>
     554
     555<p>Select <i>Continue</i> when you are happy with this section.</p>
     556
     557
     558<a name="add_model"></a><h4 style="clear: right;">Selecting the printer model</h4>
     559
     560<p><a href="/ecups/attachment/wiki/HowTo/cupsweb05.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb05.png" alt="[Add Printer - Model]" width="35%" align="right" class="screen"></a>
     561This is where you select your printer's make and model.  This is obviously pretty important as it
     562determines the driver that CUPS will use.</p>
     563<p>There are two ways to specify the printer.
     564<ul>
     565  <li><p>In most cases, you will choose the manufacturer and printer model from the list shown.
     566      (If the printer was auto-detected by CUPS, the manufacturer will probably be preselected
     567      and you'll only need to choose the right printer model.)  Generally, the list of models
     568      will show the printer model, followed by a dash and then the name of the driver package
     569      it belongs to (such as Gutenprint).</p>
     570      <p>Note that Gutenprint in particular normally provides two alternate drivers for each
     571      printer: a standard driver, and one called 'Simplified'.  The difference is in the level
     572      of configurability &mdash; the standard drivers support fine-tuning a number of
     573      advanced settings related to quality and colour balance.  In almost all cases, you will
     574      prefer the Simplified drivers, which are more than sufficient for most needs.</p>
     575
     576  <li><p>If your printer model isn't listed, but you have a PPD file for your printer, supporting
     577      one of the installed driver packages (Gutenprint, etc.), then you can specify that in the
     578      field at the bottom.</p>
     579      <p>Note that any PPD file you provide here must be specifically written for use with CUPS
     580      in conjunction with one of the driver packages you have installed.  You <em>cannot</em>
     581      use a standard (e.g. Windows) PPD for this purpose.</p>
     582</ul>
     583</p>
     584
     585<p>Click on <i>Add Printer</i> when you are happy with your selections.</p>
     586
     587<a name="add_options"></a><h4 style="clear: right;">Setting the default print options</h4>
     588
     589<p><a href="/ecups/attachment/wiki/HowTo/cupsweb06.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb06.png" alt="[Add Printer - Default Options]" width="35%" align="right" class="screen"></a>
     590<p>After clicking <i>Add Printer</i> on the screen above, CUPS will load the options for the
     591printer. This can take a little while &mdash; it is a good idea to have a look through and make
     592sure the options look useable &mdash; especially the media size, type, and print quality settings.</p>
     593<p>You can use the links near the top to browse various different option categories.  In most
     594cases, you won't need to change much beyond the first page ("General").</p>
     595<p>When satisfied, click <i>Set Default Options</i>.  CUPS should report that your printer has
     596been configured successfully.</p>
     597
     598<p style="clear: right;"><div class="aside">
     599<p>If you see an "Internal Server Error" message right after configuring a printer, just reload
     600the top-level page of the CUPS web interface.  This seems to be a (relatively) harmless bug that
     601occurs now and then with some versions of CUPS.</p>
     602</div></p>
     603
     604
     605<a name="cupstest"></a><h4 style="clear: right;">Testing the CUPS printer</h4>
     606
     607<p><a href="/ecups/attachment/wiki/HowTo/cupsweb07.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb07.png" alt="[CUPS GUI - Printers page]" align="right" width="35%" class="screen"></a>
     608Click on the Printers tab.  The new printer should be listed.</p>
     609<p>Click on the queue name to view the printer details.</p>
     610<p>Under the <i>Maintenance</i> dropdown, choose "Print Test Page".  If all goes well the CUPS test
     611page should pop out of the printer looking fine.</p>
     612<p style="clear: right;"><a href="/ecups/attachment/wiki/HowTo/cupsweb08.png"><img src="/ecups/attachment/wiki/HowTo/cupsweb08.png" alt="[CUPS GUI - Printers Details]" width="35%" class="screen"></a></p>
     613
     614
     615<a name="cupslpr"></a><h4 style="clear: right;">Printing from CUPS</h4>
     616<p>You should now be able to print files using CUPS's own internal tools.</p>
     617<p>The basic CUPS print command is <tt>\cups\bin\lpr.exe</tt>.  (This is <strong>not</strong> the
     618same as OS/2's native LPR command; this one is specific to CUPS, and is not installed to the system
     619PATH.)  Assuming you have the CUPS port driver installed properly, you can also use the
     620<tt>cupslpr</tt>command (just a renamed version of the above), which should be available on the
     621PATH.</p>
     622<p>You can use these programs to print standard PostScript (<tt>.ps</tt>) files from a command
     623prompt:
     624<pre>   cupslpr -P <i>printer</i> <i>file</i></pre>
     625<p>where <i>printer</i> is the name of the CUPS printer, and <i>file</i> is a previously-generated
     626PostScript file.</p>
     627
     628<p>If this all works then you know that CUPS is configured and working correctly.</p>
     629
     630<p>Now the easy part is finished...</p>
     631
     632
     633<p><br><a name="os2print"></a>
     634<h3 style="clear: right;">Creating a desktop printer object to use with CUPS</h3>
     635<p>Now to hook CUPS up to the rest of the system so that CUPS can be used for output by
     636applications (like OpenOffice, Firefox, Lucide, PMMail, PMView... everything, basically).</p>
     637
     638<a name="obj_prep"></a><h4>Preparation</h4>
     639<p>If you haven't done so already, make sure you have the ECUPS or ECUPS-HP printer driver files
     640on your disk &mdash; either by unzipping the ZIP file, or installing the WPI, into a directory of
     641your choice.  It doesn't really matter where this directory is; just make sure you make a note of
     642the path, because you'll need to type it into the driver dialog (below).  I suggest somewhere like
     643<tt>\ECS\INSTALL\PRNDRV\ECUPS</tt> &mdash; you'll probably want to keep these files around in case
     644you ever need to install another included printer model (or to import a PPD file).</p>
     645
     646<p>If you installed CUPS from ZIP files, make sure that you remembered to install port driver.
     647As a reminder, <tt>CUPS.PDR</tt> must be in your <tt>\OS2\DLL</tt> directory, and
     648<tt>CUPSLPR.EXE</tt> needs to be in <tt>\TCPIP\BIN</tt>.  (If you installed from the WPI
     649packages, this was done for you.)</p>
     650
     651<a name="object"></a><h4 style="clear: right;">Creating the printer</h4>
     652<p>Open the desktop Templates folder and double-click on the Printer template or drag it to the
     653Desktop in order to start the printer creation routine.  If you have eComStation, you can also
     654use the <i>Install Printer</i> object in the Printers folder and select "Standard printer" (may
     655be called "Local printer" in some versions).</p>
     656
     657<p><a href="/ecups/attachment/wiki/HowTo/obj_create01.png"><img src="/ecups/attachment/wiki/HowTo/obj_create01.png" alt="[Install New Printer Driver]" width="35%" align="right" class="screen"></a>
     658On the "Create a Printer" dialog, select the <i>Install new printer driver</i> button.</p>
     659
     660<p>Select the <i>Other eComstation printer driver</i> radio-button, and enter the path to where you
     661placed the ECUPS driver files.  Then click on <i>Refresh</i> (at the bottom of the dialog) to see
     662the list of printers.</p>
     663
     664<p>Select your printer from the list and then click on <i>Install</i>.  The driver for the selected
     665model will be installed.  (The "Install New Printer Driver" dialog may or may not close
     666automatically when this is done; if it doesn't, just click on <i>Cancel</i>.)</p>
     667
     668<p style="clear: right;"><div class="aside">
     669<p>If your printer model isn't shown in the list here, but <em>was</em> listed in CUPS, it means
     670that the PPD for that printer was not pre-imported into the ECUPS (or ECUPS-HP) driver.</p>
     671<p>If you are adventurous and/or technically inclined, you can try to import the PPD file yourself,
     672using the <tt>PIN.EXE</tt> utility included with the driver files (assuming that you already
     673installed the printer in CUPS, the PPD file can be found under <tt>\cups\etc\cups\ppd</tt>).</p>
     674<p>Alternatively, you can simply select "Generic PostScript Printer" from the list.  This will
     675prevent you from using the OS/2 Job Properties dialog to set print options from within
     676applications &mdash; the default settings configured in the CUPS web interface will most likely
     677always be used &mdash; but printing should more or less work.</p>
     678</div></p>
     679
     680<p><a href="/ecups/attachment/wiki/HowTo/obj_create02.png"><img src="/ecups/attachment/wiki/HowTo/obj_create02.png" alt="[Create a Printer]" width="35%" class="screen"></a></p>
     681<p>When you are back on the "Create a Printer" dialog, the new driver should appear. Select the
     682driver, and also type a name for your printer into the entryfield at the top.</p>
     683
     684<p>You also need to select an output port.  We could install the CUPS port now, but it's simpler
     685to just choose a temporary port like LPT1 for the time being, and set things up properly later.</p>
     686
     687<a name="obj_set"></a><h4 style="clear: right;">Configuring the printer</h4>
     688<p>Now we need to configure the new printer object so that it prints through CUPS.</p>
     689<ol>
     690  <li><p>Click mouse button 2 on the new desktop printer object, and select Properties.</p>
     691
     692  <li><p>Select the <i>Printer driver</i> tab.</p>
     693      <p><a href="/ecups/attachment/wiki/HowTo/obj_props01.png"><img src="/ecups/attachment/wiki/HowTo/obj_props01.png" alt="[Printer Properties - Printer Driver]" width="35%" class="screen"></a></p>
     694      <p>Verify that the correct printer driver is selected.</p>
     695
     696  <li><p>Open the <i>Job Properties</i> dialog.  The Paper size, Tray, Media Type, etc. should
     697      match the settings in the CUPS printer.</p>
     698      <p><a href="/ecups/attachment/wiki/HowTo/obj_props02.png"><img src="/ecups/attachment/wiki/HowTo/obj_props02.png" alt="[Default Job Properties]" width="35%" class="screen"></a></p>
     699      <p>Save your changes when done.</p>
     700
     701  <li><p>Select the <i>Output port</i> tab.</p>
     702      <p>Click on the <i>Install new port</i> button.</p>
     703      <p><a href="/ecups/attachment/wiki/HowTo/obj_port01.png"><img src="/ecups/attachment/wiki/HowTo/obj_port01.png" alt="[Install New Port]" width="35%" class="screen"></a></p>
     704      <p>If the "CUPS" port option is not visible but the file <tt>CUPS.PDR</tt> is in <tt>\OS2\DLL</tt>,
     705      select <i>New port drivers</i> and type in <tt><i>x</i>:\OS2\DLL</tt> (where <i>x</i> is your
     706      boot drive), then click on <i>Refresh</i>. The "CUPS" port option should appear.</p>
     707      <p>Select the "CUPS" port and click <i>Install</i>.</p>
     708      <p style="clear: right;"><a href="/ecups/attachment/wiki/HowTo/obj_port03.png"><img src="/ecups/attachment/wiki/HowTo/obj_port03.png" alt="[Printer Properties - Output Port]" width="35%" class="screen"></a></p>
     709      <p><strong>Note:</strong> You will need to install a separate "CUPS<i>x</i>" port for each
     710      CUPS printer that you wish to install (CUPS1, CUPS2, CUPS3, etc.).</p>
     711
     712  <li><p>Double-click on the CUPS<i>x</i> port (or click mouse button 2 and select "Properties").</p>
     713      <p><a href="/ecups/attachment/wiki/HowTo/obj_port02.png"><img src="/ecups/attachment/wiki/HowTo/obj_port02.png" alt="[CUPS port properties]" width="35%" class="screen"></a></p>
     714      <p>The required settings for the CUPS port are:
     715      <dl>
     716        <dt><i>CUPS Server:</i>
     717        <dd>"<tt>localhost</tt>" (or use 127.0.0.1).<p>
     718        <dt><i>CUPS Printer Name:</i>
     719        <dd>This should be the same name as used for creating the CUPS printer (in the
     720        CUPS web interface <a href="#add_name">above</a>).
     721      </dl>
     722      <p>Select <i>OK</i> when done.
     723
     724    <li><p>Set any other printer properties that you deem appropriate.  Personally, I like to set
     725        the printer object view to Detail.</p>
     726        <p>I also suggest editing the default driver properties (by double-clicking on the driver
     727        name) and bumping up the maximum number of downloaded fonts on the <i>Options</i> page
     728        &mdash; my rule of thumb is to allow about 5 fonts per megabyte of RAM in the printer.
     729        This can make large documents print a bit faster when using Type 1 fonts, and in the case
     730        of laser printers can also make a visible difference in print quality (although with a
     731        typical inkjet you probably wouldn't be able to tell).</p>
     732        <p><a href="/ecups/attachment/wiki/HowTo/obj_props03.png"><img src="/ecups/attachment/wiki/HowTo/obj_props03.png" alt="[Driver Properties]" width="35%" class="screen"></a></p>
     733
     734    <li><p>Close the printer properties notebook.</p>
     735</ol>
     736
     737<p style="clear: right;">That should complete the setup.  Now it's time to
     738print a test page using the desktop printer object.</p>
     739<ol>
     740  <li>Verify that <tt>cupsd.exe</tt> is running before testing.
     741  <li>Drag-and-drop the file <tt>\cups\share\cups\data\testprint.ps</tt> onto the new
     742      desktop printer object.
     743  <li>Select <i>Printer-specific</i> when prompted.
     744</ol>
     745<p>You should get the CUPS test page printed.</p>
     746
     747<p>The next test is to print a multiple-page document from your favourite word processor, followed
     748by printing other document types from an arbitrary application (e.g. photos from PMView, web pages
     749from Firefox, etc.) using your new OS/2 printer object.</p>
     750
     751<p>If you have problems, you might want to check the
     752<a href="http://svn.netlabs.org/ecups/wiki/CupsFaq">CupsFaq</a> (in particular the Troubleshooting
     753section).  You can also ask for help on the
     754<a href="http://dir.gmane.org/gmane.org.netlabs.ecups.devel">eCups development list</a>.
     755
     756<p>Have fun and thanks to Paul Smedley for all his good work!</p>
     757
     758
     759<p><br><a name="about"></a>
     760<h2>About this Document</h2>
     761
     762<p><a name="credits"></a>
     763<h3>Contributors</h3>
     764<p><ul>
     765<li>Peter Brown (original author)
     766<li>Paul Smedley
     767<li>Ed Durrant
     768<li>Alex Taylor
     769</ul></p>
     770
     771<p>Ed Durrant wrote a nice <a href="http://svn.netlabs.org/ecups/wiki/VisualStepByStep">visual step-by-step guide</a> for an earlier version of this HOWTO, which has now been moved to its own page.</p>
     772
     773<p><br><a name="history"></a>
     774<h3>Revision History</h3>
     775<p></p>
     776<table border="1" cellpadding="2" cellspacing="0">
     777<tr><td>Revision 1</td>
     778    <td>14/08/2008</td> <td>Peter Brown</td></tr>
     779<tr><td>Revisions to filenames</td>
     780    <td>29/12/2008</td> <td>Paul Smedley</td></tr>
     781<tr><td>Revisions to USB section</td>
     782    <td>29/03/2009</td> <td>Paul Smedley</td></tr>
     783<tr><td>Revisions to the list of required software and brief description of software sections</td>
     784    <td>11/04/2009</td> <td>Ed Durrant</td></tr>
     785<tr><td>Additional details about using USB interface and visual instructions around set up of CUPS web admin printer install</td>
     786    <td>12/04/2009</td> <td>Ed Durrant</td></tr>
     787<tr><td>Additional visual instructions around set up of OS/2 printer object to use CUPS attached printer</td>
     788    <td>13/04/2009</td> <td>Ed Durrant</td></tr>
     789<tr><td>Changes to the desktop printer object setup based on the later versions of the files for clarification</td>
     790    <td>10/07/2009</td> <td>Ed Durrant</td></tr>
     791<tr><td>Various formatting improvements and clarifications</td>
     792    <td>2010-11-08</td> <td>Alex Taylor</td></tr>
     793<tr><td>Formatting improvements and clarifications, continued</td>
     794    <td>2010-12-11</td> <td>Alex Taylor</td></tr>
     795<tr><td>Added warning about the (hard-learned) pitfalls of prndrv -d</td>
     796    <td>2011-02-17</td> <td>Alex Taylor</td></tr>
     797<tr><td>Added links to table of contents</td>
     798    <td>2011-12-12</td> <td>Alex Taylor</td></tr>
     799<tr><td>Massive rewrite &amp; reorganization of content (with all new screenshots).  Converted to HTML.</td>
     800    <td>2011-12-17</td> <td>Alex Taylor</td></tr>
     801</table>
    178802}}}
    179 
    180  * Have a read of the \cups\readme.os2 before proceeding to get an idea of what you are going to do; especially if attempting to setup a USB printer.
    181 
    182  * If installing PRNDRV.EXE, put this file somewhere that you can find it; I put it into `J:\Programs\Utils\PrnDrv`
    183 
    184  * The `libc0*.dll` and `GCC*.dll` files should be put into a directory specified within the LIBPATH - either `\ecs\dll` or `\os2\dll` are good choices.
    185 
    186 
    187 '''Other files can be unzipped now or later as they are required as follows:'''
    188 
    189  * The eCups printer driver can be put into a directory of your choice.  You will then point the printer install dialog at this directory during the install process; OS/2 will then automatically copy the files to `\OS2\DLL\ECUPS' (which it will create if necessary).
    190 
    191  * The eCups printer port driver - copy `cupslpr.exe` into `\tcpip\bin` and `cups.pdr` into `\os2\dll`
    192 
    193 The Splix package should be installed in place of the Gutenprint package if you are installing one of the Splix-supported Samsung or Xerox printers; ditto for HPLIP.  '''Note:''' This how-to doesn't cover Splix or HPLIP usage yet.
    194 
    195 [[BR]]
    196 [[BR]]
    197 
    198 
    199 
    200 [=#configuration]
    201 == Configuration of CUPS Printer ==
    202 [[BR]]
    203 [[BR]]
    204 
    205 [=#parallel]
    206 '''Local printers - Parallel attached'''
    207 
    208 CUPS does not currently support printing directly to Parallel printers but there is a workaround.
    209 
    210 1] Create a Printer object using the Null printer driver and select the LPTn port as the Output Port in the printer object Properties
    211 
    212 2] Start the OS/2 lpd daemon (\tcpip\bin\lpd.exe). To prevent lpd.exe from printing the control file page (an almost blank page with few lines of information good only for debug purpose) specify also the "-c" parameter.
    213 
    214 
    215 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 Physical name of the OS/2 Printer object - as shown on the Properties, View page - created in 1] above. Note this may not be the same as the name given to the printer during creation.
    216 
    217 e.g.
    218 If you created a printer with the object name Canon iP4000 in the Printers folder open the Properties for that printer and check the name displayed on the View page - it shows CanoniP4 here. So in the above example the device URI should be
    219 
    220 lpd://localhost/CanoniP4
    221 
    222 
    223 Thanks to Rodney and others who supplied the above information regarding using locally attached printers with CUPS.
    224 
    225 [=#usb]
    226 '''Local printers - USB attached'''
    227 
    228 ''This set-up was performed on eComStation 2.0 RC6a. It has been reported that some older versions of the operating systems USB support files can cause problems, so please ensure you download and install the latest USB OS level support before you attempt this configuration. (ie http://en.ecomstation.ru/projects/usbtools/download/usbcalls-20060807.zip)''
    229 
    230 If you have a USB cable attached printer load the USB backend expand the zip file into the \cups\lib\cups\backend directory.
    231 
    232 '''Note''' I have been told that on the latest release of the CUPS package, the usb.exe file is included so you don't need to download it - so just make sure it is in the \cups\lib\cups\backend directory.[[BR]]
    233 
    234 
    235 Now go to this directory on the command line make sure your printer is turned on and run usb.exe with no parameters and you should get a display something like this:
    236 
    237 
    238 [J:\cups\lib\cups\backend]usb.exe[[BR]]
    239 
    240 INFO: list_devices
    241 INFO: usb_find_busses=1
    242 INFO: usb_find_devices=1
    243 INFO: open_device[[BR]]
    244 
    245 direct usb://HP/Officejet%206300%20series?serial=CN88TFB0P504J4&interface=1 "HP [[BR]]
    246 Officejet 6300 series" "HP Officejet 6300 series" "MFG:HP;MDL:Officejet 6300 ser [[BR]]
    247 ies;CMD:MLC,PCL,PML,DW-PCL,DESKJET,DYN;1284.4DL:4d,4e,1;CLS:PRINTER;DES:Q8061A;S [[BR]]
    248 N:CN88TFB0P504J4;S:038000C484001021002c1800007c2880011;J:                    ;Z: [[BR]]
    249 0102,0503d549016449,0600;BT:000000000000,4F66666963656A6574203633303020736572696 [[BR]]
    250 573,0000008F,60;" ""[[BR]]
    251 INFO: close_device
    252 
    253 
    254 If you don't get such a display, check that your USB support is working correctly and that you have connected the printer with a known good cable to a known good port.
    255 
    256 By putting usb.exe into the backends directory when cupsd.exe starts it knows that when asked by the web administration page, that it should check USB ports as well as network and other ports for new devices.
    257 
    258 
    259 
    260 [[BR]]
    261 [[BR]]
    262 
    263 
    264 [=#cupsprinter]
    265 '''CUPS printer install'''
    266 
    267 Start \cups\sbin\cupsd.exe
    268 
    269 I created a program object for this with the Start Minimized and Close Window on exit checked in the Properties, Session tab; the object Properties should also have the Working directory set as Drive:\cups\sbin (where Drive is the drive letter that cups is installed to). This object can be put in the Startup folder so that cupsd.exe is started automatically at bootup. [[BR]]
    270 You can of course also auto start this at boot-up by putting the following lines in \startup.cmd (or in the network startup file \MPTN\BIN\setup.cmd)  [[BR]]
    271  CD \cups\sbin [[BR]]
    272  start /min cupsd.exe[[BR]]
    273 
    274 
    275 I recommend using the CUPS browser 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.
    276 
    277 
    278 I added the following (network connected) 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
    279 
    280 Name: PIXMA  - what you want to call the printer
    281 
    282 Location: Router LPT1  - where it is physically located; ie connected to the Router's LPT1 port
    283 
    284 Description: Canon PIXMA iP4000 Inkjet - brief description of printer
    285 
    286 Continue -  click when happy with above section
    287 
    288 
    289 Device: Choose an appropriate selection for device connection:
    290 ie: LPD/LPR Host or Printer
    291     IPP
    292     for USB printers - the detected printer should be available for selection. For other types of attachment, more information will be required.
    293 
    294   *  Example: Device URI: lpd://192.168.2.1/lpt1 -  address of device for LPD printer
    295 
    296 Continue -  click when happy with above section
    297 
    298  
    299 Make: Canon -  select printer make - for USB printers, an attempt will be made to confirm the correct PPD file to use
    300 
    301 Continue -  click when happy with above section
    302 
    303 
    304 Model: Canon PIXMA iP4000 - CUPS+Gutenprint v5.2.0-beta3(en) Simplified -  select correct driver; Simplified recommended
    305 
    306 Add Printer -  click when happy with above section
    307 
    308 
    309 
    310 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."
    311 
    312 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.
    313 
    314 Well, that is the very easy bit finished...
    315 
    316 
    317  
    318 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:-
    319 
    320 
    321 [H:\cups\bin]lpr -P PIXMA \cups\share\cups\data\PReCS20.ps
    322 
    323 
    324 After a short wait the printer burst into action and delivered 2 pages of output that look fine.
    325 
    326 
    327 That is the next easy bit finished...
    328 [[BR]]
    329 [[BR]]
    330 [[BR]]
    331 
    332 
    333 [=#visual]
    334 '''Step by step visual CUPS printer setup in web admin program (USB or Network connected)'''
    335 
    336 
    337    First of all start your web browser and point it at http://localhost:631/ [[BR]]
    338 
    339 [[Image(http://farm4.static.flickr.com/3577/3436643257_e38665d10e_o_d.jpg)]]
    340    Now click on the administration tab[[BR]]
    341 
    342 [[Image(http://farm4.static.flickr.com/3569/3437450528_7126c08836_o_d.jpg)]]
    343    Then click on "Find new printers"[[BR]]
    344  
    345 [[Image(http://farm4.static.flickr.com/3319/3437450648_2dbf894e9e_o_d.jpg)]]
    346    In this case, as my printer is both connected to the network and connected by a USB cable to my PC, both connections are listed - select whichever you wish to set up at this point.[[BR]]
    347 
    348 [[Image(http://farm4.static.flickr.com/3590/3437450750_db6dd2236d_o_d.jpg)]]
    349 A description is already filled in for you, but feel free to change the text as you wish.[[BR]]
    350 
    351 [[Image(http://farm4.static.flickr.com/3341/3437450840_e744988fd1_o_d.jpg)]]
    352 Select the correct printer driver - in my case as my Officejet 6310 is not listed I use the OJ 7110 instead - I have found this works fine [[BR]]
    353 (you can always change this later to find the best match for your printer).[[BR]]
    354 
    355 [[Image(http://farm4.static.flickr.com/3602/3437451142_de474f285a_o_d.jpg)]]
    356 
    357 Set up the default printer options that you want to use.[[BR]]
    358 
    359 [[Image(http://farm4.static.flickr.com/3647/3437451248_429e9dca10_o_d.jpg)]]
    360 
    361 That's it ! You have now set up your printer under CUPS - press the send test page and hopefully you'll get a nice printout.
    362 The next stage is now to set up the OS/2 print object to print to the CUPS Daemon - see those details later in this documentation.
    363 
    364 [[BR]]
    365 
    366 [=#object]
    367 '''Creating a Desktop Printer Object to use with CUPS'''
    368 
    369 
    370 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).
    371 
    372 
    373 1] Unzip the eCUPS printer driver package (At time of writing ecups-20090323.zip) into \os2\dll\ecups - this avoids any problems with any existing postscript driver in \os2\dll\pscript.
    374 
    375 
    376 2] Either double-click the 'install printer' object in the printers folder and select local printer or Open the Desktop -> Templates folder and drag the Printer template to the Desktop to start the Create printer routine. Press the 'install new printer driver' button. Select 'other ecomstation printer driver'. Enter \os2\dll\ecups in the directory field and click Refresh in order to see the list of printers.
    377 
    378     Name the printer - PIXMA in this case
    379 
    380     Select the output port - I used LPT1 initially and installed the cups printer port later
    381 
    382     Select the (pscript) driver for the printer - Canon PIXMA iP4000
    383 
    384 
    385 3] Unzip the eCuPS printer port package (currently cupsportdriver-20090410.zip) putting the files into the following locations
    386 
    387         cups.pdr into \os2\dll
    388 
    389         cupslpr.exe into \tcpip\bin
    390 
    391 
    392 4] Right Mouse Button on the new Desktop Printer Object and select Properties
    393 
    394         Select Printer driver tab
    395 
    396         Check the Default printer driver is correctly selected
    397 
    398         Set Job Properties: Paper Size, Tray, Media Type, Resolution must match the settings in the CUPS printer - and Save
    399        
    400         Select Output port tab
    401 
    402         Click Install new port button
    403 
    404         Select the CUPS port and click Install
    405 
    406         each additional CUPS connected printer that you wish to install will get its own CUPS port CUPS1, CUPS2, CUPS3 etc.)
    407 
    408                 - if the port is not visible but the CUPS.pdr file is in \os2\dll click on install new port/New port drivers and set the
    409                   directory to \os2\dll and click Refresh. The CUPS port should appear, select this and press install.
    410 
    411         Right mouse button on CUPSx CUPSPORTx and select properties. The required settings for the CUPS port are
    412 
    413                 Host: localhost - or use 127.0.0.1
    414 
    415                 Printer: PIXMA  (this should be the same name as used for creating the CUPS printer in the CUPS admin above) press OK.
    416 
    417            Leave 'send as binary file" selected.
    418 
    419         Close Printer Properties
    420 
    421 
    422 That should be setup complete so time to print a test page
    423 
    424         Verify that cupsd.exe is running *Before* testing
    425 
    426         Drag'n'Drop \cups\share\cups\data\testprint.ps onto the new Desktop Printer Object
    427        
    428         Select Printer-specific in the following dialog
    429 
    430 
    431 You should get the CUPS Test Page printed from your OS/2 Desktop Printer Object
    432 
    433 
    434 The next test is to print a multiple page document from your favourite wordprocessor, followed by printing any other document types from an appropriate application, eg Photos from PMView, using your new OS/2 Desktop Printer.
    435 [[BR]]
    436 [[BR]]
    437 [[BR]]
    438 [[BR]]
    439 
    440 [=#obj_visual]
    441 '''Step by step visual OS2 printer object setup for a CUPS attached printer'''
    442 
    443 Open the printer folder and click on add printer:
    444 
    445 [[Image(http://farm4.static.flickr.com/3337/3436989266_00fa9c70df_o_d.jpg)]] [[BR]]
    446 
    447 Select local printer.
    448 [[Image(http://farm4.static.flickr.com/3323/3436183577_17d281496c_o_d.jpg)]] [[BR]]
    449 
    450 
    451 Click on install printer driver, click on "other printer driver location" and type in where you put the eCUPS printer driver (I suggested \OS2\DLL\CUPS earlier) - then press the refresh key. all the printers in the CUPS file will now appear, scroll down and select the printer driver for your printer (or a near model), and press Install.
    452 
    453 [[Image(http://farm4.static.flickr.com/3611/3436183847_1e8abb9473_o_d.jpg)]] [[BR]]
    454 
    455 Press OK to load the driver. Now change the printer name field to something reasonable from "printer" that is currently in the field and press the create key and your printer object will be created and the install dialog will close (but you haven't finished yet ....).
    456 
    457 [[Image(http://farm4.static.flickr.com/3654/3436990144_d857519403_o_d.jpg)]] [[BR]]
    458 
    459 Open the properties of your new printer object and select the "printer driver" tab, make sure the new driver is highlighted in both boxes.[[BR]]
    460 You can press the job properties button as this point if you wish but you'll find the settings are the same as you set when you created the printer in the CUPS admin webpage. If you look at the properties of the Printer driver you can also set some printer parameters. In general I leave these areas as they are.[[BR]]
    461 Now press on the "output port" tab and press install new port:
    462 
    463 [[Image(http://farm4.static.flickr.com/3656/3436184471_40b82f348f_o_d.jpg)]] [[BR]]
    464 
    465 Because you put the eCUPS Port Driver into OS2\DLL earlier, you will now get a whole lot of CUPS drivers to chose from - simply highlight CUPS1 and press "install"
    466 
    467 [[Image(http://farm4.static.flickr.com/3384/3436184959_519033b50d_o_d.jpg)]] [[BR]]
    468 
    469 Double click the new port driver and you will get its configuration panel - this is where we link the OS/2 print system to the CUPS print system! - The first field says "localhost" we will leave that as it is as the printer is connected to this PC - if it was connected to CUPS running on another PC, you could put that PCs IP address or hostname in here. What is important is the second field - this is the name of the printer within the CUPS configuration - you'll see I have loaded up the CUPS web admin page in manage printer to show you this - in this case the name is "HP_Officejet_6300_series". Press "save properties" and close the printer setup panels and you are finished. just to prove this ....
    470 [[Image(http://farm4.static.flickr.com/3647/3436990894_36f0ae82b6_o_d.jpg)]] [[BR]]
    471 
    472 
    473 Here is the printer dialog in Firefox with the new CUPS connected printer available to print the same as any other OS/2 printer !
    474 [[BR]]
    475 [[BR]]
    476 
    477 Have fun and thanks to Paul Smedley for all his good work !
    478