2

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?

  • In my installation gnome-terminal.desktop is located in /usr/share/applications only. So I assume that the multiple entries were made by you or some apps. You can check the content of the entries to determine which functionality they are offering. – Kulfy May 26 '19 at 13:02
  • @kuffy: yes, the duplications have to have been caused by something I did. The main suspec is menulibre (which I used because alacarte is rather restricted). However that's not the point: what I want to know is the difference between, say, ~/.gnome/apps/ and ~/.local/share/applications/ as a place for *.desktop files to live and if/how the location of the *.desktop files effects where they show up. – Frank van Wensveen May 26 '19 at 13:20
2

The original location of the .desktop files is in /usr/share/applications. If you create your own .desktop file, or wish to modify a .desktop file in /usr/share/applications, then it should go into ~/.local/share/applications.

  • @heynnema OK. That's clear. Yet there are other locations on my Ubuntu 18.04 installation as well, i.e.. ~/.config/gnome-panel/launchers and ~/.gnome/apps/ which are being used in my Gnome3 desktop environment, and the entries in /usr/share/applications are not user-writable. So there's more going on than just this. – Frank van Wensveen May 27 '19 at 8:04
  • 1
    @FrankvanWensveen ~/.config/gnome-panel exists because of some top panel launcher that you've installed. ~/.gnome/apps is used by some apps, like Chrome. /usr/share/applications is owned by root, so that's why it's not writable... it's to protect yourself from yourself. .desktop mods go in ~/.local/share/applications. There's nothing going on, that's just the way it works. – heynnema May 27 '19 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.