I'm running Ubuntu 18.04, using Gnome3 with the Frippery extensions (which, among other things, give me a bunch of "favourites" launchers in the top bar and a Gnome2-style applications menu) and I've got a lot of duplicate entries in the menu. Trying to resolve this, I find a lot of duplicate *.desktop files (which is obviously the cause of the duplicate menu entries).
However, these *.desktop files exist in several places. For example, looking at the gnome-terminal.desktop file, I find:
/usr/share/applications/gnome-terminal.desktop ~/.config/gnome-panel/launchers/gnome-terminal.desktop ~/.gnome/apps/gnome-terminal.desktop ~/.local/share/applications/gnome-terminal.desktop
So what is what? Which desktop entries are supposed to appear where, when and why? There are a lot of desktop entries in /usr/share/applications, for example, that appear nowhere. What controls this?
None of the above bears much resemblance to the file locations section in the FreeDesktop menu specification. Does this specification apply to Gnome3 in Ubuntu 18.04 or is there another specification?