Skip to content

TRALE Instructions

This guide explains how to set up and run the TRALE system on the teach.cs server, including both local and remote setups.

Table of Contents

Open Table of Contents

Running TRALE

You can run the TRALE system on the teach.cs server with the following command:

rlfe /u/csc485h/fall/pub/trale/trale

Important Notes:

  1. Do not use the VSCode terminal. Use the built-in terminal on your system:

    • Windows: Use the Ubuntu WSL (Windows Subsystem for Linux) terminal.
    • macOS: Use the built-in macOS terminal.
  2. If you see a long string of dots (........................) when launching TRALE with trale -fsug:

    $ wolf:~/Desktop$ trale -fusg -c q1_en.pl
    Using Trale system found in /u/csc485h/fall/pub/trale
    Starting Trale from sources and the /local/bin/java -jar /u/csc485h/fall/pub/trale/gralej/trunk/gralej/dist/gralej.jar interface
      Enabeling Prolog's UTF-8 support.
      Setting LANG to en_US.UTF-8.
      Starting /local/bin/java -jar /u/csc485h/fall/pub/trale/gralej/trunk/gralej/dist/gralej.jar interface ...................................................................................
    

    This indicates that X11 forwarding is not set up correctly. Please review the instructions in the Running the TRALE GUI Remotely section to ensure proper configuration.

What rlfe Does

The rlfe (Readline Front-End) command allows you to use GNU Readline features in applications that don’t natively support it. This means you can navigate and edit commands more easily, such as with arrow keys, in the TRALE environment.

Adding an Alias to .bashrc

To simplify future usage, you can create an alias for this command by adding it to your .bashrc file:

  1. Open your .bashrc file with a text editor (e.g., nano, vim):
    nano ~/.bashrc
    
  2. Add the following line at the end:
    alias trale='rlfe /u/csc485h/fall/pub/trale/trale'
    
  3. Save the file and reload it:
    source ~/.bashrc
    
  4. You can now start TRALE by simply typing:
    trale -fsug
    
    See trale --help about what these flags stand for.

Running the TRALE GUI Remotely

For this assignment, the TRALE system requires a graphical interface called Gralej. If you’re working remotely, you need to enable graphical output. Below are the recommended methods:

(Background) What is X11 Forwarding?

X11 forwarding allows you to run graphical applications on a remote server and have the display rendered locally on your machine. It works by forwarding the X11 graphical interface protocol through SSH. This is essential for running the TRALE graphical interface remotely.

Use SSH with either the -X or -Y flag to enable X11 forwarding:

Linux

You can directly use this command in the terminal:

ssh -X myutorid@teach.cs.toronto.edu

macOS

macOS no longer includes an X11 server by default. You can use XQuartz, an open-source X11 server for macOS:

  1. Download XQuartz from XQuartz.org.
  2. Install and launch XQuartz.

Then, from your builtin terminal, connect to teach.cs with X11 forwarding enabled.

ssh -X myutorid@teach.cs.toronto.edu

Windows

2. Remote Labs Access via X2Go

X2Go is a remote desktop solution that provides graphical access to the labs. This method is the most reliable for running Gralej.

  1. Follow the instructions on the Remote Labs X2Go page: Using Labs: X2Go.
  2. Set up an X2Go session with the teach.cs server and launch the TRALE system.

3. RDP over SSH

Another option is to use Remote Desktop Protocol (RDP) with SSH tunneling. This provides an alternative way to access graphical applications remotely.

  1. Follow the instructions on the RDP over SSH page: Using Labs: RDP over SSH.
  2. Connect to the server and start the TRALE system.

Next Chapter
TRALE: Quick Start