![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175076/image.png)
No Figure Windows When Using MATLAB on Remote Mac
조회 수: 32 (최근 30일)
이전 댓글 표시
I am currently using MATLAB Version 7.11.0.584 (R2010b) which is installed on a Mac Pro machine that I log into remotely. To use MATLAB, I ssh into the machine using 'ssh -X machinename' and then proceed to launch MATLAB. The program launches fine and I am able to process scripts, etc (note - when launched, MATLAB is only in "text-mode"; i.e., there is no desktop launched).
I am able to process data. However, when it comes to plotting or launching a figure window, no figure window will open on my screen. I have checked that X11 Forwarding is enabled when I log onto the machine by doing "tests" - e.g., launching 'xclock' in the terminal window pops up a window with the clock. I have also tried 'ssh -Y machinename' and 'ssh -XY machinename' when logging into the server, but that does not resolve the problem.
There appears to be an issue with MATLAB receiving the X11 forwarding information on the Mac. I have searched online and found similar complaints but no solution. (And no, screen sharing is not an option, as the machine is used by multiple users).
Can someone please tell me how to fix this problem so that I can run, process, and visualize my results on MATLAB through this remote connection?
댓글 수: 0
답변 (11개)
Sean O'Brien
2016년 9월 20일
편집: Sean O'Brien
2016년 9월 20일
Folks,
My users here at the ODU Center for Coastal Physical Oceanography were having the same issue.
I can confirm that setting "Allow connections from network clients" in the XQuartz preferences solves the problem. Initial windows sent from the remote compute server work fine in any case, but secondary spawned windows require this setting in order to be drawn by X11.
Screen shot below.
Our setup is:
remote machine = RHEL6 (a compute server)
local machine = OS X El Cap 10.11.6
X11 = XQuartz 2.7.9 (xorg-server 1.17.4)
Matlab = R2013 (version irrelevant on this issue)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175076/image.png)
댓글 수: 0
Alex Taylor
2011년 5월 26일
Have a look at:
The issue is that many of the graphics components of the MATLAB display use the native window system on the Mac, not X11.
댓글 수: 0
Titus Edelhofer
2011년 5월 26일
Hi,
usually this should work. Did you try to play around with the DISPLAY variable? E.g. setting it explicitly to (following depends on your shell):
setenv DISPLAY=yourmachine:0
?
Titus
댓글 수: 2
Walter Roberson
2011년 5월 26일
setting the DISPLAY environment variable cannot work for ssh access as ssh creates a pseudo display. The -X and -Y options that the poster talked about would cause DISPLAY to be initialized appropriately.
Walter Roberson
2011년 5월 26일
If MATLAB thought that you were using a graphic display, it would have opened the desktop (unless you specifically asked otherwise.)
I do not have MATLAB on my Mac to test with as mine machine is too old to be supported, so I do not know how it works. I would speculate that MATLAB uses the Quartz or Carbon graphics interface rather than X11, as X11 is much slower on Mac.
Jason
2011년 5월 26일
댓글 수: 1
Walter Roberson
2011년 5월 26일
If it was trying to use Carbon and failing to find a Carbon window system, what error message would it display?
Jason
2011년 5월 26일
댓글 수: 1
Walter Roberson
2011년 5월 26일
Odd, that page says "The -nojvm option is available for UNIX platforms" but the page it then refers you to for more information specific to unix says that handle graphics is not supported. Probably the "not supported" is more correct.
Sigh. I like Mac, but it is this kind of non-support for X11 that tends to drive me towards Linux.
Craig
2011년 10월 20일
Interestingly I'm able to use the -nojvm with matlab 7.12.0.635 on a mac pro from my laptop with ubuntu installed. Every time I call figure it says
Warning: This functionality is no longer supported under the -nojvm startup
option. For more information, see "Changes to -nojvm Startup Option" in the
MATLAB Release Notes. To view the release note in your system browser, run
web('http://www.mathworks.com/access/helpdesk/help/techdoc/rn/bropbi9-1.html#brubkzc-1', '-browser')
However all the plot functionality works... so now all I have to do is remember how to suppress that pesky warning ;-)
댓글 수: 1
Y Huang
2013년 1월 23일
Anyone has any solution?
"-nojvm" not working here - Matlab 2012b (8.0.0.783) - it simply prevents making any figure.
댓글 수: 0
Andy
2015년 1월 16일
Hi, I'm having the same trouble. -nojvm used to fix the X11 forwarding problems, but in the newer versions of matlab, there are no figures using -nojvm
My figures are showing up on the remote machine where matlab is running, not the machine I am working from. X11 is set up properly -- other programs are properly sending their windows to my laptop. This is a Mac-X11-matlab-java interaction.
댓글 수: 0
Atsushi Takahashi
2015년 1월 30일
I have the same issue. Everything was working fine on Mavericks but when I upgraded to Yosemite, it all stopped. I tried to go back and have tried installing MATLAB 2012a, 2012b, 2014b with the same results:
I can log into my Mac Mini server, and open an xterm or xeyes and that works. I start MATLAB -nojvm or -nodesktop and the figures appear on my Mac Mini screen instead of on my Linux machine where I started the ssh -X session...
I have tried this under Yosemite and a fresh install of Mavericks on a different disk.
One hint, perhaps? When I install MATLAB it says I don't have JRE and gives me the option to install without JRE, Get JRE (from Oracle) or "I have JRE." Not sure if it cannot find it because the Apple JRE is not in the rght place?
Or is it an xauth problem?
Thanks! Any hints would be very helpful!
댓글 수: 0
Monica
2015년 4월 10일
Try running
matlab -nodesktop
instead.
댓글 수: 1
Vladislav Sekulic
2015년 4월 27일
No, this doesn't work, either (I have the same problem as the previous posters, on Mac OS X Yosemite 10.10.3).
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!