MATLAB permission error in Linux Ubuntu 18.04

22 次查看(过去 30 天)
I've installed MATLAB in Ubuntu 18.04.
When I open MATLAB it gives me a warning that the desktop configuration was not saved succesfully. When I try to use any command in the command window, it gives me an exception.
The desktop configuration was not saved successfully
>> clear
An error was encountered while saving the command history
java.io.FileNotFoundException: /home/shihab/.matlab/R2019a/History.xml (Permission denied)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
at com.mathworks.mde.cmdhist.AltHistoryCollection$CommandSaver.run(AltHistoryCollection.java:1214)
at java.lang.Thread.run(Thread.java:748)
Any help would be appreciated.
I tried two commands, but they didn't help
sudo chmod -R 777 /usr/local/MATLAB/R2019a/
sudo chown -R $LOGNAME: /usr/local/MATLAB/R2019a
But neither of them worked. If I use MATLAB with from a root terminal, I don't get any errors.
  2 个评论
Walter Roberson
Walter Roberson 2019-8-14
/home/shihab/.matlab/R2019a/History.xml is the file that is having the problem. You should be granting permission for that file specifically or for /home/shihab/.matlab/R2019a directory.
Mohd Shihabuddin Khan
Thanks a lot Walter. It worked. Now that I look at it, it was so obvious. Thanks for helping out. :)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by