Fix missing application icon in Budgie panel

- 2 min read

After recently installing Ubuntu Budgie, I noticed some applications installed via Snap sources were missing their application icons in the Budgie panel. While annoying, the fix is fairly straight-forward to implement once you know how.

  1. First run xprop WM_CLASS in your terminal. You’ll receive a cross hair style icon (depending on your cursor set).

  2. Then click the application that is missing its icon (such as Slack).

  3. You’ll see output such as:

    WM_CLASS(STRING) = "slack", "Slack"
    
  4. You’ll need to copy one of the values between the quotes. If you see different values and one of them is more specific than the other, choose the more specific option.

    For example, when using xprop WM_CLASS on a Firefox window you’ll receive “Navigator” and “Firefox” as options. You should proceed with: Firefox

  5. Edit the .desktop file that is relevant to your application in /var/lib/snapd/desktop/applications/—note you’ll likely need to use elevated permissions to edit the file, so you’ll probably want to use sudo.

    The file should be easy to identify based on the name of the application. Examples of files that I have:

    • firefox_firefox.desktop
    • postman_postman.desktop
    • slack_slack.desktop
  6. Add StartupWMClass=YOUR_COPIED_VALUE to the file and save.

    In the case of Slack, I edited /var/lib/snapd/desktop/applications/slack_slack.desktop and added the following line to the end of the file:

    StartupWMClass=Slack
    
  7. Finally, quit your application and restart it, you should have the application icon in your panel now.

If this helped you out or didn’t solve your problem, please let me know on twitter.