Mac – How to set remote computer to allow running Matlab through ssh and x11 forwarding

macMATLABsshxorg

I am trying to connect to a remote computer, and run matlab with x11 forwarding (to get the display). However, it seems the remote computer is not configured to run matlab like this and forward x11, because I get the following error:

"Warning: No display specified. You will not be able to display graphics on the screen."

The error is not on my side, as I have successfully (ie, just now) sshed into a different remote computer and run matlab with x11 forwarding. What should I look for on the remote server to configure in order to get this working?

update

I got the remote host to be an x11 client by following these instructions from apple. Now, x11 works (for xcalc, etc). Now, it seems there is a matlab issue, as when I run the matlab command, i get the following error:

Could not open display. Exiting.

Best Answer

Try the instructions here:

3 Simple Steps to X11 Forward on Mac OS X

  1. Open ”Terminal” in Mac OS X Leopard.

  2. ssh -X X11 Forward to your remote host (See “man ssh” for the use of the -X or -Y flag X11 forward): ssh -X johndoe@123.456.789

  3. Start your remote X11 program and view the user display on your local machine: xeyes &

Voila it works! The X application will start up your X11 environment. Its quite easy to do X11 forwarding when you first get the hang of it.

Related Question