This section addresss ToolTalk and related environment variables.
There are several ToolTalk environment variables that may be set. Table 4-2 describes these variables.
Table 4-2 Environment Variables
Variable |
Description |
---|---|
Overrides the standard options specified when tools automatically start ttsession. If this variable is set, all ToolTalk clients use this command to automatically start their X sessions. |
|
Defines the number of characters of argument and context values to print when in trace mode. The default is to print the first 40 characters. |
|
ttsession places a pathname in this variable when a tool is invoked by a message scoped to the defined file. |
|
Points to a map file. The defined map file is read into the ToolTalk client for redirecting host machines. |
|
Points to a map file. The defined map file is read into the ToolTalk client for redirecting file partitions. |
|
ttsession communicates its session identifier to the tools that it starts. If this variable is set, the ToolTalk client library uses its value as the default session identifier. The string stored in this variable can be passed to tt_default_session_set. |
|
Notifies the ToolTalk client library that it has been started by ttsession; the client can then confirm to ttsession that the start was successful. |
|
|
Tells libtt to turn on client-side tracing as specified in the trace script for tttrace(1). |
Tells the ToolTalk service where the ToolTalk Types databases used by tt_type_comp(1) and rpc.ttdbserverd(1M) reside. |
|
Tells the Classing Engine where the ToolTalk Types databases reside. |
|
Causes ttsession to communicate its session identifier to the tools that it starts if the If the DISPLAY variable is set, the ToolTalk client library uses its value as the default session identifier. This variable is typically set when ttsession is auto-started while running under OpenWindows. NOTE: Under the Solaris operating system, this variable may not be passed across to some accounts. That is, if you are logged on the console as User A and switch-user to User B, ttsession may not autostart when you attempt to run a ToolTalk program that normally autostarts ttsession. To avoid this problem, either manually set the this variable or include it in your .login file. |
|
|
If set, the value of this environment variable will be used in place of /net in pathnames constructed to answer tt_host_netfile_file()(3) queries, by rpc.ttdbserverd(1M). |
A process is given a modified environment when it is automatically started by the ToolTalk service. The modified environment includes the environment variables $TT_SESSION
, $TT_TOKEN
, and any contexts in the start-message whose keyword begins with the dollar sign symbol ($). Optionally, the environment variable $TT_FILE
may also be included in the modified environment if it is a file-scoped message.
If the tt_open call will be invoked by a child process, the parent process must propagate the modified environment to that child process.
The TMPDIR
environment variable is another environment variable that you can set to manipulate the ToolTalk development environment. For example, the following line redirects files to the /var/tmp directory.
TMPDIR=/var/tmp |
The start string is always executed on the host on which ttsession is running; however, the executed process can start another process on another host.
To do this, first make your start string be similar to the following:
# rsh farhost myprog |
Next, to make sure myprog is placed in the right session and receives its initial message, you need to propagate the important ToolTalk environment variables. The ttrsh shell script shown in Example 4-1 propagates these environment variables.
Message contexts have a special meaning when the ToolTalk service starts an application. If the name of a context slot begins with a dollar sign ($), the ToolTalk service interprets the value as an environment variable. For example, the following uses the value of context slot $CON1.
start "my_application $CON1" |