MIME actions
The freedesktop.org Shared MIME database provides a single way to store static information about MIME types and rules for determining a type.
In addition to this, two further pieces of information are often needed:
Which applications can open a file (Mozilla can view files of type text/html).
Which application should open a file by default (Bob wishes to view text/html files in Mozilla by default).
Status
This specification is in the requirements-gathering / early-planning stages.
Recording that an application can handle a particular type
The list of applications which can open files of a particular type is static information and should be stored in the MIME database, using some extension elements. The Adding to the MIME database tutorial provides a sample of how this might look. The extension element associates MIME entries with application .desktop files (eg, gimp.desktop). Issues to address:
- Must provide a way to find a command to execute to view/edit/etc a file.
- There should be support for multiple actions (view, edit, print, etc).
- There must be some kind of priority system (Vim can view HTML, but should not be the default if a web browser is installed).
- Internationalised descriptions of applications should not be repeated (Gimp should not have to specify translations of "Edit in Gimp" for every MIME type it supports).
- There should be a way to overwrite the system defauts by user defaults. (eg. User a[dmin] will edit text files with vim and user b will use emacs)
- There should be a way to choose a program for an action, therefore there must be made a list of the programs that can do this action to a file format. On this way you can open a file with a program that is not the default programm for the file format.(eg. png editor is gimp but you want to test a new picture editor)
- There should be a way to detect which environment is being used and how a file should be open (eg. editing a text file by choosing them with mc in a terminal should use a console based editor, but when mc runs in a xterm, an X-Window editor can also be used)
Setting the default application
Because this is configuration information, it should not go in the MIME database. Instead, it should be set using the Shared Configuration System. This specification should define a set of key names to be used for this.


