【发布时间】:2021-08-27 19:20:53
【问题描述】:
在 AWS 上,我运行了一个 matlab 堆栈。通过远程桌面,matlab 运行(通过 gui)。但是,通过 ssh,我想通过终端运行 matlab 作为 bash 管道的一部分,而不会弹出 gui。但是,当我尝试使用 ssh 通过终端运行一个简单的 matlab 脚本时
/usr/local/MATLAB/R2019a/bin/matlab -batch 'run simpleScript.m'
我收到此错误:
MATLAB is selecting SOFTWARE OPENGL rendering. terminate called after throwing an instance of '(anonymous namespace)::DisplayError' what(): No display available.
我想知道是否有人对此有任何解决方法?这只是在 aws 上使用 matlab 的限制吗?
为任何帮助干杯!
【问题讨论】:
-
您尝试过
-nodisplay或-nodesktop选项吗? -
还要检查
matlab -nodesktop -nospash。 -
@LuisMendo 和 Marcin 感谢您的回复!是的,我试过这些。我认为从 2019a 开始,
-batch本质上是-nodesktop -nosplash -nodisplay的综合效果。我认为问题的出现是因为在 aws matlab 上似乎每次调用时都需要身份验证(通过 gui)。但可能有解决办法,不确定。 -
请问:在这种情况下,您的 MATLAB 从哪里获得许可证?
-
@Edric 当然!许可证是个人许可证类型。我可能应该更清楚地说明问题不在于许可证,因为我可以使用远程桌面,通过 gui 进行身份验证并说“2+2”在 matlab IDE 环境中工作。这里的问题是我想在实例的整个生命周期内最多验证一次,然后通过终端连续运行 matlab。
标签: amazon-web-services matlab amazon-ec2 ssh