2

I've installed Matlab inside /home/user/Desktop/matlabFolder/bin/ .

I can run Matlab running /home/user/Desktop/matlabFolder/bin/matlab inside a terminal, and it works.

I created a .desktop file here: /home/user/.local/share/applications/matlab.desktop and this is the content:

[Desktop Entry]
Name=MATLAB
Exec=/home/user/Desktop/matlabFolder/bin/matlab
Icon=/home/user/Pictures/Matlab_Logo.png
Terminal=false
Type=Application
Categories=Development;Math;Science;Education;

If I search for MATLAB in application launcher, I find the icon and I can start it... I can see the Matlab logo that shows that it's starting but after some seconds the logo disappears and nothing happens..... Why? How can I try to fix? Can it be something related to ambient variables and stuff like that?

5
  • Just an idea: What if you tried making it say Terminal=true? Also, the path /home/user/Desktop/matlabFolder/bin/matlab should have a file type at the end. Look at the file, and see what it is. It may be a .deb file, or something. Just a suggestion.
    – Logan
    Commented Apr 23, 2021 at 17:32
  • @Jeff "[...]/bin/matlab should have a file type at the end" — Not necessarily; actually, quite the contrary. Look into your /usr/bin/ directory and see for yourself. Application executable files usually lack any file type extension.
    – Levente
    Commented Apr 23, 2021 at 17:46
  • @allexj what looks weird to me is that the /home/<YourUserNameHere>/Desktop/matlabFolder/bin/[...] path suggests that your entire application is hosted out of your ~/Desktop/ folder. That should not be the case. The ~/Desktop/ folder should contain only symlinks, and other lightweight stuff, I believe. You could put your matlabFolder/ anywhere within your user's home: ~ (and then refer to that correctly in the Exec line of the .desktop file.
    – Levente
    Commented Apr 23, 2021 at 17:51
  • @Levente I don't think I have understood what you said :( why should it be a problem if matlab binaries are in a folder in the Desktop?
    – Allexj
    Commented Apr 23, 2021 at 21:46
  • Weeeeellllll because on Windows,,, 10 years ago,,, it was the case thattttt...... Well, admittedly I took this idea out of my Windows Urban Legends shelf. But really, I seem to have heard that on Windows, files placed on the desktop were always loaded into memory upon every system start. So when people stuffed their desktops with actual heavy-weight documents, instead only with "shortcuts", all they achieved was overstuffing their RAM with a whole bunch of cruft that they did not intend to work with in the given session. And today I presumed that it's the case for contemporary Ubuntu too.
    – Levente
    Commented Apr 23, 2021 at 23:05

1 Answer 1

2

You have to add -desktop at the end of Exec=... desktop-file field.

So the correct line will look like

Exec=/home/user/Desktop/matlabFolder/bin/matlab -desktop
2
  • doesn't work, just tried :(
    – Allexj
    Commented Apr 23, 2021 at 21:43
  • worked for me! Thanks :)
    – Robb1
    Commented Oct 17, 2021 at 5:50

You must log in to answer this question.

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