Tutorial:
Legion 1.4 graphics user interface (GUI)


Table of Contents

  The Legion GUI
A brief look at context space
Running the Context Manager from the command line
Running the Context Manager on Windows95
Shutting down the Context Manager
Restarting the Context Manager
Using the Context Manager
The Context Manager icons

  Other relevant on-line documents:
  Logging in to a running Legion system
Legion graphical user interface
Introduction to Legion context space
Context-related commands
How to start remote programs in Legion
Object permissions
Legion tty objects
Running an MPI code in Legion
Running a PVM code in Legion
Quick list of all Legion commands
Usage of all Legion commands
Starting and shutting down Legion 1.4
Using Legion security features
Legion host and vault objects
Adding host and vault objects
The list of all on-line 1.4 tutorials


The Legion tutorials offer quick and simple instructions for various key procedures for a Legion system. More complete explanations of all of the procedures discussed here are available on separate pages, and can be found by clicking on the icon.

Depending on how your system is set up, you may need to set up your access to your system before you can run Legion commands. This will probably involve running a command such as this:

$ . ~LEGION/setup.sh

or

$ source ~LEGION/setup.csh
The exact syntax will depend on what kind of shell you are using and on where your Legion files are installed. Consult your system administrator for more information.


The Legion GUI

The Legion graphical user interface (GUI) is a Java application that runs context-related commands in a graphic interface called the Context Manager. The Context Manager uses icons to represent different parts of context space (file objects, sub-contexts, etc.) and allows you run most context-related tools. The Context Manager can be run from the command-line of any platform compatible with the Java Development Kit (JDK) 1.1.3. A Windows95 client application, called the Legion Server, allows users to run the Context Manager from Windows95.

The Context Manager can be run from the command-line of any platform compatible with the Java Development Kit (JDK) 1.1.3. A Windows95 client application, called the Legion Server, allows users to run the Context Manager from Windows95.


A brief look at context space

Context space is a way of organizing Legion objects and can be thought of as a network-wide transparent file system. It is similar to Unix's system of directories and files but while Unix space is location specific, context space can potentially include any kind of object anywhere in Legion. You maintain your own context space, organizing it to reflect your needs. You can use the Context Manager and command-line tools to organize this space.

In this space, you can assign string names, here called context names, to Legion objects. Context names have no relation to an object's physical location or type, but are designed for user-convenience only. Multiple users can assign context names to the same object, or you can assign multiple names to a single object to make it easier to find in different situations.


Starting the Context Manager from the command line

Before compiling and running the Context Manager be sure that your machine has JDK.1.1.3 or later installed. Note that you cannot start the ContextMgr process from outside the $LEGION/src/UserInterface directory.

  1. Add the following to your CLASSPATH environment variable.
    $LEGION/src/Java/client/:$LEGION/src/UserInterface/swing.jar:.
  2. Add the JDK bin directory to your path (i.e., /home/jdk1.1.4/bin).

  3. To compile the application and the necessary classes, go to the $LEGION/src/UserInterface directory and enter:
    $ make
  4. You must have a Legion session already running. Be sure to export the CLASSPATH variable, set your DISPLAY variable, and stay in the $LEGION/src/UserInterface directory. Use the following command to start the application:
    $ legion_java ContextMgr & *
    A new window will pop up (figure 1, below):


    Figure 1

    If you get errors at this point, check that your environment is properly set and that your DISPLAY variable is correct.


Running the Context Manager on Windows95

In order to run Context Manager on Windows95 you'll need to follow steps 1-3 outlined above on a machine running your Legion session and to start Legion Server, a Windows95 client application. The make command, run in step 3 above, creates a file called Legion.zip in your $LEGION/src/UserInterface path. The zip file contains the classes needed to run the Server.

You also need to have either the Java Runtime Environment (JRE) version 1.1.3 or later, or JDK version 1.1.3 or later, installed on your Windows95 machine. You can download these from http://java.sun.com/products.

