Running Staff GUIs over SSH with X11 Forwarding
Author: Kelly Lin and Sean Dooher

A. Introduction

In order to use the graphical components of the staff solutions via SSH, follow the instructions listed below based off of your computer's operating system.

Once this is up and running you should be able to run the following and see a GUI version of the staff solutions:

staff-[projectname] [appropriate arguments]

B. Setup

Linux Users

You shouldn't need any additional setup.

Mac Users

In order to enable X11 forwarding you must first install XQuartz.

To install XQuartz:

  1. Download the latest version of the dmg from the link above
  2. Run the .dmg installer by double clicking on it
  3. Follow the prompts in the installer
  4. Important: After the installer completes you must logout of your computer and login back in (alteratively you can restart your computer).

    • Make sure that you are logging out of your macOS account and not just your instructional account
    • XQuartz will not work properly without this step

Windows Users

In order to enable X11 forwarding on Windows, you will need to install Xming. If Option 1 for the Windows usage below does not work you should also install PuTTY and attempt Option 2.

Xming

Use this link to install Xming on your computer. After it finishes downloading, use the default installation configurations and follow the installation instructions to completion.

PuTTY

You can install the most recent version of PuTTY for your operating system (most likely 64-bit) by following the link here. After downloading the correct version for your system, use the default installation configurations and follow the installation instructions to completion.

C. Using X11 Forwarding

If you haven't already, follow the setup instructions for your operating systems as described above.

Mac and Linux Users

You'll need to SSH into the instructional machines using the following command:

ssh -X cs61b-***@ashby.cs.berkeley.edu

*** is your 3-letter login for the course. You can find your login/password information here.

Important: This is a different command than is used for Windows.

Windows Users

The process for using X11 forwarding is a bit complicated, but will become natural after running through the process a few times.

Enabling Xming

If it is not already running, simply look up Xming in the Windows search bar and click Open (or hit Enter). You can tell if Xming is running if the Xming logo is displayed in your taskbar.

Option 1 - Git Bash

The first time you attempt to do this you'll need to run the following commands to modify your .bash_profile. Run this locally, NOT on the instructional machines.

echo "export DISPLAY=localhost:0.0" >> ~/.bash_profile
source ~/.bash_profile

Then you should be able to SSH into the instructional machines using the following command:

ssh -Y cs61b-***@ashby.cs.berkeley.edu

*** is your 3-letter login for the course. You can find your login/password information here.

Important: This is a different command than is used for Mac/Linux.

Option 2 - Using Putty

  1. Open PuTTY. In the PuTTY Configuration window, enter the machine you are trying to SSH into in the box labeled Host Name (or IP address) (such as ashby.cs.berkeley.edu or derby.cs.berkeley.edu).
  2. On the left-hand side of the window under Category, expand the SSH option and click on X11. In the X11 forwarding section, click on the checkbox labeled Enable X11 forwarding.
  3. At the bottom of the window, click Open. When you are prompted for your login, type in cs61b-***, where *** is your 3-letter login. Enter the password for your instructional account when prompted. You can find your login/password information here.

You should now be SSHed into the instructional machines with X11 forwarding enabled. Use the PuTTY terminal just as you would use your regular terminal.