## Motif System Driver

Driver for the X-Windows/Motif 2.x environment.

### Environment Variables

DEBUG

This variables existence makes the driver operate in synchronous mode with the X server. This slows down all operations, but allows immediately detecting errors caused by X.

### Default Values Resource Files

Some default values used by the driver, such as background color, foreground color and font, can be set by the user by means of a resource file called "Iup". It must be in the users home or in a directory pointed to by the XAPPLRESDIR environment variable. Below you can see an example of this files contents:

    *background: #ff0000
    *foreground: #a0ff00
    *fontList: -misc-fixed-bold-r-normal-*-13-*

The values used in the example above are the ones used by IUP if these resources are not defined.

Also a resource file named ".Xdefaults" will also affect the visual appearance of all applications that use Motif and Intrinsics.

### Tips

#### Dynamic Libraries in Linux

When using dynamic libraries in Linux, the "libiup.so" uses the GTK driver for newer systems (Linux26g4). So applications that dynamically load IUP will always use the "libiup.so", for example Lua using require. To use the IUP Motif dynamic library in Linux you must rename the "libiupmot.so" to "libiup.so", so the Motif driver will be loaded instead of the GTK driver.

In older systems (<=Linux26 with gcc 3) the "libiup.so" already contains the Motif driver.

#### During linking in the Solaris environment: Can not find libresolv.so.2

This error occurs if the system does not have an applied patch containing this library.

This library is important for all installations of Solaris 2.5 and 2.5.1 (SunOS 5.5 and 5.5.1, respectively). It is a correction of the DNS system, involving security.

The web address to get these patches is SunSolves http://sunsolve1.sun.com/sunsolve/pubpatches/patches.html. Select the Solaris version you wish (2.5 or 2.5.1 for Sparc) and download the patches 103667-09, 102980-17, 103279-03, 103708-02, or more recent for 2.5 (the number after the - is the patch version, and the more recent number is the patch), or 103663-12, 103594-14, 103680-02 and 103686-02 for 2.5.1. All of them have a README file explaining installation, and groups have to be installed together.

#### TrueColor canvas

Whenever a canvas is created, one tries to create it with a TrueColor resolution Visual. This is not always possible, since it is subject to many conditions, such as hardware (graphics board) and the X servers configuration.

The xdpyinfo program informs which Visuals are available in the X server where the display is being made, so that you can see if your X allows creating a canvas with a TrueColor Visual. In some platforms, however, the X server may not make a TrueColor Visual available, even though the graphics board is able to display it. In this case, restart the server with parameters that force this. Below is a table with such parameters to some systems where the IUP library has been tested. If the command does not work, or if it is not possible, then the graphics library really does not support 24 bpp.

System | Execution Command
--- | ---
Linux | startx --bpp 24
AIX | (not necessary)
IRIX | (not necessary)
Solaris | (not necessary)

Since color requests are always successful in TrueColor/24bpp windows, we have minimized visualization problems for images that make use of complex color palettes (when there is a high color demand, not always all colors requested can be obtained). The IUP applications also coexist more peacefully with other applications and among themselves, since the colors used by TrueColor/24bpp windows do not use the colormap cells used by all applications.

#### XtAddCallback failed

When a warning about XtAddCallback appears during the application initialization, and it aborts, this usually means that you are using a Motif with a different version than the Motif used to build IUP. Reinstall Motif or rebuild IUP using your Motif.

#### Indigo Magic look in Sgi

To turn on the Indigo Magic look for an application, simply set the applications sgiMode resource to TRUE. Typically, you should add this line to the "/usr/lib/X11/app-defaults" file for your application:

appName*sgiMode: TRUE

where appName is the name of your application.