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

I created a eclipse.desktop and locked it to unity launcherd , when I double click on it on desktop, the eclipse was launched just like launching from unity launcher. But if I start it from command line by "path/to/eclipse", the unity launcher will create a new icon in the launcher bar.

How can I avoid this? Is there a command to open the desktop launcher just like double click on it?

share|improve this question
I found a way to update the unity icons by "unity --reset" and "unity --reset-icons", it needs reboot, I have not tried it. – sean Apr 22 '13 at 3:27
Don't do unity --reset first that will not work in latest ubuntu and for older it will reset all your desktop configuration. And neither unity ---reset-icons will help in this case. Please include the content of the desktop file in the question. – Web-E Apr 22 '13 at 6:18
up vote 1 down vote accepted

You can do the following to make the association between the launcher and its command stronger:

1.) Launch eclipse from the command line

2.) Execute xprop WM_CLASS from a terminal and note down one of the quoted strings

3.) Edit your launcher with the following line:


where $WM_CLASS is one of the quoted strings.

For this to work please make sure your .desktop launcher is located somewhere, where it's recognized by the system, e.g. $HOME/.local/share/applications or /usr/share/applications.

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.