I've created .desktop file in ~/.local/share/applications for an application. Now I'm able to find it through Super key. But after executing the application, I can't pin it to the dock using right click -> Add to favorites. Any idea why?
Asked
Active
Viewed 7,631 times
1 Answers
21
An icon that you find using the Super key can be pinned by right-clicking on it in the Applications overview.
An icon of a running application cannot be pinned if it does not have a matching . desktop launcher.
Try pinning the icon you find using Super. Then run the application. If now, you see a second icon on the dock (one that can not be pinned), then your will need to add a StartupWMClass= line to indicate the actual WMClass of the application.
To determine the WMClass of your running application, use the xprop tool as follows:
xprop WM_CLASS
If you are running standard Ubuntu on Wayland, you can determine the WMClass in the Looking Glass, "Windows" tab. You can open Looking Glass by typing lg in the Alt+F2 dialog.
BeastOfCaerbannog
- 16,703
vanadium
- 97,564