Matlab launcher in applications menu

Hi,

I’m using openSUSE 15.0 Gnome version. I’ve installed Matlab on my desktop and i can start it from the script named matlab in /usr/local/bin.

However i’d like to have a Matlab launcher in the Applications menu under Applications -> Education or Applications -> Other just like Scilab or GNU Octave. How can i do this?

Thanks.

Hi
You just need to create a desktop file and find a suitable icon and pop this icon in your ~/.icons directory…


[Desktop Entry]
Name=MATLAB
Exec= /usr/local/bin/matlab
Icon=~/.icons/<your_matlab_icon.png>
Terminal=false
Type=Application
Categories=Education;Math;

Save as matlab.desktop in ~/.local/share/applications directory

Hi Malcolm,

Thanks for your reply. I tried what you said and have partially succeeded. Now there is a Matlab launcher in Applications -> Education but the launcher has no icon/logo - i can see the generic icon for an executable. Actually there is no ~/.icons folder. I tried putting the icon.png in /usr/share/icons/hicolor/apps/256x256 and /usr/share/icons/hicolor/apps/512x512 but the icon never shows up in Applications -> Education.

I was out of town and so i could not access my system till today, so sorry for the late reply

On Wed 05 Sep 2018 11:06:03 AM CDT, samrat rao wrote:

Hi Malcolm,

Thanks for your reply. I tried what you said and have partially
succeeded. Now there is a Matlab launcher in Applications -> Education
but the launcher has no icon/logo - i can see the generic icon for an
executable. Actually there is no ~/.icons folder. I tried putting the
icon.png in /usr/share/icons/hicolor/apps/256x256 and
/usr/share/icons/hicolor/apps/512x512 but the icon never shows up in
Applications -> Education.

I was out of town and so i could not access my system till today, so
sorry for the late reply

Hi
Try your icon in /usr/share/pixmaps or a svg one
in /usr/share/icons/hicolor/scalable/apps/

You need to make the ~/.icons directory if it doesn’t exists.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.16-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hi Malcolm,

I put the png image in /usr/share/icons/hicolor/scalable/apps and the file matlab.desktop in /usr/share/applications/.

Now in Applications -> Education the Matlab icon is correctly shown.

But the launcher does not work properly. When i click on it Matlab begins to start but then the Matlab quits.

However Matlab starts correctly when i start it from the command prompt using the same command as written in matlab.desktop

These are the entries in matlab.desktop

[Desktop Entry]
Name=Matlab
Comment=Matrix Laboratory
Exec=/usr/local/bin/matlab
Icon=matlab
StartupNotify=false
Terminal=false
Type=Application
Categories=Education;Science;Math;

Hi
Change the Exec to add desktop (and any other runtime options you want);


Exec=/usr/local/bin/matlab -desktop

Hi Malcolm,

Matlab is launching correctly now. Thank you for your time and efforts.