2

I use an application (Simplify3D for example) which is a binary launched by bash script.
The GUI is created by the binary, while the .desktop file points to the script.
For this reason I do have an icon on the Desktop launcher and in the lens, but do not have an icon in the Unity Launcher - just a grey box with a question mark.
How can I make the icon visible in the launcher too?

The .desktop file contents is

[Desktop Entry]
Type=Application
Version=0.9.4
Name=Simplify3D
Comment=Simplify3D Software
Icon=/opt/Simplify3D/icon.png
Exec=/opt/Simplify3D/LaunchScript.sh
Terminal=false
Path=/opt/Simplify3D
StartupWMClass=Simplify3D // That line fixed it
  • And it doesn't work, presumably for the reason I described. Or do you mean some line specific for launcher? What is it then? – Barafu Albino Aug 4 '14 at 11:49
  • Can you add in your question the result of cat 'yourFile'.desktop – Boris Aug 4 '14 at 11:53
  • Yes, in a few hours. – Barafu Albino Aug 4 '14 at 11:56
  • Rinzwind, this is not similar because in my case .desktop file has appointed icon, but Unity Launcher, and only it, does not see that icon. Everything else does see the icon. – Barafu Albino Aug 4 '14 at 11:58
2

In these "indirect" cases, you have to tell the desktop file what application it is connected to:

Add a line to your .desktop file, like:

StartupWMClass=[your_application] (the binary file in this case)

also pointed out here.

| improve this answer | |
  • Nailed it! Thanks. As per this answer, the string was not the binary file, but the class I had to figure out with xprop WM_CLASS command. – Barafu Albino Aug 4 '14 at 16:36

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.