1

I've downloaded the Eclipse C/C++ IDE for 2018-09 and installed it by extracting the package in a folder. So I've created the following Eclipse-CDT.desktop file in /home/username/.local/share/applications/ to add the eclipse to the gnome menu and the launcher.

[Desktop Entry]
Version=1.0
Name=Eclipse-CDT
Comment=C\C++ IDE
Type=Application
Categories=Development;IDE;
Exec=/home/username/apps/eclipse/eclipse
Terminal=false
StartupNotify=true
Icon=/home/username/apps/eclipse/icon.xpm

I've also changed the icon.xpm with the same dimensions. Consequently theEclipse-CDT with the new icon appears in the gnome menu and then we are able to add it to the launcher.

The problem is when I open it from menu or launcher, the former icon(which was removed) is appeared in the launcher as an active app, while the newly added one remains inactive. Why?

I'm using Ubuntu 18.04.

  • I would guess that it's because the entry you have created is only for Desktop as implied at the top of the file by [Desktop Entry]. I'm not sure how to fix this which is what I assume you are trying to ask here. – Jeff Oct 15 '18 at 15:10
  • What's your Ubuntu version and flavour (standard-Ubuntu/Kubuntu/Xubuntu/Ubuntu-MATE etc.)? – pomsky Oct 15 '18 at 15:15
  • @Jeff Do you mean my question is unclear? @pomsky I'm using ubuntu 18.04 – mstfyghm Oct 15 '18 at 16:46
  • Possible duplicate of Duplicate applications icons in Ubuntu dock on Ubuntu 17.10 with GNOME shell. Your question is fine, you just need to add a correct StartupWMClass= line to your .desktop file. (cc @Jeff) – pomsky Oct 15 '18 at 16:57
  • Thanks @pomsky. About the link you shared, I don't understand the concept behind the WM_CLASS but the idea that I get from that post was maybe the problem is related to the names. I changed the .desktop file name ` and the Name= field in it to the eclips and the problem solved! The reason? I don't know! – mstfyghm Oct 15 '18 at 18:45
0

Renaming the .desktop file to the eclipse.desktop solved this problem:

cd ~/.local/share/applications/
mv Eclipse-CDT.desktop eclipse.desktop

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.