{"id":561,"date":"2025-09-13T11:11:09","date_gmt":"2025-09-13T19:11:09","guid":{"rendered":"https:\/\/nramkumar.org\/tech\/?p=561"},"modified":"2026-01-17T15:10:17","modified_gmt":"2026-01-17T23:10:17","slug":"fixing-web-apps-microsoft-edge-use-wayland-icons-in-kde-plasma","status":"publish","type":"post","link":"https:\/\/nramkumar.org\/tech\/blog\/2025\/09\/13\/fixing-web-apps-microsoft-edge-use-wayland-icons-in-kde-plasma\/","title":{"rendered":"Fixing Web Apps (Microsoft Edge) use Wayland Icons in KDE Plasma"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Update: Fixing the file name fixes both the taskbar icon and task switcher icon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After a recent bout of updates on my Kubuntu desktop, I noticed that msedge web apps always show the Wayland Icon for the running window. This is pretty annoying &#8211; turns out the problem is a mismatch of <code>StartupWMClass<\/code> in the application files &#8211; the better fix is renaming the file to match the <code>StartupWMClass<\/code> instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">msedge will store the application files under <code>${HOME}\/.local\/share\/applications<\/code>. The files will be <code>msedge-*.desktop<\/code>. You can update the <code>StartupWMClass<\/code> manually by finding out what the right value is &#8211; to do this, you run the web app, open <code>KDE &gt; Settings &gt; Search &gt; Window Rules &gt; + Add New &gt; Detect Window Properties<\/code> and click on the web app window. This should show you all relevant properties of the window including <code>Window Class<\/code> which is what we want to set as <code>StartupWMClass<\/code> value in the <code>msedge-*.desktop<\/code> file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From my investigation, it looks like the <code>StartupWMClass<\/code> for msedge applications as of this writing is simply <code>msedge-_&lt;rest of filename><\/code>. So here&#8217;s a simple script that should fix all your <code>msedge-*.desktop<\/code> files so they have the right icons in the task bar and switcher, get grouped correctly when running under KDE Plasma:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\napp_dir=\"${HOME}\/.local\/share\/applications\"\napp_backup_dir=\"${HOME}\/msedge-apps\"\n\nif &#91; ! -d \"${app_backup_dir}\" ]; then\n  echo \"Creating ${app_backup_dir}\"\n  mkdir -p \"${app_backup_dir}\"\nfi\n\nfor file in \"$app_dir\"\/msedge-*; do\n  filename=$(basename \"$file\")\n\n  if &#91;&#91; \"$filename\" == msedge-_* ]]; then\n    echo \"Skipping already fixed file: $filename\"\n    continue\n  fi\n\n  echo \"Fixing ${filename}\"\n  cp \"${file}\" \"${app_backup_dir}\/\"\n  rest=\"${filename#msedge-}\"\n  rest=\"${rest%%.*}\"\n  new_filename=\"msedge-_${rest}.desktop\"\n  mv \"${file}\" \"$app_dir\/${new_filename}\"\ndone\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can see the script here as well &#8211; <a href=\"https:\/\/github.com\/ram-nat\/scripts\/blob\/main\/fix_msedge_icons.sh\">https:\/\/github.com\/ram-nat\/scripts\/blob\/main\/fix_msedge_icons.sh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: Fixing the file name fixes both the taskbar icon and task switcher icon. After a recent bout of updates on my Kubuntu desktop, I noticed that msedge web apps always show the Wayland Icon for the running window. This is pretty annoying &#8211; turns out the problem is a mismatch of StartupWMClass in the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-561","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/comments?post=561"}],"version-history":[{"count":2,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/561\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/posts\/561\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/media?parent=561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/categories?post=561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nramkumar.org\/tech\/wp-json\/wp\/v2\/tags?post=561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}