Note that you will actually be running two separate applications, one from the command line of the machine running your Legion session and one from a DOS window of your Windows95 machine.

  1. Follow the JRE or JDK installation instructions for Windows95 if they are not already installed. You must add the bin directory for either package to your path in the AUTOEXEC.BAT file (e.g, PATH=C:\jre\bin).

  2. Copy the file Legion.zip to a directory in your Windows95 machine and unzip it (be sure that your unzip program maintains extended filenames).This will create a new directory called UserInterface in your Windows95 directory. The new directory contains the appropriate classes for running the client.

  3. On the machine running your Legion session start a Java Legion Server by running javaLegionServer. This process will output the name of the machine it is running on and a port number to your command line.
    $ javaLegionServer &
    javaLegionServer: your.machine.DNS.name 1234
    $

    We recommend that you run this in the background, although again it is not necessary.

  4. To start the client on your Windows95 machine, open a DOS window, change to the UserInterface directory created in step 2, and type the following:
    $ Legion [machine name] [port#]
    Use the machine name and port from the output of step three.

The Legion Java client will open in a separate window, titled the Legion Context Manager, and can be manipulated like a normal Windows95 windows. The window will look something like figure 2.


Figure 2


Shutting down the Context Manager

To shut down the Legion Context Manager simply close the Context Manager window or enter Cntrl-X.


Restarting the Context Manager

To restart the command-line Context Manager repeat step 4 above.

To restart the Windows 95 Legion Context Manager repeat steps 3 and 4 above. You will get a different port number each time you run the Context Manager.


Using the Context Manager

The Context Manager can be used in place of context-related commands to manage context space: context space is organized into a series of sub-contexts (also called contexts) and each context contains context names of various Legion objects, similar to Unix space's directories and file names. In the Context Manager all context-related objects such as contexts, file objects, and objects are represented by icons that can be manipulated with the right and left mouse buttons.

Click the right mouse button in the Context Manager window to reveal three options:

Create Context   Create a new sub-context (similar to a Unix sub-directory) in the current context. A new window will appear to ask you to name the new context. The new sub-context will be placed in your current context, unless you specify via a full context path name (e.g., you can place the new sub-context in the parent context by using ".." in the new context's full path name).
Import File   Import a copy of a local file into Legion space. That is, copy the local file's contents into a new Legion file object. A separate window (figure 3) will appear. If you click on the "Browse" button you can browse through your local file space. Be sure to give the new object a context name.

Figure 3
Import Directory   Import a local directory into Legion space or from Legion space into local disk space. A separate window showing the local file system will appear. You can type the directory path in the Current Directory cell or browse through your local system by clicking directory names in the Subdirectories cell.

The Context Manager icons

There are five different icons in the Context Manager, each representing an element of context space. The context name associated with the object will appear beneath the icon. Objects that do not have a context name will not be represented in the Context Manager, so not all objects will appear: with the exception of the default names created when your system was started you create your own context names. You can use the Context Manager to create, change, and remove context names by clicking the right or left mouse button on icons. The icons are explained in full below.

The context icon represents a context, similar to a Unix directory. You can change your current context by double-clicking on a context icon. Click the right mouse button to get the following options:

  Move
Alias
Get Interface
Get Attributes
Destroy
Activate
Deactivate

The parent context icon represents the current contextís parent context. Double-click the left mouse button on this icon to change your current context to the parent context. Clicking the right mouse button will produce the same options as with the context icon (above).

The class icon represents a class object. You can double-click the left mouse button on a class icon to see a list of the class's instances.


Figure 5

This opens a new window that lists each instance's LOID, status, Object Address (OA: an active object's location), Host, and Vault (figure 5). The Instance pull-down menu allows users to activate, deactivate, and destroy selected or all instances, as well as to refresh the window.

  Show Instances
Run...
Move
Alias
Get Interface
Get Attributes
Destroy
Activate
Deactivate

The instance icon represents an instance of a class object. Click the right mouse button to get the following options:

  Move
Alias
Get Interface
Get Attributes
Destroy
Activate
Deactivate

The file object icon represents a file object. Double-clicking this icon opens a text window displaying the file's contents. Click the right mouse button to get the following options:

  View File
Copy
Export File
Move
Alias
Get Interface
Get Attributes
Destroy
Activate
Deactivate


Figure 6a

Figure 6b
You can refresh your current context by clicking on the upper left hand "." current context icon (figure 6a). Similarly, users can always get to a sub-context's parent context by double-clicking on the ".." parent context icon, to the right of the "." icon (figure 6b). Note that the parent context icon will not appear if you are currently in your root context.

The pull-down menus (figures 7, 8, 9, and 10) can be used to do the following:

File-> New-> Open New Window

Figure 7
   Open a new Context Manager window. This will point to the same context space as the original Context Manager window.
New File
Create a new File Object. A New File window will open, where you can enter the new object's context path name, then a text editor window will open. The Ctrl-n key combination will also run this process.
New Context
Create a new sub-context in the current context. This carries out the same function as the Create Context option in the Context Manager options window, discussed above.

Figure 8
    View File
Display contents of a selected textual file object in a separate window.
Import File
            Import a copy of a local file into Legion space. A separate window will appear, with the option to browse through local file space and specify a filter to use when copying the file into Legion space. The Ctrl-i key combination will also run this process.
Import Directory
Import a local directory into Legion space or from Legion space into local disk space. A separate window, showing the local file system, will appear.
Export File
Export a copy of a local file to local disk space. The Ctrl-e key combination will also run this process.
Quit
Close the current window. If only one window is open, the program will exit. The Ctrl-x key combination will also run this process.

Edit-> File-> View File

Figure 9
   Opens a Text Editor window, where you can edit the file's contents.
Copy File
Make a copy of the file object. This will create a new object, with a new LOID and context name but with the same content. The Ctrl-c key combination will also run this process.
Export File
Export a copy of a local file to local disk space. The Ctrl-e key combination will also run this process.
Class->Run...

Figure 10
Executes a previously registered executable program class. Click here for information about registering remote programs and here for information about running remote programs in the GUI. This option will produce a separate window, which can be used to specify input and output file names. The Ctrl-p key combination will also run this process.
Show Instances
Display all instances of a selected class in a separate window. The Show Instances option returns several pieces of information about the selected class's instances, as shown in Figure 5. The Ctrl-p key combination will also run this process.
Activate All Instances
Activate all instances of a selected class. The Ctrl-a key combination will also run this process.
Deactivate All Instances
Deactivate all instances of a selected class. The Ctrl-d key combination will also run this process.
    Move
   Change the object's context name and remove the old name from context space. This carries out the same function as the Context icon Move option.
Alias
   Assign another context name to the selected object. This carries out the same function as the Context icon Alias option.
Get Interface
   View the selected context object's interface.This information will appear in a separate window. The Ctrl-g key combination will also run this process.
Get Attributes
   View the selected context object's attributes. This information will appear in a separate window. The Ctrl-h key combination will also run this process.
Destroy
   Destroy a selected object's context name and possibly also the object itself. This carries out the same function as the Context icon Destroy opt. The Ctrl-Delete key combination will also run this process.
Activate
   Activate a selected, currently inert, object.
Deactivate
   Deactivate a selected, currently active, object, i.e. move it to an inert state.


* The Context Manager does not have to be run in the background, but otherwise your command line will be inactive. Back