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

6 ビュー (過去 30 日間)
dormant
dormant 2025 年 3 月 6 日
コメント済み: dormant 2025 年 3 月 7 日
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 Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by