[Bug]: .desktop file name doesn't match WM Class name, causing missing app icon in Alt+Tab menu in Plasma (Wayland) #2806
Labels
No labels
awaiting-reply
breaking changes
bug
cannot-reproduce
dependencies
documentation
duplicate
electron-issue
enhancement
fix-available
good first issue
help wanted
invalid
javascript
need more information
need rebase
official-youtube-music-issue
plugin request
question
release
security
stale
Status: blocked
typo
wontfix
ytmd-issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: YTMD/youtube-music#2806
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Preflight Checklist
YouTube Music (Application) Version
3.7.1
Checklists
What operating system are you using?
Other Linux
Operating System Version
Arch Linux
What CPU architecture are you using?
x64
Last Known Working YouTube Music (Application) version
No response
Reproduction steps
Expected Behavior
App should have it's icon in alt+tab menu
Actual Behavior
It has Wayland icon
Enabled plugins
Additional Information
Continuation of #2687
I think it's an AUR issue.
Yes. But when I asked there, the maintainer said that the official .deb package has the same thing.
I also checked
youtube-music_3.7.1_arm64.deb
from releases, just to be sure, and the .desktop file there indeed has a "wrong" name. The name in the .deb is youtube-music.desktop, so is in the AUR packages, but unless it matches the WMClass nane the icon will be missing, at least on KDE Plasma. The AUR maintainer said the icon is there for them on GNOME after only changing StartupWMClass.I couldn't screenshot with alt+tab menu opened, so I had to make photos
With the default

youtube-music.desktop
After renaming it to

com.github.th_ch.youtube_music.desktop
The .desktop file included in the AppImage is also named
youtube-music.desktop
, so I think it's something to do with electron-builder.I've tested both GNOME and Plasma in a NixOS VM and it seems that:
(I got the same results on both wayland and x11)
Same here (arch-x86_64, xfce, x11)
Either with AUR or with AppImage.
Changing the desktop file name from youtube-music to com.github.th_ch.youtube_music fixed that problem on NixOS for me.
Yes, but it breaks gnome (as I mentioned a few months ago), and I just figured out why.
The problem is that the DesktopEntry property in MPRIS's MediaPlayer2 interface should be updated to match the desktop entry basename.
So if we ever decide to change the name of the desktop entry file, we gotta remember to update this line as well:
d513302a9a/src/plugins/shortcuts/mpris.ts (L82)
As specified here
https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:DesktopEntry
Last time I only tested gnome and kde, so here's xfce in a VM
I don't know if xfce has a default MPRIS widget, if so I didn't check it.