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.
link|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
feedback

1 Answer

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.

link|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 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 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 at 18:04
feedback

Your Answer

 
or
required, but never shown

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