-
Notifications
You must be signed in to change notification settings - Fork 318
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
WSLg doesn't pick up the actual icons of Linux desktop apps #614
Comments
I've been suffering from this issue for months. I guess it relates to the Ubuntu version (mine is also 20.04). |
For me the icon was the correct one initially, but after a while all icons from Ubuntu got replaced with the generic one. |
@bbatsov, @tcfurrer, @seven-mile, would you please share /mnt/wslg/weston.log with us? Basically there is 2 type of icons, a) icons used in Start Menu (or pinned at taskbar), and b) icons at taskbar when applications are running. Icon a) is specified at .desktop file for that application, for emacs, typically /usr/share/applications/emacs.desktop, which specify as "Icon=emacs", then Icon file will be loaded from /usr/share/icons. And if no icon is specified at .desktop file, then generic Icon will be used. Icon b) is from "_NET_WM_ICON" for X11 application. So if you are not seeing right Icon here, would you check by running xprop ? Please refer below screen capture. And in case application is Wayland native application, same Icon as a) will be used. Thanks! |
@hideyukn88 Of course. For (a) icons, on my machine, only gThumb is normal but others are generic icon. Indeed the .desktop configurations correspond with this fact. But the (b) icons of all applications including nautilus are not working in the taskbar. I tried Attachment: |
@seven-mile, thanks for info. First, for icon a), from your weston.log, the most of your application is using SVG format icon, which is typical in many gnome application, so this is not yet supported. Please see #70 and we are working on it (microsoft/CBL-MarinerCoreUI#95)
For icon b), if those gnome application is running as Wayland native mode, then without SVG support, it won't be able to obtain Icon for taskbar. You can try running with in X11 mode by "export GDK_BACKEND=x11", then launch your application, please let us know if this helps. Thanks! |
@hideyukn88 |
Sure, I've attached my I notice in it things like: And I had to do a screenshot as copying from WSLg doesn't work for me either. :-) The Emacs desktop file is basically the default one and the icon is where it should be. I'm not sure what I'm supposed to do with |
It looks like weston doesn't look for icons in
Restarted wslg and emacs now has emacs icon in windows. |
This is because current WSLg doesn't support SVG icons. Though this function code has been added but the corresponding SVG lib can't be found in Mariner (A Microsfoft linux distro) repository. Refer to this to has more details. |
I am having the same issue and could not resolve it reading the above.
Then I launch it:
I see the generic icon. Here are the logs:
Any idea how to fix this? Should I add a ANSWER: That being said, is there a way to change the generic linux icon displayed on top of the icon based on the distro? |
Another use case is when using an AppImage. Thanks |
Hey guys, at least for me using Ubuntu, running |
EDIT: For reasons I can't comprehend, the taskbar shows the correct window just as of today. 3 windows restarts (not weston, the full OS) were in between but nothing else was changed. So my below comment is not valid anymore. Quick recap what I did and what works now:
EDIT2: Ok there seems to be an icon cache in windows, didn't know that. So, after following the steps above, make sure to refresh the icon cache. Follow the second answer (user Omoikane1122) in this MS answer ------------ original comment ----------------- I have a similar issue, but none of the workarounds helped so far. WSL version: 2.0.14.0 For eg. for kitty, my desktop file is at Is there a chance to get the icons also working on the task bar? Where do we need to put the icons so that they are used in the taskbar? |
This problem has puzzled me for a while and I think I found a solution. The cause is the missing .desktop file. On a new machine I installed Ubuntu 23.10. I compiled emacs from the source and it suffers the same issue. Then I created the missing .desktop file and I have the emacs icon. Back to wsl, I created the same desktop file and it worked as well. Following is my /usr/share/applications/emacs.desktop file, notice the location of emacs and icon file:
|
Thank you very much @andnig, following the cache refresh tip from that MS answer I finally got the icons to work for the task bar as well. |
I have the same issue, and none of the above solutions worked for me. |
Environment
Steps to reproduce
Just run any Linux GUI from the command line or the Windows start menu. All apps have the generic Linux logo icon, which makes them hard to differentiate.
I've installed all apps with
apt install
.Expected behavior
I expect each app to display it's all icon (as defined by
appname.desktop
).Actual behavior
The same generic icon is displayed in the taskbar as well. Interestingly, when I run Emacs as
root
it displays the right icon.The text was updated successfully, but these errors were encountered: