ToolTalk User's Guide

Connecting to the Same Session

To connect the processes to the same session, you first need to determine a common interest for the processes (for example, a scheme that associates a session name with the common interest of the processes) and then you need to determine how to propagate the session name to all of the processes. The ToolTalk service does not provide a mechanism to distribute the session address (other than the possible advertisement of a session id on the TT_SESSION property of the root windows of X servers).

To get a session name, you can use the command

ttsession -p

which forks off a new session and prints its name to stdout; or you can the command:

ttsession -c

which sets the environment variable $TT_SESSION to the session id.

You then need to use some mechanism to put that session name in a place where the other processes can find it. Some examples of where you can place the session name are:

Alternately, the processes can use the session name in the tt_default_session_set call to connect to that session.

You could also send messages in the ttsession associated with a particular X server to advertise the newly-created ttsessions.