I added the desktop entry for Pycharm
using alacarte
app
Now, the entry can be searched/opened via the app search and it shows the expected results, ie, correct name and icon.
But when it comes to the app-switch panel (i.e., when you press Alt+Tab
or WinKey+Tab
to switch between apps), it neither shows the expected icon nor the app's name.
How can I fix the issue?
Note: I'm using Ubuntu 24.04
Determine the window class of the application, and make sure the desktop recognizes that window class by specifying its window class as the value for
StartupWMClass
in the desktop file.To find the window class on a Gnome Shell desktop such as standard Ubuntu,run your application, then open the looking glass (hit Alt+F2, enter
lg
) and find the value for your application in the list on the "Windows" tab.Edit the
.desktop
file so it contains a lineStartupWMClass=windowclass.you.found
. This way, the desktop environment will associate the correct window with the icon.