Application launcher (org.kicad.kicad.desktop) not behaving properly

Description

The .desktop file shipped is missing meta information to make the launcher work properly. This was observed in Ubuntu 21.10 but i expect it to function similarly in other linux desktop environments.

Current behavior:

  • The icon for a running instance can not be added to favorites (pinned)

image

  • After having pinned the launcher manually (right click in search dialog and select save as favorite), the launcher spawn a duplicate icon when running

image

Expected behavior:

  • Running application can be added as favorite/pinned

image

  • Pinned launcher do not spawn new icon (but adds dot to indicate it is running)

image

Steps to reproduce

Install on Ubuntu and search-launch the application

KiCad Version

Application: KiCad

Version: 6.0.0-d3dd2cf0fa~116~ubuntu21.10.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.74.0 OpenSSL/1.1.1l zlib/1.2.11 brotli/1.0.9 libidn2/2.3.1 libpsl/0.21.0 (+libidn2/2.3.0) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3

Platform: Linux 5.15.0-6-generic x86_64, 64 bit, Little endian, wxGTK, , tty

Build Info:
	Date: Dec 23 2021 14:23:46
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.74.0
	ngspice: 35
	Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Solution

I am not super knowledgeable about .desktop files but the following addition to the org.kicad.kicad.desktop file solves the issue for me:

StartupWMClass=kicad

My best guess is that there is some mismatch between the name in the desktop file and the name of the spawned window ?Translations?. The above mentioned addition might even be the correct solution.