Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I recently installed Matlab R2013a and it is working fine, however the only way I can start it is by running /usr/local/MATLAB/R2013a/bin/matlab in the terminal. If I type in matlab it says command not found, and I can't seem to get an icon in the side-bar launcher. How can I make it so I can run from the command matlab or from a launcher?

Edit: I have created a link so I can launch it by typing matlab in the terminal. I still can't get the unity icon launcher working though. I managed to create an icon via a matlab.desktop file in /usr/share/applications. When I click it, it launches Matlab, but after the initial loading screen Matlab shuts down instead of launching the application. It works through the terminal though. My matlab.desktop file is:

[Desktop Entry]
Comment=Matlab R2013a
share|improve this question
you sure the matlab.desktop file has executable permissions? If it does not, it won't launch. –  Dan Johansen Oct 9 '14 at 9:41

4 Answers 4

In your matlab.desktop file, you need to specify that you want to execute in the desktop.

Your Exec= should look like this:

 Exec=/usr/local/MATLAB/R2013a/bin/matlab -desktop
share|improve this answer

The lock to launcher is indeed not working for matlab. There is however a .desktop file that is part of the Matlab installation.

sudo ln /usr/share/app-install/desktop/matlab-support:matlab.desktop /usr/share/applications/matlab.desktop

You have to update a few things in that file:

[Desktop Entry]

Exec=matlab -desktop
Comment=Scientific computing environment


Give the icon an absolute file path:


And change:


Now you should be able to lock the icon to the launcher as well as start matlab from there.

share|improve this answer
This is working. –  eccstartup May 3 at 10:46
And Terminal=true is not required. –  eccstartup May 3 at 10:46

For me this works perfectly ...

1.download your own icon-

sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png

2.give your access permission

sudo touch /usr/share/applications/matlab.desktop

3.edit your .desktop file

sudo gedit /usr/share/applications/matlab.desktop

4.and paste the following into the document.

#!/usr/bin/env xdg-open [Desktop Entry] Type=Application Icon=/usr/share/icons/matlab.png Name=MATLAB R2014a Comment=Start MATLAB - The Language of Technical Computing Exec=matlab -desktop Categories=Development;

that's it..! Save, and you should have a new desktop shortcut in your launcher

good luck.

share|improve this answer

Create a symbolic link in /usr/local/bin, i.e. as su

ln -s /usr/local/MATLAB/R2013a/bin/matlab /usr/local/bin/matlab

Once MATLAB is running, an icon should appear in the launcher toolbar. Right click it and lock it to the launcher.

share|improve this answer
That works so I can run it by typing matlab in the terminal. However, the lock to launcher is not working. Is there a way to make it show up when I search matlab in the unity launcher or so that I can have a desktop icon for it? –  Isaac Vandermeulen Jan 8 '14 at 3:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.