1

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 its own icon in Unity Launcher. After making a custom .desktop file and placing shortcut onto Unity Launcher (by dragging from the dash) 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.

pomsky
  • 68,507
igorp1024
  • 265

1 Answers1

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.

Sh1d0w
  • 1,348
  • 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 07 '15 at 15:39
  • UPD: this thread misleaded me. – igorp1024 Apr 07 '15 at 15:49