How to create a new MIME type for a Sugar activity?

James Simmons jim.simmons at walgreens.com
Wed Feb 6 11:30:13 EST 2008


Tomeu,

I had created a mimetypes.xml file that looks like this:

<?xml version="1.0"?>
    <mime-info 
xmlns="http://www.freedesktop.org/standards/shared-mime-info">
        <mime-type type="application/slides">
        <comment>View Slides Archive</comment>
        <glob pattern="*.slides"/>
    </mime-type>
</mime-info>

It is contained in my activity directory.  I am using the Sugar 
Simulator on Xubuntu for testing (mostly because it is the only Sugar 
environment I have been able to get working.  The qemu with an image 
doesn't work for me, maybe because none of my Linux boxes have more than 
256 meg of RAM).  The simulator does not recognize the new MIME type.  
I'm thinking that perhaps I need to run "setup.py devel" again to create 
a symbolic link to mimetypes.xml, because that file did not exist when I 
ran that last.  I'd like to get the activity working really well on the 
simulator before trying it out on the XO.

Thanks again for your help.

James Simmons


Tomeu Vizoso wrote:

>Ok, so what if your activity registers into the mime registry a new type
>like application/x-slide-activity associated to the *.slide glob? That
>can be done in the mimetypes.xml file. And then your activity should add
>this mime to the activity.info.
>
>In this way, the journal will recognize these files as that type, and
>will open them with you activity.
>  
>
>No problem, I was just confused about what you wanted to do.
>
>Regards,
>
>Tomeu
>
>  
>





More information about the Devel mailing list