Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Nautilus has options for what to do when media devices are added.

Media Handling Preferences

How does Nautilus know what applications to make available in these drop-down menus?

How do applications plug themselves in to this mechanism?

share|improve this question
up vote 4 down vote accepted


Registering applications to handle MIME types is fairly straightforward. Applications are registered by creating a MimeType key in their .desktop entry file and listing each MIME type separated by a semicolon. The MimeType key should only be used in .desktop files whose Type key has the value Application. For more information on .desktop files, see Section 2.3 ― Desktop Entry Files.

Nautilus gets this infomation from the mimeinfo.cache files located in $XDG_DATA_DIRS/applications and $XDG_DATA_HOME/applications/ that are created by update-desktop-database.

share|improve this answer

As far as I understand it this is handled by the MIME, the same thing that handles what application opens which files. system (sorry I don't have the full details).

EDIT: DoR answered as I was typing. He nailed it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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