I was wondering how Ubuntu is able to figure out the proper name of an application. For example, when you select Open with -> Other application
from the context menu, you are presented with this list.
How does a developer teach Ubuntu the name of their application, and how can another developer retrieve the name of an application from the system? I don't need actual code, rather I'm just interested in the conceptual side of things.