Introduction

How to install X11 on a Mac or Windows computer.

Instructions

Install X11 on a Macintosh Computer

  1. Visit the web site for XQuartz, download the software, and follow its installation instructions.
  2. To make use of X11, locate the application Terminal.app in the Utilities folder and double-click on it. This will open a window with a command-line interface, aka a “shell”, where you type in commands followed by the key <return>.

Install X11 on a Windows Computer

On Windows computers you must download and install both X11 and a compatible terminal program. We recommend Xming in the first case and Git Bash in the second case.

  1. After installation, locate Xming in the Start menu and click on it. It will not display any windows, but will immediately disappear into the background (if you have any questions about whether or not it’s running, run the Task Manager by pressing the keys control-alt-delete simultaneously and you should see it listed).
  2. Then locate Git Bash in the Start menu and click on it. This will open a window with a command-line interface, aka a “shell”, where you type in commands followed by the key <Enter>.
  3. Type in the following command:
    echo export DISPLAY=localhost:0 >> .profile
  4. Type in the following command:
    bash
    This will load the file .profile with its display setting, as will reopening Git Bash later on. 

Running X11

  1. In the shell, type in the following command followed by the key <Enter> on Windows or <return> on Mac:
    ssh -Y amherstusername@hostname
    Here you should fill in your Amherst username and the name of the computer you are trying to reach, e.g. romulus, remus, hpc, etc.
  2. You may be asked if you want to connect to the remote computer; type yes.
  3. You will be asked to type in your password, but you will see no dots in response, just finish with the key <Enter> or <return>.
  4. You will now be logged into the remote system where you can run graphical programs with commands such as:
    matlab &
    where the & puts the command into the background so that it doesn’t lock up the shell window.
  5. When you are finished, close your application windows and in the shell type the command:
    exit

Audience

students
faculty
staff
five college

Tags