In short: My desktop shortcut for MATLAB fails. It is very likely not a problem with MATLAB but how I made the .desktop
file. How can I fix that, what did I do wrong? Here's the full story:
I installed MATLAB on Ubuntu 20.04 manually. I installed it in /opt/
and created a matlab.sh
as well as a matlab symbolic link inside /usr/local/bin
.
lrwxrwxrwx 1 root root 21 janv. 19 17:18 matlab -> /opt/MATLAB/matlab.sh*
matlab.sh
#!/bin/bash
LIGHT_ORANGE_COLOR="\e[38;5;216m"
TURQUOISE_COLOR="\e[38;5;43m"
LIGHT_BLUE_COLOR="\e[38;5;153m"
RED_COLOR="\e[38;5;196m"
NO_COLOR="\e[0m"
echo -e "${TURQUOISE_COLOR}### starting MATLAB ###${NO_COLOR}"
/opt/MATLAB/R2020b/bin/matlab
When I type matlab
in a new terminal, it starts and run properly. Then I decided to create a desktop shortcut with sudo gedit matlab.desktop
inside /usr/share/applications
:
matlab.desktop
[Desktop Entry]
Name=Matlab
Comment=Matlab student version
GenericName=Matlab
Exec=matlab
Icon=/opt/MATLAB/matlab_logo.png
Type=Application
Categories=Utility;Matlab;MATLAB;Maths;
On the desktop application menu, I now have a fancy clickable icon for MATLAB. However, when I click on it, I can see the blue square with MATLAB logo meaning the software is starting properly and then nothing. On htop
I can see that the process disappears a few seconds after launch.
I'm confused since my matlab
command works flawlessly...
Any idea how to fix that?
0 Answers