Linux ssh: can I redirect only the MATLAB plot windows with X-forwarding?

조회 수: 6 (최근 30일)
I often use ssh -X (on Linux and MacOS) to run graphical programs remotely and see the output on my screen with X-forwarding.
I can run MATLAB like this, but it is slow as it is forwarding the entire MATLAB window.
Is there a way to run MATLAB on a remote machine using ssh -X, but only the plot windows are forwarded to my screen?
I use the following command to run MATLAB over ssh with no graphics:
matlab -nosplash -nodisplay
I'm a bit confused by all the relevant command line options for MATLAB in Linux. Which combination of these will forward only the plot windows?
-display Xdisplay - Send X commands to X server display, Xdisplay.
Linux only.
-nodisplay - Do not display any X commands. The MATLAB
desktop will not be started. However, unless
-nojvm is also provided the Java virtual machine
will be started.
-noFigureWindows - Disables the display of figure windows in MATLAB.
-nosplash - Do not display the splash screen during startup.
-desktop - Allow the MATLAB desktop to be started by a
process without a controlling terminal. This is
usually a required command line argument when
attempting to start MATLAB from a window manager
menu or desktop icon.
-nodesktop - Do not start the MATLAB desktop. Use the current
terminal for commands. The Java virtual machine
will be started.
-nojvm - Shut off all Java support by not starting the
Java virtual machine. In particular the MATLAB
desktop will not be started.

채택된 답변

Walter Roberson
Walter Roberson 2025년 3월 6일
Sorry, there is no way to forward only plot windows.
You could run with the command window minimized, which should reduce the graphics update due to the command window. (Presumably you are running some kind of batch script so you do not need to look at the command window.)
  댓글 수: 1
dormant
dormant 2025년 3월 7일
Thanks.
As most of my scripts automatically save the plot file, I could also run a plot viewer after the script has finished.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by