[Top] [Prev] [Next] [Contents] [Index]

Creating Remote Configuration Files

Remote configuration files allow you to configure all terminals easily from a host computer. Remote configuration files are ASCII files that reside on the boot host or other hosts designated as initial file servers. The default file server is the boot host. For information about designating other file servers, see Chapter 5, Configuring Network Services.

Remote configuration files are downloaded using TFTP or NFS after the terminal has loaded an X server.

NCD terminals are configured by default to:

To create and install remote configuration files, using the default behavior of the terminal, see the rest of this section.

Using the Sample Configuration File

ncdinstall normally creates the following standard configuration files when you add a terminal to the network:

If you need to create files manually, this section explains how to create files with the standard filenames and install files in the default directory.

Using the following procedures, you can create a configuration file and have it downloaded the first time the terminal boots. This procedure assumes that you are installing the configuration files on the boot host or on one of the initial file server hosts. See "Specifying Hosts for Loading Configuration Files" for more information on configuration file hosts, and see Chapter 4, Booting-X Server Loading, for more information on initial file servers.

Complete the following steps to establish a configuration file:

  1. If you did not install the example configuration file when you installed NCDware, copy the example configuration file from the NCDware distribution into the /usr/lib/X11/ncd/configs directory on the boot host. Follow the directions in the README file included with the example configuration files.

  2. Make sure the filename is correct:

    If this is a generic file, the name is ncd_std.


    If this is a file for an individual terminal, the name is the hexadecimal equivalent of the terminal's IP address. To convert an IP address to its hexadecimal equivalent, convert each octet to a hexadecimal number; for example, to convert the IP address 192.40.154.4, using the UNIX bc(1) utility:


    % bc
    obase=16
    192;40;154;4
    C0
    28
    9A
    4
    

    The resulting filename is C0289A04. Each octet of the address must have two characters, so 4 is written as 04.

  3. Make any necessary changes to configuration parameter values. You can use any text editor (such as vi) to edit the file.

  4. Check the file permissions. The file must be world-readable.

  5. Boot the terminal. The configuration file is downloaded and the parameter settings in the file take effect.

Configuration File Size

The size of configuration files is limited only by the amount of available terminal memory.

Creating a File from the Setup Clients

You can create a configuration file by invoking Change Setup Parameters or Change Quick Setup, setting parameters, and saving the parameters to a file.

All parameters are saved to the file in alphabetical order by group (that is, parameters in the boot group are listed first and parameters in the xserver group are listed last). Therefore, you may need to rearrange some lines; for example, to put the name server parameters ahead of parameters that use hostnames.

The file must be saved on the boot host, another specified host, or one of the initial file server hosts.

On TCP/IP networks, you can use TFTP or NFS to write the file (depending upon how the initial file servers are set up):

The file is saved into the default configuration file directory unless you specify a complete pathname. The normal default directory is /usr/lib/X11/ncd/configs. To change the default directory, see "Specifying a Different Configuration File Directory".

Complete the following steps to create a file from Change Setup Parameters or Change Quick Setup:

  1. Invoke the local client and set parameters as needed.

  2. From the File menu, select Save to File.

  3. In the dialog box displayed, enter the filename.

    For automatic downloading when the terminal is rebooted, use the generic filename (ncd_std) or the hexadecimal equivalent of the terminal's IP address. For information about converting the IP address, see
    "Using the Sample Configuration File".

  4. Click on OK in the dialog box to save the parameters to the specified file.

  5. Click on Cancel at the bottom of the Setup Parameters window to exit from the client.

  6. The configuration file is saved in the default configuration file directory (/usr/lib/X11/ncd/configs).

  7. Check the file to make sure all parameter settings are complete and in the correct order.

Nesting Configuration Files

Using the configuration language read command, you can include files containing configuration parameters within another configuration file. The included files may have any name you wish, and you can refer to them either as absolute pathnames or as pathnames relative to the configuration file directory. Included files must be accessible through the file service table described in Chapter 5, Configuring Network Services.

Files can be nested to 10 levels.

By combining terminal-specific configuration files and one or more standard files, you can assign individual values to some parameters and maintain the common values in the standard files.

The following example shows two read commands in the terminal-specific configuration file C02B9A57. Parameters common to all terminals on the network are in the file ncd_std. Parameters common to a subgroup of terminals are in the file mktg_specific.


# Configuration file for IP address 192.9.200.23
#
read ncd_std
read mktg_specific
#
# Parameter specific to IP address 192.9.200.23
snmp-allow-reset = yes

When the terminal is booted, the X server loads the C02B9A57 file, reads the ncd_std file and the mktg_specific file, and then resumes reading the C02B9A57 file. The assignment in the last line of the C02B9A57 file overrides any assignments in the included files because later assignment takes precedence over earlier assignment.

Including the User's Settings in Remote Configuration Files

You can allow users to save their preferred settings from Change Setup Parameters or Change Quick Setup in a file and include this file in the terminal-specific configuration file.

Users can save their settings by simply clicking on Apply in the client window provided that config-auto-saved-info is set to "user-changes." The default file in which their settings are saved is the name of the configuration file loaded when the terminal booted plus a filename extension (.stp). For example, if the configuration file loaded was called C02B9A57, the user's settings are saved in the file C02B9A57.stp.

For example, assume that the user of the terminal with the configuration file described in the previous section has saved settings in the file C02B9A57.stp. You can add another read statement to include the user's file:


# Configuration file for IP address 192.9.200.23
#
read ncd_std
read mktg_specific
read C02B9A57.stp
#
# Parameter specific to IP address 192.9.200.23
snmp-allow-reset = yes

The user's file is loaded after the files controlled by the system administrator. This avoids the possible problem of a protect all command in a user's file restricting system administration set commands. In addition, the system administration files can use the protect command to protect sensitive parameters from user modification. For more information about protecting parameters, see "Protecting Configuration Parameters".

For any parameter settings made by this user to be overridden by assignments in the two other included files, the other files would have to be listed after the user's files.

For more information about saving files from Change Setup Parameters and Change Quick Setup, see "Configuring the Apply Command".

Note:
Users can set and save preference settings using Change User Preferences, and their settings can be loaded at session reset using the ncdloadprefs(1) utility invoked from a startup file such as an .xsession or Xsession file. For more information about saving and loading user preferences, see the System Administrator's Guide.



[Top] [Prev] [Next] [Contents] [Index]

Send comments, suggestions, or questions about this document to the NCD Technical Publications Department by Internet e-mail. Write to us at techpubs@ncd.com.
Copyright © 1997, NCD Inc. All rights reserved.