Adding Matlab to launcher in Ubuntu

I screwed up my Matlab2013b installation on Ubuntu 14.04, so decided to re-install. Upgraded to Matlab2014b in the process.

Installation was straight forward – download linux 64-bit from Mathworks site, install to /usr/local/MATLAB and have the installer make the symbolic links to the executable binaries for me. Matlab has really polished that process.

2014b no longer gives me problems with tab-complete menus.

One little thing – while searching for Matlab in the Unity menu (invoked by pressing the Meta or Windows key), the Matlab icon comes up. Dragging it to the launcher menu also works, but instead of getting the same icon, it’s simply a picture of a question mark. Cosmetically very unpleasing and confusing.

The fix:

The launcher icon is specified in

#!/usr/bin/env xdg-open
[Desktop Entry]
Comment=Start MATLAB - The Language of Technical Computing
#Uncomment the following line and comment the line after to
#force matlab to use the 32 bits architecture
#Exec=matlab -arch=glnx86 -desktop
Exec=matlab -desktop
#Uncomment the following line if you've got several matlab icons in the launcher

The value of the Icon field specifies what image to use as launcher icon. It seems the default path is not valid.

The Matlab icon in the Unity search menu is configured by (I think..):

[Desktop Entry]

Exec=matlab -desktop
Comment=Scientific computing environment


The value for the Icon field actually refers to
/usr/share/app-install/icons/_usr_share_icons_hicolor_48x48_apps_matlab.png. It’s good to change field value to that to better reflect this.

So, we can either take
/usr/share/app-install/icons/_usr_share_icons_hicolor_48x48_apps_matlab.png and give it to the Icon field in the first config file, or copy that image to the location specified by the default path in the first config file.

After this, Matlab has a nice icon in the launcher menu.


About collapsedwavefn

I have a lot of thoughts. Some of them I'd like to share.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s