Skip to content

Instantly share code, notes, and snippets.

@myandere
Forked from Postrediori/FixIconsOnWayland.md
Created July 2, 2025 21:40
Show Gist options
  • Save myandere/a30b013372aff09326edab9975d801e3 to your computer and use it in GitHub Desktop.
Save myandere/a30b013372aff09326edab9975d801e3 to your computer and use it in GitHub Desktop.
Fix Wayland icons of apps after switching to KDE & Wayland [Ubuntu 24.04]

Fix Wayland icons of apps after switching to KDE & Wayland [Ubuntu 24.04]

Description

After switching to Wayland some apps have default Wayland icon:

Default icons screenshot

Example setup for Firefox

The solution is to setup proper .desktop file name for windows of these apps.

  1. Find the proper name of Firefox .desktop file:
$ find ~ -iname *firefox*.desktop

~/.local/share/applications/firefox_firefox.desktop
  1. Setup KDE window rule.

Open System Settings -> Window Management -> Window Rules.

Click + Add New... and set the parameters:

  • Window class (application) -> Exact Match, enter firefox
  • Match whole window class -> Yes
  • Click + Add Property... -> Select Desktop file name and enter name of .desktop file, e.g. firefox_firefox.desktop in the example above.

Setup screenshot

Alternatvelly one can use the WaylandDesktopFile.kwinrule file provided. In the Window Rules dialog click Import... and set the actual .desktop file name afterwards.

Links

[Firefox icon]
Description=Firefox icon
desktopfile=firefox_firefox.desktop
desktopfilerule=3
wmclass=firefox
wmclasscomplete=true
wmclassmatch=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment