Error Message: “Unable to open DISPLAY”

Error

When you run your application on the SCG cluster, it errors out, printing some version of a message including the phrase “Unable to open DISPLAY”, with DISPLAY in all-caps.

Cause

You are getting this error message because the application you are running is trying to open something called an X Window, which is an interactive windowing system like you see on Macs and PCs. Windowing systems are built-in for those operating systems, but the cluster runs Linux, and when you access remotely via ssh through your terminal program, you doesn’t automatically get windowing.

Solution #1: Run your job on an OnDemand instance

Steps

  • Go to site ondemand.scg.stanford.edu
    • If you are not on Stanford’s campus, make sure you are running VPN before you go to OnDemand.
  • At the menu at the top of the window, click on the Interactive Apps dropdown menu.
    • If you were running on a login node, select “Login Desktop”.
      • This job runs in the interactive queue.
      • Parameters:
        • Time limit: How long should the job run?
        • Idle timeout: The job can quit this many seconds after you disconnect from it.
        • It can also send you an email when the job starts.
    • If you were running on a compute node, select “Compute Node Desktop”.
    • This job runs in the queue/partition you select: either batch or nih_s10.
    • Parameters:
      • Account: Which lab should this run be charged to?
      • Time limit: How long should the job run?
      • Number of cores
      • Memory size
      • Number of GPUs
      • Idle timeout: The job can quit this many seconds after you disconnect from it.
      • It can also send you an email when the job starts.
  • Click the blue “Launch” button once you have selected your parameters.
  • You will be taken to a screen with a summary of your job displayed in it. It may take some time while the job starts.
  • When the blue “Launch Login Desktop” or “Launch Compute Node Desktop” button is displayed, you can click it to start your desktop job.
  • A new window will come up, showing you a graphical desktop. The icons on the Desktop are the files and folders in your home directory on SCG.
  • At the bottom of that window is an application bar. Click on the dark Terminal-looking one to open up a Terminal screen.
  • You can now run the command which had failed before in that window. It should be able to create interactive windows now.
  • When you are done with this desktop session, you can simply close the browser window.

Solution #2: Install the X Windowing system on your laptop

You can set up the Linux windowing system on your own laptop by downloading and running something called an X-window server. Instructions for doing so are given below.

Macs

Steps

  • Go to site Xquartz.org.
  • Download the XQuartz application package, open it, and install it.
  • XQuartz lives in your Utilities folder. Go there and open it up.
  • It starts by opening a terminal window onto your laptop. In that window, type the following command to log into the cluster:
    • ssh -X scg.stanford.edu
  • Now you can run your original application, and it will be able to open windows on your laptop.

Windows

Instructions coming.