Re: registering a mime-type



Murray Cumming wrote:
Thanks. Now Nautilus shows the mime-type as the type name (though I
guess it should really show the comment as the type name).

Do you know how to associate the application with the new mime type?

I don't know if this is even possible using the Freedesktop mime spec.
You can use the old mime system though.

In ~/.gnome/mime-info/yourapp.keys or /usr/share/mime-info/yourapp.keys:

application/x-whatever
	default_action_type=application
        short_list_application_ids_for_novice_user_level=yourapp
        short_list_application_ids_for_intermediate_user_level=yourapp
        short_list_application_ids_for_advanced_user_level=yourapp


In ~/.gnome/application-info/yourapp.applications or /usr/share/application-registry/yourapp.applications:

yourapp
	command=whatever_command_to_run
	name=My Application
	can_open_multiple_files=false
	expects_uris=false
	requires_terminal=false
	startup_notify=true
        mime_types=application/x-whatever



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]