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?

  • 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, 2013 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, 2013 at 6:18

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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