远程桌面MATLAB启动失败问题解决
远程桌面打开MATLAB会报错,解决办法,打开matlab的licenses路径,如matlab/R2017b/licenses/
,路径下存有license文件,如license_standalone.lic
(可能为其他名字),打开文件,在每行如下位置添加TS_OK
。
行数较多,可通过执行如下python
脚本自动添加,注意,执行前先备份
license_path = './license_standalone.lic'
with open(license_path, 'r') as fr:
lines = fr.readlines()
with open(license_path, 'w') as fw:
for i, line in enumerate(lines):
if (line[-2] == '\\'):
continue
lines[i] = line[:-2] + ' TS_OK\n'
fw.writelines(lines)
再远程启动就可以成功了。