Adding a MATLAB icon to the GNOME Applications menu in Ubuntu
One of the problems with the Linux MATLAB installer is that it doesn’t add any items to the menu in windows managers such as GNOME or KDE so you have to do it manually. Now, there are several ways to do this but one of the easiest is to use the GUI tools provided with Ubuntu (assuming you are using Ubuntu of course). For the record I am using Ubuntu 9.10 (Karmic Koala) with the default GNOME windows manager along with MATLAB 2009b but I imagine that these instructions will work for a few other configurations too.
First things first, you’ll want to download a nice, scalable MATLAB icon since the ones included with MATLAB itself are a bit crude to say the least. I tried to create one directly from MATLAB using the logo command and the Scalable Vector Graphics (SVG) Export of Figures package on The File Exchange but the result wasn’t very good (see below).
Fortunately someone called malte has created a much nicer .svg file (using inkscape) that looks just like the MATLAB logo and made it available via his blog.
Once you have the svg file you can start creating the shortcut as follows:
- On the GNOME Desktop click on System->Preferences->Main Menu
- Once the Main Menu program has started choose where you want your MATLAB icon to go and click on New Item. In the screenshot below I have started to put it in the Programming submenu.
- Give your shortcut a name and put matlab -desktop in the command field. If you didn’t create a shortcut to the matlab executable when you installed the program then you may need to put the full path in instead (i.e. something like /opt/MATLAB/2009b/bin/matlab )
- Now let’s sort out the icon. Click on the spring on the left hand side of the above window to get the window below.
- Click on Browse and then select the folder that contains the .svg file you downloaded from malte’s blog. I put it in my Desktop folder for the screenshot below. Note that the svg file doesn’t appear in the preview pane. Click on Open.
- Choose your icon.
- Click on Close and you are done
If you are using the Student version of MATLAB then the process is slightly different and has been covered by my friend Paul Brabban over at CrossedStreams.com.
Oh yea.. Thanks dude
Thanks a lot. I added it to my menu just fine, but I didn’t have the -desktop option. I googled to see why it wasn’t opening, and found this. Works like a charm!
https://help.ubuntu.com/community/MATLAB
i think this one is much simpler than your approach
@Jay
I search it Dast Home menu, but I cannot enter it, how can we select matlab desktop?