Comment 23 for bug 635223

Revision history for this message
Adam Guthrie (therigu) wrote :

@all, thanks for looking into this.

@Mikkel, I've looked at your analysis and tried a test case and agree. However, I believe unity isn't implementing the XDG spec fully. The spec [1], says this about <AppDir>s:

If the directory contains sub-directories then these sub-directories should be (recursively) scanned as well. The name of the subdirectory should be added as prefix to the desktop-file id together with a dash character ("-") So given a <AppDir> /foo/bar and desktop entry /foo/bar/booz/Hello.desktop the desktop entry would get a desktop-file id of booz-Hello.desktop A desktop entry /foo/bar/bo/oz/Hello.desktop would result in a desktop-file id of bo-oz-Hello.desktop

Therefore I believe unity should be searching for the desktop file for id bo-oz-Hello in applications/bo-oz-Hello.desktop and applications/bo/oz/Hello.desktop with the former taking precedence it it exists.

Do you agree?

Also, I'm sure I had a ~/.local/share/applications/wine-Programs-Spotify.desktop at one point, which is why my fix worked for me. However, cleaning out wine completely and re-installing, I don't any longer.

@Scott, any idea why this is?

A work around for all this seems to be:

Add "Categories=wine" into ~/.local/share/applications/wine/Programs/Spotify.desktop
ln -s ~/.local/share/applications/wine/Programs/Spotify.deskop ~/.local/share/applications/wine-Programs-Spotify.desktop

This allows wine apps to be searched for and launched via unity. although the icon is still wrong (it's the wine icon - this is the problem with bamf AFAIK).

[1] http://standards.freedesktop.org/menu-spec/menu-spec-latest.html