Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher Icon is missing/blank in KDE Neon (StartupWMClass is wrong in desktop launcher) #3877

Open
jschroed opened this issue Jan 11, 2025 · 2 comments
Labels

Comments

@jschroed
Copy link

Your Environment

  • Version used: snap 11.1.2 2025-01-10 (2212)
  • Operating System and version: KDE Neon
  • Desktop Environment: KDE Plasma 6.2.5 (Wayland)

Expected Behavior

Pinning Super Productivity to the Task Manager should have an icon when Super Productivity isn't running.

Current Behavior

If Super Productivity is pinned to the Task Manager and isn't running, a "blank" icon (white sheet) is shown.

Steps to Reproduce

  1. Install Super Productivity using snap.
    sudo snap install superproductivity
  2. Run superproductivity.
    superproductivity
  3. Right click on the Task Manager Super Productivity icon and select "Pin to Task Manager". (You may need to select "On The Current Activity" if using activities.)
  4. Exit Super Productivity
  5. The launcher icon will now be a blank icon. (Also, you cannot start Super Productivity from the Task Manager and have to launch it from an Application Menu/Launcher/Dashboard.)

Note: This has been an issue for a while. I think it started around version 10.0.0. It's not easy to rollback snap versions so I wasn't able to figure out when it happened and what changed between versions.

Can you reproduce this reliably?

I was able to reproduce this with a live version of KDE Neon.

Potential Fix

It seems that the StartupWMClass is the superproductivity_superproductivity.desktop file doesn't match the class name of the window.

In the desktop launcher file /var/lib/snapd/desktop/applications/superproductivity_superproductivity.desktop:
StartupWMClass=Super Productivity

Class name from tools (xprop or qdbus):
StartupWMClass=superProductivity

Note: I wasn't able to figure out where in the build the desktop launcher file is built to make a pull request.

Getting StartupWMClass

Using xprop:

  1. Run xprop:
    xprop WM_CLASS
  2. Click on the Super Productivity window.
  3. Output is:
    WM_CLASS(STRING) = "superproductivity", "superProductivity"

Using qdbus:

  1. Install qtchooser.
    sudo apt install qtchooser
  2. Run qdbus:
    qdbus org.kde.KWin /KWin queryWindowInfo
  3. Click on the Super Productivity window.
  4. Look for the resourceClass line in the output. Note the resourceName as well.
    resourceClass: superProductivity
    resourceName: superproductivity

Workaround (Temporary - Lasts until reboot or snap update)

  1. Change the StartupWMClass from Super Productivity to superProductivity.
    sudo sed -i 's/StartupWMClass=Super Productivity/StartupWMClass=superProductivity/' /var/lib/snapd/desktop/applications/superproductivity_superproductivity.desktop

Note: setting the StartupWMClass to superproductivity (lower case 'P' in productivity) seems to work as well.

Workaround (Permanent - override the desktop launcher file)

  1. Copy desktop file.
    cp /var/lib/snapd/desktop/applications/superproductivity_superproductivity.desktop ~/.local/share/applications/
  2. Change the StartupWMClass from Super Productivity to superProductivity.
    sed -i 's/StartupWMClass=Super Productivity/StartupWMClass=superProductivity/' ~/.local/share/applications/superproductivity_superproductivity.desktop

Note: If you do this workaround, you will probably want to delete ~/.local/share/applications/superproductivity_superproductivity.desktop once this bug has been fixed.

@jschroed jschroed added the bug label Jan 11, 2025
Copy link

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

Copy link

Hello there jschroed! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

For more open ended discussions and/or specific questions, please visit the discussions page. 💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant