I referred this link for my problem: How to create launcher icon

Though my matlab icon is already created, whenever I click it this shows up for a few seconds:

Matlab splash screen appearing temporarily

Then, the application closes itself automatically!

I have to run it from the terminal every time for MATLAB to actually open and go beyond the splash screen:


Though the above method works perfectly, I want to be able to run it properly from the icon, I can't seem to figure out what the problem is.

As mentioned in the link above, of the top voted answer I did this first:

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

Then deleted all the contents of the .matlab file and replaced it with:

[Desktop Entry]

Exec=/usr/local/MATLAB/R2017a/bin/matlab -desktop
Comment=Scientific computing environment


When I retry doing the first step, I get the following message:

ln: failed to create hard link '/usr/share/applications/matlab.desktop': File exists

Then I tried creating a soft-link as suggested in one of the answers:

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

Nothing seems to work for me, help!


There are 2 problems with your approach.

  1. you use hardlink instead of symlink explained here
  2. you switched target and link paths. It should be sudo ln -s pathToLink pathToTarget

So this is the corrected command:

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

| improve this answer | |
  • I copied and ran the exact corrected command that you suggested, but it gave me a similar message: ln: failed to create symbolic link '/usr/share/app-install/desktop/matlab-support:matlab.desktop': File exists – Kewal Shah Jan 13 '18 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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