Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.
share|improve this question
    
Can you run other X programs on that server, like xlogo? If that doesn't work, is xauth installed? –  fideli Sep 6 '10 at 14:14
    
"Error: Can't open display:" I interpret that as a no? The other "server" is a mac pro, probably with default installations when it comes to x11. I probably need to install something? For example, xauth? :) –  hatorade Sep 6 '10 at 14:14
    
What version(s) of OS X are yu running on both the local and remote machines? I think 10.6 changed some of the default settings regarding DISPLAY so that might be an issue. –  dtlussier Sep 6 '10 at 17:37
    
Any luck yet? If so please post your solution for future reference. –  Dennis Jaheruddin Jan 14 '13 at 14:54
add comment

2 Answers

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.

share|improve this answer
add comment

I'm not particularly familiar with Mac, but in straight-up Linux the problem usually relates to the setting of the DISPLAY environment variable. It's usually set (or defaulted) to localhost when you log in locally. When logging in remotely you usually have to set it manually to refer the remote host. So I would expect something like DISPLAY=remotehost:0.0 would do the trick. Naturally the local X server needs to accept remote clients.

share|improve this answer
    
The question talks about X11 forwarding over SSH, in which DISPLAY is always set to localhost and the X11 connections carried over SSH. –  grawity Feb 1 '12 at 21:44
    
On more than one occasion I've found myself having to set DISPLAY from SSH_CLIENT to work around cases where the above was not true. –  rlduffy Feb 4 '12 at 17:59
    
It could happen only if the server refused to enable X11 forwarding, or if DISPLAY was unset by some login script. –  grawity Feb 4 '12 at 18:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.