So according to the lastet comments adding a StartupWMClass
corresponding to the name of the application's executable to each Wine
.desktop file would be a temporary workaround for this problem, until
it's fixed in Wine? Let's try it:

find "$HOME/.local/share/applications/wine/Programs" -name '*.desktop'
-exec perl -pi -e 'if (m/^Exec=.+ \/Unix (.+\.lnk)/) { ($l = $1) =~
s/\\\\ / /g; $r = qx[env WINEDEBUG=-all wine shortcut /f:"$l" /a:q]; if
($r =~ m/\nTargetPath=(?:.+\\)?([^\\\n]+)/) { print
"StartupWMClass=$1\n"; } }' '{}' \;

And hey, it works! Mostly, that is, for me. A few exceptions turned out
to be due to to EITHER differences in capitalization between what's in
the .lnk file and the actual exectutable on disk OR some internal
shenanigans by program loaders/cracks.

Try this workarond at your own risk. Be sure to backup
~/.local/share/applications/wine/Programs beforehand. You may have to
run "xdg-desktop-menu forceupdate" to see any changes. YMMV. To revert
the changes, i.e. to remove all StartupWMClass lines from all Wine
.desktop files:

find "$HOME/.local/share/applications/wine/Programs" -name '*.desktop'
-exec perl -pi -e 's/StartupWMClass=.+\n//' '{}' \;

This workaround (or a permanent fix) also seems to fix
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/704187. And maybe
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/998591.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1103833

Title:
  Wine's icon and description appears for all Windows applications

To manage notifications about this bug go to:
https://bugs.launchpad.net/hundredpapercuts/+bug/1103833/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to