VOICE Home Page: http://www.os2voice.org | April 2003 [Newsletter Index] [Previous Page] [Next Page] [Feature Index] editor@os2voice.org

## Installing XFree86/OS2 4.3.0

By Christian Hennecke© April 2003

XFree86/OS2 4.x is available for download from Netlabs. The binary distribution consists of a number of ZIP files which are containing programs, servers, fonts, libraries, include files, man documentation pages and configuration files. The complete distribution requires 55MB space on your harddisk.

#### 1. Choosing the software

The XFree86/OS2 distribution only includes the "core" and no applications and consists of the following packages with their approximate size in brackets:

#### Required packages

- Bin (8MB) - all executables, both X client and supplementary tools, and documentation in man format
- Lib (8MB) - shared libraries and headers
- Fonts (10MB) - miscellaneous, Type-1, TTF, Cyrillic fonts
- Fonts75dpi (10MB) - 75dpi fonts
- X11 (5.7MB) - READMEs, documentation in HTML format, locale and xkb support and other stuff
- xf86cfg (380KB) - bug-fix for the graphical configuration program (in later versions this will be included in Bin)
- emxrt - EMX runtime library (only if you don't have EMX already installed on your system, download this from Hobbes)

In comparison to XFree86/OS2 3.3.x, there are no extra X server packages.

#### Optional packages:

- Fonts100dpi (11.5MB) - 100dpi fonts
- ncurses-5.3-os2 (1.34MB) - ncurses library, required for using the graphical configuration program xf86cfg in textmode (download from Hobbes

In order to save space on your disk and reduce net bandwidth, choose the software to obtain carefully.

#### 2. Pre-checking the compatibility of the video hardware

Of course it would be best, if you found out whether your particular video adapter is supported by XFree86/OS2 or not prior to downloading all the software. Information on supported chip sets is available at the Driver Status for XFree86 page. This information is also available in several files in the `\XFree86\lib\X11\doc\html` directory of the distribution, which can be found in the `X11.zip` archive.

In all cases, please take some time to carefully check the accompanying `README.*` file in the `Y:\XFree86\lib\X11\doc` directory for special precautions, options, or features of the card.

#### 3. Unpacking the archives

In the following we assume that you install XFree86/OS2 on drive `Y:` in the directory `Y:\XFree86`. Please adapt the commands and file entries according to your real choice. While naming the directory `XFree86` and placing it in the root of the drive was not necessary per se, but strongly recommended for previous version of XFree86/OS2, it is mandatory now! If you don't follow this standard, it may not work! Let's also assume that the XFree86/OS2 distribution's archives reside in a directory `X:\temp`.

CAUTION: The drive you install XFree86/OS2 to must support long filenames! If you want to use TVFS, do not install XFree86/OS2 4.x onto such a drive, but to the real drive instead, and use TVFS later when all configuration tasks have been finished.

1. Ensure that drive `Y:` supports long filenames and has sufficient free space (roughly 90 MB for the complete distribution).
2. Open an OS/2 command line, switch to the root of drive `Y:`, and unpack all archives which are located in `X:\xtemp` by issueing the command:

       unzip X:\xtemp\*.zip

3. During the unpacking process UNZIP may report that some files already exist. Don't worry and let UNZIP replace the files. (This is required for the bug-fixed version of `xf86cfg.exe` in `xf86cfg.zip` to replace the defective one in `Bin.zip`.) By entering `A` (in uppercase!) all subsequent files will be overwritten if they already exist without asking again.
4. No special sequence is required for unpacking the archives.

#### 4. Changing `CONFIG.SYS`

XFree86/OS2 requires a number of settings in `CONFIG.SYS` to work correctly. Please add the following changes to your `CONFIG.SYS` and in particular take care writing paths with slash "/" and backslash "\". You can transfer the settings with cut & paste and then adapt them to your system.

- `XF86SUP.SYS` - This driver is mandatory for XFree86/OS2 to work at all. It provides a number of system-related functions and is even quite useful if you don't run XFree86/OS2 because of its extended process-killing abilities. To make OS/2 load it at boot time add the following statement:

      DEVICE=Y:\XFree86\lib\xf86sup.sys

- `TERM` - Set the preferred terminal type for the xterm or editor to be used. Some programs require this setting. For use with XFree86/OS2 try

      SET TERM=xterm

  or

      SET TERM=xterm-color

  to add some nice colors. `\XFree86\lib\X11\etc\xterm.termcap` contains a suitable termcap file for the above definitions, which can be used in place of termcap files which come with EMX, EMACS, or other ported software.

  CAUTION: Using this file outside of XFree86/OS2, e.g. with normal ported Unix applications will most likely result in an unreadable display. Use e.g. the termcap file which is provided with EMX instead and the following setting:

      SET TERM=ansi

  On the other hand, with the termcap file from EMX you won't be able to use all keys in an xterm. You can switch between those files and settings by changing them from the command line, running a script before starting XFree86/OS2, or modifying XFree86/OS2's startup files.

- `TERMCAP` - This variable must contain the path to the termcap file which is used for the above `TERM` setting. If you want to use `xterm.termcap` which comes with XFree86/OS2, the correct setting is

      SET TERMCAP=Y:/XFree86/lib/X11/etc/xterm.termcap

  Note the usage of "/" as path separator.

- `TERMINFO` - Only required if you want to use the graphical configuration program in textmode which requires the ncurses library. This variable points to the directory tree with terminal descriptions for said library. If you extracted the packages as described above, the correct setting is

      SET TERMINFO=Y:/share/terminfo

- `ETC` - Normally, this variable already points to the TCP/IP `ETC` directory. For Warp 4 e.g.

      SET ETC=C:\MPTN\ETC

  may be set. This setting is OK.

- `TMP` - Set this to a TMP directory for temporary files which should reside on a HPFS formatted drive. (Instead of HPFS you can also use other file systems which support real long names like JFS, ext2fs or NFS.) Often this variable has already been set by other software to something like

      SET TMP=C:\IBMCPP\TMP

  In most cases, you can leave it this way. However, some packages require that the `TMP` directory is called `TMP` and resides in the root of the drive which XFree86/OS2 has been installed to.
- `HOSTNAME` - Set this to your hostname. Normally, this is already set by the TCP/IP installation program, e.g. to

      SET HOSTNAME=myhost

  With the IAK or TCP/IP without a networking card, you should activate the loopback interface (refer to Network configuration) and set this to the following:

      SET HOSTNAME=localhost

- `USER`, `LOGNAME` - Set both to a user name or your network login-ID. Some programs like e-mail or IRC clients require this setting.
- `HOME` - This entry determines the home directory for your user ID in which programs place their user specific data on Unix. If your user ID is e.g. `myuserid` a good choice would be

      SET HOME=Y:\home\myuserid

  CAUTION: The directory which you specify here must exist! Otherwise, applications are likely to crash.

- `X11ROOT` - This is one of the most important settings. It determines the root of the XFree86 directory tree. This must be set to the drive letter of the partition where the `\XFree86` tree begins. In this case where we assume `Y:\XFree86` the correct setting is

      SET X11ROOT=Y:

- `DISPLAY` - This variable chooses the display to be used for displaying X clients. Normally, it is set to the same value as `HOSTNAME` with a `:0.0` (zeroes!) appended, like in

      SET DISPLAY=myhost:0.0

  Read the X11 man pages for the exact meaning and more options.

  For local applications (i.e. ones which are running on the same machine) performance can be much improved by using the OS/2 pipe transport mechanism. To do so, use either of the following statements:

      SET DISPLAY=local/myhost:0

  or

      SET DISPLAY=:0

- `XSERVER` - This variable must point to the program name of the X server to be used, with the setting being a complete path. In contrary to versions prior to 4.x, there is now one X server only, so the correct entry is always:

      SET XSERVER=Y:\XFree86\bin\XFree86.exe

- `PATH` - Add the directory which the X11 programs reside in to your path. This is normally the `\XFree86\bin` directory, in this case `Y:\XFree86\bin`. If you didn't have EMX installed on your machine, you also have to add `Y:\emx\bin`.
- `LIBPATH` - The XFree86/OS2 DLL directory is `\XFree86\lib` and should not be changed, since it contains several subdirectories that are referred to by using `%X11ROOT%\XFree86\lib` as a base. In our example this would be `Y:\XFree86\lib`. If you didn't have EMX installed, you will need to add `Y:\emx\dll`, too.
- `MANPATH` - If you want to use xman or man to view the man pages, this variable has to point to the directories with man pages. Subdirectories will be taken into account automatically. Like with the `PATH` variable more than one entry is possible. For instance:

      SET MANPATH=Y:\XFree86\man;Y:\man;Y:\emx\man

  CAUTION: xman or man alone might not be sufficient to view the different Unix man pages. You should also install GNU groff (refer to e.g. »Setting up a Unix-like environment« at The OS/2 Files).

- `OS2_SHELL, COMSPEC, SHELL, X11SHELL` - Some XFree86 scripts rely on a shell which is compatible to the standard OS/2 command processor. CMD.EXE has some essential properties which allow it to work correctly in an xterm. Third party shells may directly access keyboard and video services and not accept input/output via stdin/stdout. The above variables allow reconfiguration of your system in order to run any favorite shell outside XFree86 and still have XFree86 use CMD.EXE by setting `X11SHELL=CMD.EXE`.
  On the other hand it is often desirable to use Unix shell scripts under XFree86/OS2. This is often mandatory for e.g. compiling software. However, CMD.EXE is not capable of executing these scripts. For these tasks the port of the Public Domain Korn Shell or pdksh is strongly recommended, as it is also capable of recognizing REXX scripts and handing them on to CMD.EXE.
  A suitable setting would be

      SET X11SHELL=Y:/bin/ksh.exe

  For more information about this topic please refer to »Setting up a Unix-like environment« at The OS/2 Files.

- `EMXOPT` - This setting defines how EMX behaves in a number of situations. XFree86/OS2 and many applications which you may want to use (e.g. GIMP) require a large number of files to be opened during operation. By default, EMX only allows a smaller number of open files and may run out of file handles, if you try to run XFree86/OS2. To increase this number specify it using the "-h" parameter. A suitable number would be 256 and above, as in:

      SET EMXOPT=-h256

  If an application crashes or refuses to run without reason, try increasing this number.

Be sure to double-check that everything has been entered correctly. The X server itself will do some checking and will refuse to start, if something is wrong.

#### 5. Network configuration

It is beyond the scope of this document to even give an introduction to the correct installation of the TCP/IP networking system. You must do this yourself or seek assistance elsewhere. It is only possible to say here that a PC which is working well in a TCP/IP based LAN network will also work with XFree86/OS2 (when all other prerequisites are matched as well). You may want to check OS/2 internet publications like OS/2 eZine, the VOICE Newsletter, or Walter Metcalf's archive of Focus on OS/2 articles.

In any case, you should configure and activate the so-called loopback interface, which can be used for contacting the same machine via network internally. Dependent on the version of OS/2 this can be done differently. Otherwise you will have to establish a network/internet connection and have to fight problems with dynamic IPs.

1. Create a `hosts` file in the directory which the `ETC` variable points to. Add the line

       127.0.0.1  localhost

   to the file. This line must end with RETURN/`<ENTER>`.

2. If you don't have a correctly installed networking card, add

       SET HOSTNAME=localhost

   to `CONFIG.SYS`. Take care of the connection to the `DISPLAY` variable.

3. Add the following line to your `CONFIG.SYS`:

       SET USE_HOSTS_FIRST=1

   That way the file `hosts` is searched first upon resolving domain names instead of immediately connecting to a domain name server.

4. Activate the interface. Depending on which version of OS/2 you use, this has to be done differently:

   If you use Warp 3 and the IAK, add the following line to the file `\tcpip\bin\tcpstart.cmd`:

       ifconfig lo 127.0.0.1 up

   On Warp 3 Connect and Warp 4 machines the file is called `\MPTN\BIN\MPTSTART.CMD`. If such a file does not exist, create one and add the line

       CALL=C:\OS2\CMD.EXE /Q /C C:\tcpip\bin\tcp-start.cmd >NUL:

   (or `MPTSTART.CMD`, respectively) to your `CONFIG.SYS`.

   Using Warp 4 or later you can also activate the interface more conveniently by opening the TCP/IP Configuration (LAN) object, selecting the notebook page Network, selecting loopback interface for configuration and ticking the configuration option Activate interface. The entry field IP Address must contain the 127.0.0.1 address.

5. Reboot. Now check the new configuration. Open an OS/2 command line and enter the following command:

       ping localhost

   If all is correct, the values for "time" should be 0 seconds each. Terminate the program after some time by pressing `<CTRL-C>`. A packet loss of 0% should be displayed.

#### 6. Configuring X for your hardware

Now XFree86/OS2 has to be adapted for your hardware, i.e. the video adapter, the monitor and the keyboard. For this the horizontal sync rates and vertical refresh rates of your monitor and data about your keyboard (number of keys, country version) are required. If your monitor supports DDC, as will be most probably the case with modern monitors, XFree86/OS2 will be able to detect its capabilities automatically. Otherwise you will need to get the values from your monitor's manual.

Configuration can be done in a number of different ways. In the following the most convenient is described.

1. First you need to create an initial configuration file and see if the X server detects your hardware. Open an OS/2 window, switch to the drive where XFree86/OS2 is installed, and issue the following command:

       xfree86 -configure

   The screen will go black, some text will scroll by and then the desktop should reappear after a short time. If it does not do so, press `<CTRL-ALT-BACKSPACE>` to kill the X server. If that still does not work, you will have to reboot the machine by pressing `<CTRL-ALT-DELETE>` and ask for help.

2. Take a look at the file `Y:\usr\adm\XFree86.0.log`. If your CONFIG.SYS and network settings are correct, you will see that the server loaded a large number of modules to detect your hardware. Otherwise it should complain about certain variables not being set and the like. Scroll to the bottom of the file. You should see some messages from the driver for your chip. A typical output for a Matrox G400 card would look like this:

       (II) MGA(0): VESA BIOS detected
       (II) MGA(0): VESA VBE Version 3.0
       (II) MGA(0): VESA VBE Total Mem: 16384 kB
       (II) MGA(0): VESA VBE OEM: Matrox Graphics Inc.
       (II) MGA(0): VESA VBE OEM Software Rev: 2.1
       (II) MGA(0): VESA VBE OEM Vendor: Matrox
       (II) MGA(0): VESA VBE OEM Product: Matrox G400
       (II) MGA(0): VESA VBE OEM Product Rev: 00

   If your monitor supports DDC, you should also see something like the following:

       (II) Loading sub module "ddc"
       (II) LoadModule: "ddc"
       (II) Loading j:/XFree86/lib/modules/libddc.a
       (II) Module ddc: vendor="The XFree86 Project - XFree86/OS2"
       compiled for 4.3.0, module version = 1.0.0
       ABI class: XFree86 Video Driver, version 0.6
       (II) MGA(0): VESA VBE DDC supported
       (II) MGA(0): VESA VBE DDC Level 2
       (II) MGA(0): VESA VBE DDC transfer in appr. 1 sec.
       (II) MGA(0): VESA VBE DDC read successfully

   If DDC is not reported to be supported, you will need to provide the information about your monitor's capabilities yourself (get them from your monitor's manual).

   Last, you should see a message that a new configuration file called `XF86Config.new` has been written to your `HOME` directory.

3. If the log file shows no errors and the detected hardware matches your real one, copy the file `XF86Config.new` from your `HOME` directory to `Y:\XFree86\lib\X11`.

Now we need to use XFree86's new configuration program. It offers both a GUI and a plain menu-driven textmode interface, each of which have their advantages. While the GUI provides more options and flexibility, the textmode version has less "distractions" and does not require the X server to be running. Note however, that the textmode version requires the ncurses library to be installed correctly. So if you aren't sure that the X server has detected your hardware correctly, you may want to use the textmode version and continue with chapter 6.2.

#### 6.1 Using the graphical interface

In the following, the behaviour of GUI elements is different from standard OS/2. To invoke any pop-up menus and select items from them or menu bars, you need to click and hold the mouse button!

4. It is time to start the X server. Open a command line, switch to the XFree86/OS2 drive, and start the X server by issueing the following command:

       startx

   The screen should go black with some text displayed for a short time. Then the system should switch to graphics mode and you should see a black "X" cursor on a grey pattern background. Some seconds later, you should notice some hard disk activity and two windows should appear, one with a command line prompt on the top left and a clock on the top right.

   WARNING: If this does not happen and you see a distorted display or your monitor starts making strange noises, press `<CTRL-ALT-BACKSPACE>` to kill the X server immediately! Otherwise your hardware may get damaged.

   Note: Depending on the detected hardware's capabilities, the X server might start at an enormously high, interlaced resolution. While this is not good for your eyes, it shouldn't pose any problems for your hardware.

5. Click on the command line window and start the graphical configuration program:

       xf86cfg

   Then the outline of the configuration programs window will be displayed for you to determine where to display the full window. Place it anywhere you can view the complete content. The command line window will display a large number of messages about modules being loaded. Unless the program crashes completely, it is safe to ignore any error messages about not loadable modules.

6. XFree86/OS2 always uses the OS/2 mouse driver, so there is no reason to change the mouse settings. Actually, changing them to anything else than `OS2Mouse` is likely to cause problems.
7. Right-click on the keyboard icon in the layout display and choose the configure item from the pop-up menu. In the keyboard configuration dialog, select your keyboard from the keyboard model drop-down list. Most people, who own a keyboard with Windows keys, may want to select one of the Generic 104-key PC or Generic 105-key (Intl) PC models. Then select your language-specific layout from the keyboard layout drop-down list. Note that this only specifies the keyboard's layout, not any internationalization support. Confirm the changes and leave the dialog by pressing Ok.

8. If your monitor does not support DDC, right-click on the monitor icon and select configure. This will bring up the monitor configuration dialog. There you need to specify horizontal and vertical refresh rates. You can do this by either clicking on one of the predefined values (clicking on the descriptive entries in the list for horizontal refresh rates will result in the accompanying rate range being displayed in the entry field above), or by manually specifying ranges in the respective entry fields.

   WARNING: Wrong values can result in damaging your monitor! If you are in doubt about your monitor's capabilities, it is safer to select lower rates.
   CAUTION: When specifying decimal values, always use a dot as separator, no comma!

   Example: An old SONY Multiscan 15sf is not capable of DDC and has a horizontal refresh rate range of 31.5 - 64 kHz. The list entry Monitor that can do 1280x1024 @ 60Hz equals a range of 31.5 - 64.3 kHz. Being the cautious type we don't select that entry, but define my our range by entering the according values in the entry field. The SONY's range for vertical refresh rates is 50 - 100 Hz, so it's safe to select the 50 - 100 item.

   Confirm the changes and leave the dialog by pressing OK.

9. If the X server didn't detect the hardware correctly, or you want to change the video adapter definition for some reason, right-click on the video adapter symbol and select configure. The configuration dialog will present you with a large scrollable list of chips. If you only want to choose from the models of a certain vendor, type in the chip name in the Card model filter entry field and press `<ENTER>`. Note that you will have to specify the chip's ID, not the vendor name. Matrox won't work, for instance, but mga does. After you have selected a card model from the list, the dialog automatically selects the appropriate driver from the Driver drop-down list. You can also select the driver directly yourself, of course. Confirm the changes and leave the dialog by pressing OK.

   Example: For a Matrox G400 Double Head with 16 MB of video RAM, scroll down to and select mga mgag400. The rest should be detected automatically on startup.

   Depending on the video chip in your hardware, the XFree86 drivers often offer a number of special options to enable or configure support for advanced features. Normally, you don't need to change any of these options.
   To set these options, right-click on the video adapter symbol and select options. A dialog will show up which allows you to select from the options which are available for the current driver. For details about the available options, see the HTML files in `Y:\XFree86\lib\X11\doc\html`. These files follow the `<driver_name>.4.html` naming scheme.

10. Next, we need to specify some screen resolutions and color depths for XFree86/OS2 to run at which don't hurt our eyes. Click on the Configure layout item in the menu bar and select Configure screen. (To get back to the main menu, select Configure screen in the menu bar and select Configure layout.)

    Right-click on the monitor symbol and select configure. The default color depth of 8 bit resembles 256 colors, which is too few for most of today's applications. Choose 16 bit for 65536 colors or 24 bit for 16.7 million colors. If required, you can still start the X server at a different color depth via a command line option later. The left pane below shows the scrollable list of available resolutions, while the right pane shows the selected ones. With the arrow buttons in the middle you can add resolutions to or remove resolutions from the right and move them up or down in the right list.

    The list of resolutions on the right defines the resolutions which the X server will be able to use at a given color depth. The topmost resolution will be the default resolution which the X server uses upon startup. If later while running XFree86/OS2 you should feel the need to use another of the other resolutions in the list, e.g. to play a game which requires a resolution of 640x480, or to work with some graphical application which consumes a lot of screen real estate, press the key combination `<CTRL-ALT-+>` or `<CTRL-ALT-->` (+/- from the numeric key block only) to cycle through the list of defined resolutions.

    CAUTION: Note that xf86cfg creates the necessary entries in XF86Config for the default color depth only! If you start the X server at another color depth, don't be surprised, if it used another resolution. To workaround this problem, make a color depth which you want to setup resolutions for the default, setup the resolutions, and close the dialog by pressing Ok. Then re-open the dialog and repeat the same for the next color depth. When you have configured all color depths, open the dialog a last time, mark the default color depth, and close the dialog again by pressing Ok.

    Example: For a 19" monitor a good choice would be to use 1280x1024 as default resolution (at the top of the right list). If you like to play a game now and then and the game is not able to use more than 640x480 pixels, add 640x480. Then you can switch to 640x480 by pressing `<CTRL-ALT-+>` whilst running at 1280x1024.

    Confirm the changes and leave the dialog by pressing OK.

11. To leave the configuration program, select Quit. In the confirmation dialog, you can finally choose whether to save the changes or not and to which file. If everything is OK, select Yes to save the main configuration file `XF86Config`. Otherwise select No to quit without saving or Cancel to continue with configuration.

    If you press Yes, another confirmation for the keyboard settings file with the same choices will appear. Press OK to save settings and quit the program.

12. To enable the changes, you need to terminate and restart XFree86/OS2 now. Close the command line window by entering

        exit

    Finally, quit the window manager session (and thereby XFree86/OS2) by right-clicking on the desktop background and selecting Exit.

Please continue with chapter 7.

#### 6.2 Using the textmode interface

While the textmode interfaces offers graphical menus, it does not support the mouse. Navigation is done with the arrow keys, checkboxes are selected by pressing the space bar, and control elements which have the focus (colored blue) are activated by pressing `<ENTER>`.

4. Open an OS/2 command line and switch to the drive where XFree86/OS2 is installed. Then start the configuration program by entering:

       xf86cfg -textmode

   You will see a lot of messages regarding the loading of modules scroll by. Unless any severe error occurs, you should see the following welcome message:

5. XFree86/OS2 always uses the OS/2 mouse driver, so there is no reason to change the mouse settings. Actually, changing them to anything else than `OS2MOUSE` is likely to cause problems.
6. Select the Configure keyboard menu item by pressing the down-arrow key and press `<ENTER>` to confirm your selection. This will invoke the Keyboard configuration menu:

   Select Edit Keyboard0 and press `<ENTER>` to edit the keyboard definition. The Keyboard model dialog lets you select your type of keyboard. Note that the list of available models is very long. Scroll with the up and down arrow keys to see which menu item suits your keyboard best.

   Most people who own a modern standard keyboard with Windows keys will want to select one of the Generic 104-key PC or Generic 105-key (Intl) PC models. Select your preferred item and press `<ENTER>`.

   Then select your language-specific layout from the Keyboard layout list. Note that this only specifies the keyboard's layout, not any internationalisation support.

   Confirm your selection and finish keyboard configuration by pressing `<ENTER>`.

7. If your monitor does not support DDC, select the Configure monitor item and press `<ENTER>`. This will bring up the Monitor configuration dialog:

   To configure your monitor, select Edit Monitor0 and press `<ENTER>`. This brings up the Monitor HorizSync dialog, where you need to specify the range of horizontal sync rates which your monitor is capable of. You can do this by either selecting one of the predefined values (the values of the beginning of each line specify the rate, rates, or range of rates), or by selecting Enter your own horizontal sync range to manually specify the range.

   Next we need to specify the vertical refresh rates in the Monitor VertRefresh dialog. You can do this by either selecting one of the predefined ranges, or by selecting Enter your own vertical sync range to manually specify the range.

   WARNING: In both cases, wrong values can result in damaging your monitor! If you are in doubt about your monitor's capabilities, it is safer to select lower rates.
   CAUTION: When specifying decimal values, always use a dot for separation, no comma!

   Example: An old SONY Multiscan 15sf is not capable of DDC and has a horizontal refresh rate range of 31.5 - 64 kHz. The list entry Monitor that can do 1280x1024 @ 60Hz equals a range of 31.5 - 64.3 kHz. Being the cautious type we don't select that entry, but define our own range by selecting Enter your own horizontal sync range and entering the according values in the entry field and pressing `<ENTER>`:

   The SONY's range for vertical refresh rates is 50 - 100 Hz, so it's safe to select the 50 - 100 item and finish with `<ENTER>`.

8. If the X server didn't detect the hardware correctly, or you want to change the video adapter definition for some reason, select Configure card and press `<ENTER>`. This brings up the Card configuration dialog which asks whether you want to select your card from a large database of video card definitions:

   The database of video card definitions provides a convenient way to choose the appropriate drivers. So unless you have some very new or exotic stuff, select Yes with the arrow keys and press `<ENTER>`.

   The Card database dialog presents you with a large scrollable list of video chip sets. Note that chip IDs are listed only, not the vendor name. Looking for Matrox won't work, for instance, but mga does. You can also jump to the first chip name that begins with a certain character by pressing the according key.

   Example: For a Matrox G400 Double Head with 16 MB of video RAM, scroll down to and select mga mgag400. The rest should be detected automatically on startup.

   When you select a card, the dialog will automatically select a suitable driver in the following Card driver dialog:

   If you think that xf86cfg did not select the correct driver, you can still change it by selecting from the scrollable list. The vga driver should always work, but it is very slow and only works at a resolution of 320x200.

   Finally, you need to specify the card bus ID. Do not change this field unless you have more than one video card and simply finish by pressing `<ENTER>`.

9. Next, we need to specify some screen resolutions and color depths for XFree86 to run at which don't hurt our eyes. Select Configure screen to bring up the Screen configuration dialog:

   Select Edit Screen0 and press `<ENTER>` to bring up the Screen depth dialog. There you can specify which color depth you want XFree86/OS2 to use by default. The default color depth of 8 bits resembles 256 colors, which is too few for most of today's applications. Choose 16 bits for 65536 colors or 24 bits for 16.7 million colors. If required, you can still start the X server at a different color depth via a command line option later.

   The list of resolutions in the Screen modes dialog defines the resolutions which the X server will be able to use at a given color depth. Select all resolutions you want to use by highlighting them and pressing the space bar. The highest selected resolution will be the default resolution which the X server uses upon startup. If later while running XFree86/OS2 you should feel the need to use another of the other resolutions in the list, e.g. to play a game which requires a resolution of 640x480, or to work with some graphical application which consumes a lot of screen real estate, press the key combination `<CTRL-ALT-+>` or `<CTRL-ALT-->` (+/- from the numeric key block only) to cycle through the list of defined resolutions. Finish your selection by pressing `<ENTER>`.

   CAUTION: Note that xf86cfg creates the necessary entries in XF86Config for the default color depth only! If you start the X server at another color depth, don't be surprised, if it used another resolution. To workaround this problem, make a color depth which you want to setup resolutions for the default, setup the resolutions, and finish. Then re-open the dialog and repeat the same for the next color depth. When you have configured all color depths, open the dialog a last time, mark the default color depth, and finish setup again.

   Example: For a 19" monitor a good choice would be to use 1280x1024 as default resolution. If you like to play a game now and then and the game is not able to use more than 640x480 pixels, add 640x480. Then you can switch to 640x480 by pressing `<CTRL-ALT-+>` whilst running at 1280x1024.

10. To leave the configuration program, select Write XF86Config and quit. In the confirmation dialog, you can finally choose whether to save the changes or not and to which file:

    If everything is OK, select OK to save the main configuration file XF86Config. Otherwise select Cancel to return to the main menu.

#### 7. Starting the X server

Now you can start XFree86/OS2 from a command line via:

    startx

If you prefer another color depth than the default, enter the following for e.g. 16 bit:

    startx -- -depth 16

It is recommended to create a program object for XFree86/OS2 on your desktop. Enter the following for Path and filename:

    Y:\XFree86\bin\startx.cmd

And for Parameters:

    -- -depth <color_depth> 2>Y:\xerror.log

with `<color depth>` being the bit value for the preferred color depth. The parameter `2>Y:\xerror.log` redirects the error output of the X server to the file `Y:\xerror.log`, so you can get some hints on problems, just in case.

#### 8. Changing the Window Manager

By default XFree86/OS2 uses twm as Window Manager. Since especially twm offers only very basic features, you'll probably soon consider using another Window Manager. To activate your new alternative, copy the file `XINITRC.CMD` which normally resides in `Y:\XFree86\lib\X11\xinit` to your `HOME` directory, open it in an editor and replace the line `'twm'` by `'your_window_manager_executable'`, e.g. `'enlightenment'`. The single quotes are not optional! XFree86/OS2 will find the changed file upon startup and use it instead of the original one in `Y:\XFree86\lib\X11\xinit`.

Parts of this text have been taken from the `README.OS2` file contained in the XFree86/OS2 3.3.x distribution, © Holger Veit.

References: XFree86/OS2 4.3.0 Developer: Frank Giessler, Holger Veit (OS/2 port) Price: Freeware Software XFree86/OS2 4.3.0 distribution: ftp://ftp.netlabs.org/pub/xfree86 EMX run-time: http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip ncurses library: http://hobbes.nmsu.edu/cgi-bin/h-search?key=ncurses&pushbutton=Search Ported software: http://os2ports.com XFree86/OS2-related sites XFree86.org web site (documentation, source code): http://www.xfree86.org Holger Veit's XFree86/OS2 home page (FAQ): http://ais.gmd.de/~veit/os2/xf86os2.html XFree86/OS2 mailing list: http://borneo.gmd.de/mailman/listinfo/xfreeos2 The OS/2 Files (information and tips): http://www.os2world.com/os2files/index_d.html Information about networking OS/2 eZine: http://www.os2ezine.com Focus on OS/2 archive: http://members.rogers.com/wfmetcalf/OS2_Treasury/Articles/

[Feature Index]
editor@os2voice.org
[Previous Page] [Newsletter Index] [Next Page]
VOICE Home Page: http://www.os2voice.org