KCMS Calibrator Tool Loadable Interface Guide

Updating the OWconfig File

Before your module can be loaded, you need to update the OWconfig file by inserting an entry for your module. To do this, you use the interactive OWconfig_calibrate program provided with the SDK.

To update the OWconfig file, you must be root. If you are not root or the /etc/openwin/server/etc path does not exist, the following error is generated:

OWconfile file not created/updated.
Check that you are root and /etc/openwin/server/etc exists.

Start the OWconfig_calibrate program as follows:

example% su
example# ./OWconfig_calibrate

Inserting An Entry

The following is an example of how to insert a calibrator module configuration entry into the OWconfig file. Sample user responses are enclosed in brackets ([]).


Example 3-2 Inserting A Calibrator Module Entry

ATTENTION: You must be root to update the OWconfig file.

Are you inserting an OWconfig entry? y/n

[y]

You will be asked to supply a name, a device type, and 
a kcsLoadableModule to create an entry such as the
following:  name = 'mydriver'
        kcmsCalDeviceType = 'monitor'
        kcmscCalLoadableModule = 'kcmscSUNWmydriver.so.1'
Please see the KCMS Calibrator Tool LOadable Interface Guide for 
information


The class for this entry will always be KCMS_CALIBRATE 
Enter the unique name of the device  

[mydriver]  

Enter the device type  - normally monitor  

[monitor]  

Enter the name of your dynamically loadable module.  

[kcmsSUNWmydriver.so.1]  

This is your OWconfig entry.  OK? y/n  

class = KCMS_CALIBRATE  name = mydriver 
kmcsCalDeviceType = monitor
kmcsCalLoadableModule = kcmsSUNWmydriver.so.1 
y  

Do you have more entries to create? y/n 
n

The OWconfig_calibrate program above appends the entry to the OWconfig file.

Try inserting the entry shown in the above example using the procedure outlined below:

  1. Run the OWconfig_calibrate program. Be sure you are root.

    See "Updating the OWconfig File" .

  2. Insert the user responses shown in Example 3-2 .

  3. Check for the entry at the end of the OWconfig file.

    The new configuration entry is appended to the /usr/openwin/server/etc/OWconfig file. For local machine use only, the /etc/openwin/server/etc/OWconfig file is updated. If you inserted the entry with the user responses in Example 3-2 , the entry appears in OWconfig as shown below.


    Example 3-3 OWconfig Entry For Calibrator Loadable Module

    class="KCMS_CALIBRATE" name="mydriver"     kcmsCalDeviceType="monitor"    
    kcmsCalLoadableModule="kcmsSUNWmydriver.so.1";

Removing Entries

The following is an example of how to remove a configuration entry from the OWconfig file. Sample user responses are enclosed in brackets ([]).


Example 3-4 Removing A Calibrator Module Entry

ATTENTION: You must be root to update the OWconfig file.  

Are you inserting an OWconfig entry? y/n
[n] 
To remove an OWconfig entry:  

Enter the unique name for your driver for removal 
from the OWconfig file.  

[mydriver]  

This is the OWconfig entry to remove.  OK? y/n  

class = KCMS_CALIBRATE  name = mydriver 
[y]  

Do you have

more entries to remove? y/n 
[n]

The OWconfig_calibrate program removes the last entry in the OWconfig file.

Try removing the entry you inserted following Example 3-4 . Use the procedure outlined below:

  1. Run the OWconfig_calibrate program again. Be sure you are root.

    See "Updating the OWconfig File" .

  2. Fill in the user responses shown in Example 3-4 .

  3. Check the OWconfig file.

    The entry should no longer appear at the end of the file.