Comment 16 for bug 702452

Revision history for this message
Michael (mnichau) wrote :

I have the same issue. The workaround I'm using is modifying the relevant desktop files in ~/.local/share/applications/wine/Programs as follows:

Original Spotify.desktop:

[Desktop Entry]
Name=Spotify
Exec=env WINEPREFIX="/home/michael/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/michael/.wine/dosdevices/c:/users/michael/Start\\ Menu/Programs/Spotify.lnk
Type=Application
StartupNotify=true
Path=/home/michael/.wine/dosdevices/c:/users/michael/Application Data/Spotify
Icon=4243_spotify.0

Modified Spotify.desktop:

[Desktop Entry]
Name=Spotify
Exec=env WINEPREFIX="/home/michael/.wine" wine "C:/users/michael/Application Data/Spotify/spotify.exe"
Categories=AudioVideo;Audio;Music;Player;
Type=Application
StartupNotify=true
StartupWMClass=spotify.exe
Path=/home/michael/.wine/dosdevices/c:/users/michael/Application Data/Spotify
Icon=4243_spotify.0

I think the important bits are:

1) passing the actual .exe file to wine instead of passing it start.exe which, in turn, is being passed the .lnk file
2) Adding "StartupWMClass=spotify.exe" to match the correct window

As a bonus, setting relevant Categories will let you filter the application correctly in the dash.

Works like a charm for me. You need to run "unity --replace" for an immediate effect the first time round, or log off and in again. I hope this helps someone.