How to run Matlab without root permissions
If you have issues with Matlab to run commands without root, probably you will see this:
INFO: READ: OnSendHeadersMessage{type=OnSendHeaders, uid=557, browserContextId=0, requestId=57, url=https://localhost:31515/messageservice/async, method=POST, headers=Origin: https://localhost:31515
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.52 Safari/537.36
Content-Type: application/json
Accept: */*
Referer: https://localhost:31515/remote/proxy/1.5/iframeProxyRelease.html
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Cookie: JSESSIONID2=aUWOscLC3o6cqUdV; ssnc=24WR68u39rLEOyhW
}, SocketInfo{channelId=0, browserId=-1, channelType=Main}
To fix it, just add permissions to your user with:
sudo chown -R $USER:$USER /usr/local/MATLAB/R2018b
If you run Matlab again, you will see this:
at com.mathworks.mlwidgets.shortcuts.ShortcutUtils.getShortcutsFile(ShortcutUtils.java:703)
at com.mathworks.mlwidgets.shortcuts.ShortcutUtils.saveDocument(ShortcutUtils.java:2034)
at com.mathworks.mlwidgets.shortcuts.ShortcutUtils.createInitialFavorites(ShortcutUtils.java:322)
Cannot write to preference file "matlab.prf" in "/home/$USER/.matlab/R2018b".
Check file permissions.
The desktop configuration was not saved successfully
To fix it, just add permissions to your local matlab folder:
sudo chown -R $USER /home/$USER/.matlab/R2018b/
Enjoy it!
INFO: READ: OnSendHeadersMessage{type=OnSendHeaders, uid=557, browserContextId=0, requestId=57, url=https://localhost:31515/messageservice/async, method=POST, headers=Origin: https://localhost:31515
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.52 Safari/537.36
Content-Type: application/json
Accept: */*
Referer: https://localhost:31515/remote/proxy/1.5/iframeProxyRelease.html
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Cookie: JSESSIONID2=aUWOscLC3o6cqUdV; ssnc=24WR68u39rLEOyhW
}, SocketInfo{channelId=0, browserId=-1, channelType=Main}
To fix it, just add permissions to your user with:
sudo chown -R $USER:$USER /usr/local/MATLAB/R2018b
If you run Matlab again, you will see this:
at com.mathworks.mlwidgets.shortcuts.ShortcutUtils.getShortcutsFile(ShortcutUtils.java:703)
at com.mathworks.mlwidgets.shortcuts.ShortcutUtils.saveDocument(ShortcutUtils.java:2034)
at com.mathworks.mlwidgets.shortcuts.ShortcutUtils.createInitialFavorites(ShortcutUtils.java:322)
Cannot write to preference file "matlab.prf" in "/home/$USER/.matlab/R2018b".
Check file permissions.
The desktop configuration was not saved successfully
To fix it, just add permissions to your local matlab folder:
sudo chown -R $USER /home/$USER/.matlab/R2018b/
Enjoy it!
Comments
Post a Comment