0

I've recently installed MATLAB to /opt/matlab/R2016a and I've managed to give myself the privilidges to run it. Next I wanted to be able to run it from a terminal and or the Alt+F2 "quick command line" so I added export PATH=${PATH}:/opt/matlab/R2016a/bin (where the executeable matlab is located) to ~/.profile as was suggested in this thread.

Thanks to this I was able to run MATLAB from a terminal by simply typing matlab and the program would start normally as you'd expect. But when I tried to run it using Alt+F2 and typing matlab the splash screen did appear, but the program didn't launch.

I was under the impression that Alt+F2 just opened a "one line terminal" to quickly execute something, but it doesn't seem to work from there.

Shouldn't I be able to run it like this? What am I missing?

1 Answers1

0

The ~/.profile is read (and thus the PATH is set) only once during the start-up of your environment (I assume you're using Gnome here?). So your edit will be in effect when you open a terminal (because it starts a new shell instance, which reads in your ~/.profile), but for the Alt+F2 to work, your Gnome shell would need to restart. The easiest way to achieve this is to log out and then log in again.

mathrick
  • 606
  • I was aware of this due to the mentioned thread and I not only logged in and out, but rebooted the whole system between changes and it still doesn't work. And like I say, the splash screen appears and the process is active for a few seconds (when using Alt+F2 ), which I was able to confirm using top, but the program seems to shut itself down, before it can fully open. And like I say the program runs without problem when run from a terminal. – KeriBoti Mar 16 '20 at 13:58