My MATLAB launcher doesn't work
Try specifying the full path in the launcher you are using.
So for example if the output of which matlab
is /usr/bin/matlab
, then change
the Exec
field to
Exec=/usr/bin/matlab -desktop
Note that if this does solve the issue for you it's likely because you have a script called matlab
that is shadowing the original matlab
command and so perhaps matlab
is not receiving the -desktop
flag which it needs to run when launched without a terminal.
See this entry for more details about getting the launcher to start properly by using -desktop
.
If for some reason you still get nothing, try setting the type
field to terminal application to diagnose the problem further.
I had this same problem and many of the fixes I found didn't work. Here was the solution I finally came to using Ubuntu 14.04 with MATLAB 2016a.
MATLAB opens from the terminal fine, so find out what is being called for that command:
> which matlab
/usr/local/bin/matlab
Then to actually create the icon, I just launched MATLAB from the terminal
> matlab
and when the icon appeared in the launcher, I right clicked on it and clicked 'Lock to Launcher'. Here is where my solution diverged from a lot of the other solutions. Instead creating a .desktop file in /usr/local/applications
, I actually had to modify the one that was created in ~/.local/share/applications
> gedit ~/.local/share/applications/matlab_r2016a.desktop
and modified the file to
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=MATLAB R2016a
Icon=matlab_r2016a.png
Path=/home/username
Exec=/usr/local/bin/matlab -desktop
StartupNotify=true
StartupWMClass=MATLAB R2016a
OnlyShowIn=Unity;
X-UnityGenerated=true
where the Path points to your home directory and the Exec is whatever which matlab
returned plus the flag -desktop