Netra j 3.0 Administrator's Guide

Running GO-Joe

To start a GO-Joe session, load the HTML file with the GO-Joe applet into your Java environment. GO-Joe prompts you for a user name and password for the session, and after authentication, provides the X display on your Java desktop.

This session is almost identical to running an X session on the system console, with a few differences, which are described below.

$DISPLAY Environment Variable

The $DISPLAY environment variable tells X clients where to contact your X server. GO-Joe sets this variable to point to an alternate display on your host machine. For example, if your UNIX host is named workstation and the Java device is named java, you might expect the $DISPLAY variable to set java:0 as its value. However, GO-Joe uses the host name for its $DISPLAY variable value, in this case, workstation:1.

GO-Joe makes an additional optimization that can be somewhat confusing. In X parlance, if the $DISPLAY variable is set to unix:#, the JavaStation client attempts to connect using a local transport. For example, instead of using TCP/IP, it connects using a named pipe. This connection is faster than using TCP/IP for clients running on the same host. However, the unix:# value cannot be used if you run clients from different hosts.

Instead, use the following shell script to change the $DISPLAY variable to point to the host name of your machine. This translates $DISPLAY from unix:3, for example, to workstation:3 enabling X clients on other machines to successfully contact GO-Joe on the workstation host. This can be included in the .profile file:


DISPLAY=`/bin/uname -n``/bin/expr $DISPLAY : '[^:]*\(:.*\)'`

Using a Two-Button Mouse

X requires and assumes the availability of a three-button mouse. Most Java environments provide a two-button mouse. In an X session, the left and right mouse buttons correspond to the left and right mouse buttons under X. GO-Joe maps the simultaneous pressing of both mouse buttons into a middle mouse button press.

The Mouse Arrow

Current AWT implementations provide only limited support for specifying the shape of the mouse arrow in the Java environment. For this reason, GO-Joe currently does not change the shape of the mouse arrow.

Token Parameter

The GO-Joe applet accepts an optional token parameter in its HTML file. If the token parameter is present, the applet transmits it to the go-login program, along with the user name and password. The go-login program creates an environment variable, $GG_TOKEN, which is available for other startup scripts to process.The following three controls are supported by the token parameter.

The Solaris session startup files (OpenWindows or CDE) are initiated when the GlobalHost loadable ddx module is installed.

When starting an OpenWindows session, the token parameter is used in $OPENWINHOME/lib/gotoken-init or in $HOME/.gotoken-init. If $HOME/.gotoken-init exists, it is used before $OPENWINHOME/lib/gotoken-init. System administrators and system integrators can create system-wide token processing routines by modifying $OPENWINHOME/lib/gotoken-init, while still enabling users to override these settings in the $HOME/.gotoken-init file. In addition, if the $GG_TOKEN variable is not set, the session startup is the same as a standard OpenWindows session.

The CDE startup mechanism is somewhat different from the OpenWindows mechanism. Unlike OpenWindows, which uses a single openwin-init file, CDE stores its session initialization as a directory filled with several files. Because of this, the CDE token is used to specify a session to be started. Sessions are stored in /usr/dt/config/dtgotokens, in subdirectories that match the name of the startup control. When the session is started with the CDE token, the session directory is copied into the user's home directory, and CDE starts this session for the user.

Structure of gotoken-init

The gotoken-init is based on the standard openwin-init file, with the addition of the following section:


	if [ "$OW_WINDOW_MANAGER" = ':' ]; then
	   toolwait=
	else
	   toolwait=toolwait
	fi
	unset OW_WINDOW_MANAGER
	case "$GG_TOKEN" in
    xterm)
	 	 $toolwait $OPENWINHOME/bin/xterm
	 ;;
    *)
        	echo >&2 "$OPENWINHOME/lib/gotoken-init: error:
\'$GG_TOKEN\': case not found."]
	echo >&2 "    Using defaults."
	. $OPENWINHOME/lib/openwin-init
	;;
esac

This section parses the $GG_TOKEN (with any session or window manager controls removed) and starts the appropriate client or clients. In the example, only one startup control, xterm, is defined. Any other token returns an error and use the default OpenWindows startup.

If nowm is specified, the $toolwait variable sets the $OW_WINDOW_MANAGER variable (in conformance with the standard OpenWindows method of specifying an alternate window manager) to the colon. This results in no window manager being executed when the shell interprets the colon as a null command.

If you modify the $toolwait variable when there is a window manager running, the $toolwait program is invoked to start xterm (which runs in the background). When no window manager is running, the last client started by gotoken-init must not run in the background, or the GlobalInit program thinks that the session is over and shuts down the X server. Conditionally running the toolwait program solves this problem.

Structure of dtgotokens Directory

The dtgotokens directory (/usr/dt/config/dtgotokens) contains subdirectory names that match the possible values for the startup control in $GG_TOKEN. Each subdirectory contains the files necessary to start a CDE session with the X applications that are appropriate. The example directory, xterm, starts a single xterm window.

To Create Additional Tokens
  1. Run a CDE session and start the appropriate clients and applications.

  2. Exit the CDE session.

    The session is saved in ~/.dt/ sessions. Copy the session files into the dtgotokens directory using a command similar to the following:


    # cp -R ~/.dt/sessions /usr/dt/config/dtgotokens/sampletoken
    

The -R argument is used to copy recursively (including subdirectories). You do not have to create the sampletoken directory before executing this command.