0

I have installed Matlab 2015a on my Ubuntu 14.04. I have installed Matlab 2015a on the default path it offered me. which is

/usr/local/MATLAB/MATLAB_Production_Server/R2015a

to run matlab I need to go to the following folder and and go to /bin then type ./matlab. Only then, the matlab runs. Can anyone please help and guide me how to create an icon on launch pad or create a desktop shortcut icon? I really need help.

2
  • Have a long at help.ubuntu.com/community/UnityLaunchersAndDesktopFiles
    – Ron
    Jan 16, 2016 at 6:37
  • Dear Ron, Thank you for your support. I have been able to solve this problem with the combination of the web page that you suggested as well as others. I would leave a a detailed sample of the instruction and code that used so that, if there are other Matlab R2015a users; and after they install it, they can take help from this question/answer thread. Jan 17, 2016 at 5:40

2 Answers 2

1

Alright, since I was new to ubuntu it took me a while to figure out how to solve the above stated problem. I did the following steps as I have arranged it here, below. This should be mentioned here that the directory in which I installed was /usr/local/MATLAB/MATLAB_Production_Server/R2015a.

  1. Download a *.png image of the matlab logo using the browser. By default it should be saved in the folder /home/<username>/Downloads.

  2. Now copy this *.png image to the matlab installation directory. I faced trouble using only the cp command. Then I used the sudo cp command. It was like this sudo cp /home/<username>/Downloads /usr/local/MATLAB/MATLAB_Production_Server/R2015a. Then it worked.

  3. Open an editor like Gedit. Type the following code/text, line by line:

    [Desktop Entry] 
    Version=1.0 
    Name=Matlab 2015a  
    Comment=Launch Matlab
    2015a with one click
    Exec=/usr/local/MATLAB/MATLAB_Production_Server/R2015a/bin/matlab
    Icon=/usr/local/MATLAB/MATLAB_Production_Server/R2015a/matlab.png
    Terminal=true 
    Type=Application 
    Catagories=Utility;Application;
    

    Now save the file with the name Matlab 2015a.desktop. After this, you should see a normal file on your desktop. right click on the file and go to Properties. click on Permission then click on Allow executing file as program. This time the file you created on your desktop should have the Matlab logo.

  4. Double click on the Matlab 2015a logo that you created and enjoy your hard work.

1
  • Why chmod 777? The Matlab directory already needs to have read and traversal permissions for everybody so everybody can run it and so will any file copied there with sudo cp. Don't go around and make files and directories world-writeable for no reason! I removed that part. Sep 8, 2016 at 16:44
0

This answer is to create shortcuts for any Applications.

what you have to do is just download a .png file that you want to set as "icon"

and find the path from where you are executing(opening) it from terminal

In my case my my png file is in /usr/share/icons/matlab.png
and executable "matlab" file is at /usr/local/MATLAB/MATLAB_Production_Server/R2015a/bin/

now open any text editor "gedit" and paste below commands and replace respective paths and save the file with name.desktop where name is anything you want.

[Note: To create launcher on DOC I will recommend you to save name.desktop on Desktop folder.]

[Desktop Entry]
Version=1.0
Name=Matlab R2015a
Comment=MATLAB shortcut!
Exec=/usr/local/MATLAB/MATLAB_Production_Server/R2015a/bin/matlab
Icon=/usr/share/icons/matlab.png
Terminal=true
Type=Application
Categories=Utility;Application;

now right click on file goto--->properties-->permissions and at bottom select Allow executing file as program
Hurray you did it.
Now just double click and enjoy the shortcut.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .