Display a X11 window on a remote computer

From COEHELP

Jump to: navigation, search

Contents

Using Matlab from your home PC or laptop

You can use your home computer or laptop X11 windows displays remotely on a COE machine!

Here are instructions on how to do this. Be sure you are on a reliable broadband connection.

Windows

(1) You need to have two programs to be able to run Matlab remotely:

(2) First, you need to make sure that your ssh client allows X11 connections. To do this, you need to go to the configuration section (pressing the button that looks like two cogs usually works), select Tunneling and then check the "Tunnel X11 Connections" box.

(3) Start your X11 windows display manager (Xming, for example)

(4) Start your ssh client program (Putty, for example), connect to gateway.coe.neu.edu and login with your COE username and password. Our load balancer will connect you to a Linux workstation.

(5) You can now run any program on the system. If the program understands the X11 protocol, it will create a new window on your PC. You can also run the program in the background by ending the command with a ampersand:

    X11program &

Troubleshooting

  • If you don't get a display, type this command:
   echo $DISPLAY

If that command gives only a blank line as output, you have skipped one of the steps mentioned above. Be sure to allow X11 tunneling in your ssh client program (step (2) above).

  • All Unix commands are CaSe-senSITive.

Mac

The software you need is already installed on your Mac.

(1) Start X11: go to the Applications folder, open the subfolder Utilities, and double-click on X11.app. It may not open a window; in the Dock, you should see an icon of a white square containing a black X.

(2) Open a terminal window: click on the X icon in the Dock to bring X11 to the foreground. At the top of the screen, you'll see X11 .. Applications .. Edit .. Window .. Help. Pull down the Applications menu and choose Terminal. This will open a small white terminal window with "xterm" in the title bar.

(3) Log in to the gateway. In your xterm window, type the line below, where <username> is your COE username. (The character after the hyphen is a lowercase L.)

    ssh -Y -l <username> gateway.coe.neu.edu

When prompted, type your COE password.

(5) You can now run programs from the command line. If your program understands the X11 protocol, type:

     X11program &

to start the program and run it in the background. You should get a X11 window display after a few seconds.

Troubleshooting

  • If you get an error message about X permissions when you try to start Matlab, try this: Open a second terminal window (see (2) above). In this second terminal, type
    xhost + hostname.coe.neu.edu  

Now redo (5) to start the program.

Linux

Personal tools