0

This question already has an answer here:

I have an application which doesn't come from any ubuntu repo (neither official, nor ppa) but available as tgz and supposed to be unpacked and ready to use. To be precise it is LightTable. The problem is the application when launched shows it's own icon n unity panel. After making custom .desktop file and placing shortcut onto unity panel (by dragging from dash launcher) and launching it I see two icons - one placed by me and another one with real application.

This is the .desktop contents:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/LightTable/LightTable
Name=Light Table
Icon=/opt/LightTable/core/img/lticon.png

One more thing. The /opt/LightTable/LightTable is bash script file and eventually /opt/LightTable/ltbin is being launched. I think this is the problem but have no idea how to fix the problem.

Thanks.

marked as duplicate by Jacob Vlijm, kiri, Eric Carvalho, David Foerster, Eliah Kagan Apr 9 '15 at 21:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

You have to add a StartupWMClass string into your .desktop file. This is a string that defines in which class the application is grouped in the Unity Launcher at startup.

The solution is to add StartupWMClass to your desktop file. First you need to find the proper class for your application.

It is explained here (Thanks to @chaos).

Open your Light Table window and type in terminal:

xprop WM_CLASS

Then click on the LIght Table window.

For gnome terminal WM_CLASS should be something like

WM_CLASS(STRING) = "gnome-terminal", "Gnome-terminal"

So all windows with WM_CLASS "gnome-terminal" and "Gnome-terminal" are grouped together. For light table you will see different class. Pick one and remember it.

After you find your program class add this to your .desktop file:

StartupWMClass=CLASS

Replace CLASS with the class from previous command.

  • Thanks! Actually tried that previously. In my case it was WM_CLASS(STRING) = "ltbin", "Ltbin". I've tried it with StartupWMClass=Ltbin and it didn't work, but after your answer I tried StartupWMClass=ltbin and worked like a charm. Thanks again! – igorp1024 Apr 7 '15 at 15:39
  • UPD: this thread misleaded me. – igorp1024 Apr 7 '15 at 15:49

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