Installing The GIMP on XFree86OS/2

By Christian Hennecke

1. Requirements
The GIMP is a software package that has been ported from Unix. It also uses the GIMP toolkit (GTK) for its graphical user interface. As a result, it requires emx 0.9d fix 3 or later and XFree86/OS2 (or another X server like Exceed or HOBLink X11) to run. This site also contains a extensive installation guides for XFree86/OS2 3.3.x and 4.x, as for EMX please refer to the included, well-written installation manual. For XFree86/OS2 an accelerated X server that is capable of 16 bit to 32 bit colour depths is highly recommended. Note that the XSVGA server does contain excellent acceleration support for some cards, e.g. Matrox ones. If you want to make use of True Type fonts XFree86/OS2 3.3.x, you will need to run a special font server or use the GIMP Freetype plug-in. GIMP runs on Warp 3 with Fixpak 17 or later, Warp 4 with Fixpak 5 or later and WSeB. You will also need quite a lot of RAM, as always if you want to do serious image processing. Try 64MB for a start.

The GIMP distribution comes in several archives that can be obtained from birdy.os2.ru. You will also need several basic libraries for GIMP to work, which you can also download from there. (In case you wonder why: These are libraries that are installed by default on most Linux systems, so it's only natural to use them.) The GIMP Freetype plug-in is available from the files section of the GIMP/2 mailing list at Yahoo groups: http://groups.yahoo.com/group/gimp-os2

The version number mentioned below were the latest available at the point of the release of The GIMP 1.2.1. Don't hesitate to download archives with higher numbering.

1.1 The GIMP distribution
Mandatory files
 * gimpb121.zip - Binaries
 * gimpd121.zip - Data files

Optional files
 * gimpdextra121.zip - Additional data files (brushes, patterns...)
 * gimpe121.zip - Additonal plug-ins like xscanimage (frontend for SANE)
 * gimp-freetype.exe - Plug-in for using Type-1 and True Type fonts with anti-aliasing, no special font server for TTFs required
 * gimpp121.zip - Include files and libraries for programmers

1.2 Libraries and helpers
Note: Depending on where you download the archives, names can be different. birdy.os2.ru offers DLL-only archives that can save you some time if you are not a developer.

Mandatory files
 * gettext.zip - GNU gettext internationalization library
 * glib128.zip - GLib (required by the GIMP toolit)
 * gtk128.zip - The GIMP toolkit (GUI library)
 * shmdll.zip - Shared memory DLL, required for XFree86/OS2 older than 3.3.6
 * zlib113.zip - compression library

Optional, but highly recommended files
 * gnomelibs1053.zip - GNOME libraries, required for the GIMP online help!
 * jpeg6b.zip - library for the JPEG image format
 * libpng102.zip - library for the PNG image format
 * tiff34.zip - library for the TIFF image format

Optional files
 * bzip2.exe - bzip2 file compressor, required to load and save images with *.bz2 extension (better compression rates than gzip)
 * gifdll.zip - library for GIF image format (Note: GIMP won't save GIF files due to the licence policy by Unisys.)
 * gimpm118.zip - The GIMP manual in HTML format (18MB!)
 * gzip124.zip - gzip file compressor, required to load and save images with *.gz extension
 * mpeg121.zip - library for the MPEG format
 * sane101b1.zip or later - required for the xscanimage plug-in to work (using it you can directly scan images into GIMP)

2. Installation
In the following it is assumed that you have emx and XFree86/OS2 correctly set up. Installation is pretty straightforward.

1. Check your CONFIG.SYS file for a SET EMXOPT statement. Make sure there is one that says at least: SET EMXOPT=-h1024 Note that the parameter is case-sensitive!

2. If you have used a version of GIMP that is older than 1.2.0, delete the \XFree86\lib\X11\.gimp-1.1 tree or the corresponding one for the 1.0.2 version first.

3. Create a temporary directory and place all GIMP packages and libraries you want to install therein.

4. Open an OS/2 command line window and change to the above mentioned temporary directory.

5. Unpack all archives to your X11ROOT path. That's the directory in which the XFree86 directory resides, usually the root of the drive. If XFree86 is installed in e.g. E:\XFree86, enter: unzip *zip -d e:\

WARNING: If you don't use the DLL-only library archives from birdy.os2.ru, chances are that those archives' directories start below the \XFree86 directory. In this case place those files in another temporary directory and enter the following to unpack them: unzip *zip -d e:\XFree86

6. Unpack the compression software bzip2 or gzip to a temporary directory and place the executables in your PATH.

7. To enable the Freetype plug-in, decompress it with bzip2 -d gimp-freetype.exe.bz and copy the resulting executable to the \XFree86\lib\X11\.gimp-1.2\plug-ins directory.

8. To install SANE, follow the README in that package and Franz Bakan's tips for setting up SANE.

You need to add an entry to your CONFIG.SYS that points to a directory .sane in your HOME directory, e.g. SET SANE_CONFIG_DIR=e:\home\os2user\.sane The library LIBSANE.DLL needs to be in your PATH for xscanimage to find it and it needs a configuration file DLL.CONF in the configuration directory mentioned above that depending on your scanner must (or doesn't need to) explicitly point to its address, i.e. b1t6l0 if the scanner is on bus 1, has SCSI-ID 6 and LUN 0. If you need further help, try the mailing list at Yahoo groups: http://groups.yahoo.com/group/sane-os2

9. CAUTION: Unfortunately, the plug-in archives are not updated with every new release of The GIMP. The problem is that they require the presence of certain GIMP DLLs whose names change with every new GIMP release! So if you install The GIMP 1.2.1, but you (have to) use the plug-in package gimpe120, the plug-ins included won't work unless you had installed the corresponding previous version of GIMP and you haven't deleted its DLLs yet. If this is not the case, you will have to get the old DLLs from somewhere, e.g. an old gimpd archive, which is very large unfortunately. Visit Team OS/2 Region Trier's GIMP archive at http://cip.uni-trier.de/thielen/teamos2/gimp_a/.

To find out which DLL is missing, change to the E:\XFree86\lib\X11\.gimp-1.2\plug-ins directory and start the offending plug-in from the command-line. You should see a message of the following kind: SYS1804: File GIMP1130 not found. So the missing file is GIMP1130.DLL. If the plug-in should require additional missing DLLs, you will have to repeat this step after having made available the previously missed DLL. You can save a lot of time by using the tool "ldd" that is capable of finding out all DLLs a program requires and of detecting if they can be loaded correctly.

Congratulations, you have finished your part of the GIMP installation. Now start XFree86/OS2, open a shell terminal and type: gimp121 Now GIMP should start up and initialize. It's a good idea to copy or rename gimp121.exe to gimp.exe, so other programs can find it. Just make sure you don't forget to repeat this for the next version you install!

3. Using GTK themes
Like other GTK applications GIMP is capable of using GTK themes. However, there are some differences. By default, GIMP only uses some of the elements of themes. Certain images, for instance, are usually ignored. This can be quite useful, since some themes can make GIMP's icons unreadable. To make GIMP use GTK themes like any other GTK app, shut it down, copy your .gtkrc file from your HOME directory to \XFree86\lib\X11\.gimp-1.2 and rename it as gtkrc (note the missing dot?). Now fire up GIMP and see what has changed.

WARNING: Themes are very demanding of your hardware. Be sure to have at least 128MB RAM if you want to use them and still be able to edit some larger images. Moreover, due to the client-server architecture of XFree86, themes create a lot of additional network traffic. This will result in extremely prolonged startup times and slow operation through the bank if you use HOBLink X11 or Exceed as X server on your local machine, or you run GIMP on a remote machine.

4. Getting help
If it still doesn't work, you think that you've discovered a bug, or you just want to say 'Thank You' to the people who ported the package there is a mailing list for GIMP on OS/2 at Yahoo groups: http://groups.yahoo.com/group/gimp-os2