How does keyboard typing select an application?

I am new to the forum and constantly seem to fail to ask the right question on this to search engines. So I thought I ask humans.

If I open the Applications menu by hitting the Start(?) key, I can start typing the name of an application and suggestions are offered with every letter provided. I understand that the items on display are provided by .desktop files and I know how to create them and where to store them.

What I’d like to ask is, what information of the .desktop file is used for the selection process?

Background: Apparently one can place .desktop files in one’s own .local/share/applications directory and thereby override system files. I would like not to override. I would like to put one file there that is derived from a system file, but I changed the file name from foo.desktop to my-foo.desktop and made modifications to the Exec and Name entry. But despite these changes, I do not get two offeres to choose from, but only one.

To rephrase the above question: What would make GNOME accept the new .desktop file as a different application?

Thank you in advance for your kind help.


The different filename should be enough.

Note that it’s possible that the file is hidden, either because of keys like NoDisplay or OnlyShowIn, or because the file isn’t valid, for example when the executable isn’t found in the path.

Thank you for your answer!

Yes it does and the “different application” shows as such.

For the records:

I was not sure when gnome would recognize the new .desktop file. So I logged out and logged in to start whatever my gnome session is again. That turned out not to be enough: I did not see the “new application”. So I posted my question to this forum yesterday evening. After booting this morning the differently named .desktop file was recognized.

In the meanwhile I found this here:

To make desktop entries defined in ~/.local/share/applications work, run the following command:

 $ update-desktop-database ~/.local/share/applications 

… which is way more appealing than rebooting.

Again, thanks for the answer!


update-desktop-database is only necessary for MIME associations, not for gnome-shell to pick up the .desktop file.

Thanks for the clarification!

I consider my initial question answered. The issue was that the different file was not recognised.

If update-desktop-database ist not mandatory to trigger the recognition of a new .desktop file, what would be a simple trigger?


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.