Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run Matlab from its launcher, a second icon will show up. Funny thing is that if I put the mouse on the new icon, the text that appears on it is not the one I have in my .desktop file. So my guess is that the launcher is launching the script but it is not capable of associating it with its icon, so it launches a secondary one.

So far it only happened with Matlab.

I don't know what happened, it was working fine and now it doesn't. I don't feel I have changed anything.

I have the .desktop file in .local/share/launchers. Its code is:

[Desktop Entry]
Exec=/usr/local/MATLAB/R2012a/bin/matlab -desktop

But I don't think the problem is related to this. Maybe some of the last updates? I don't know.

share|improve this question

Add the following line to your .desktop file

share|improve this answer
I had already tried that one and didn't work. Anyway I tried again and it still happens. I have found that it also happens to a friend using gnome 3. – user65346 May 24 '12 at 12:57

Add the following line to your .desktop file


For me it worked. The second icon appears only when matlab is starting and there is the little window with written "Matlab: the Language of Technical computing"; then it disappears and only one icon remains.

I've also installed the package matlab-support, maybe it can be useful.

share|improve this answer
Hey... that solution was already proposed and said that was not working :) I also have that package and have the same problem – user65346 Aug 27 '12 at 6:43

I had the same problem with Matlab R2013a. I opened .desktop file and found that the content was right except for the fact that there was a blank line between StartupNotify=true and StartupWMClass=com-mathworks-util-PostVMInit. I removed the blank line, restarted matlab, and it worked. Now only one icon appears as expected. Not sure, how it worked!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.