I have Matlab installed under
/home/fer/Matlab, with the main exec file being
/home/fer/Matlab/R2014b/bin/matlab. There is something weird with it and it only works if I open it with the terminal using
sudo. If I run it without sudo it throws a permission error and closes (I guess it's reading somewhere).
Anyway, I was trying to create a
.desktop file to be able to open it from the menu, and because it needs to run under sudo, in the exec line I wrote:
Exec=gksudo -u root /home/fer/Matlab/R2014b/bin/matlab
When I click on the shortcut, it asks me for my password, then the Matlab splash appears, then closes, and nothing happens. This looks a lot like a problem with Matlab itself, but am I doing it right with the exec line of the .desktop file? Do I need to add anything else? If a program requires a terminal to run from, is there anyway I can emulate one from the desktop file?
EDIT: As asked in comments:
fer and all files and subdirectories in Matlab/R2014b are owned by user
fer and group
fer. The error is written in a Matlab window, saying tht there is not write permission on /home/fer/.matlab/R2014b/temp0x... I will try to look into that directory.