[maemo-developers] [maemo-developers] Gnome VFS problem?

From: Lassi Syrjälä lassis at cc.jyu.fi
Date: Mon Oct 31 22:26:45 EET 2005
Eduardo de Barros Lima kirjoitti 31.10.2005 kello 20.00:

> Hi all,
>
>     I am having some problem with mime type detection in the maemo  
> platform. I have created two simple gtk-based programs to test this  
> funcionality. The first one to run in the host machine and the  
> second to run inside maemo platform. Just select a file with the  
> GtkFileChooserDialog and the mime type will be displayed in the  
> screen.
>
>     I am interested in PS and PDF files, since i am working with  
> the evince port that uses mime type detection provided by gnome- 
> vfs. Inside maemo platform, PS files are recognized as text/plain  
> and PDF as application/octet-stream. This way, evince refuses to  
> open those kind of  files, so i have made a little workaround based  
> on file extensions to make it work.
>
>     Is this a bug or is it the spected behaviour? Thanks in advance  
> for the help.

Hi,

It's expected behavior. application/pdf and application/ps aren't  
recognized because they aren't
defined in the MIME database by default. To fix this, you need to  
provide an XML description and
run the 'update-mime-database' tool. For details, see [1].

Normally update-mime-database would be run in a post-install script,  
but I am not sure how
you do that on application installer packages... however, luckily at  
least application/pdf is already
registered on the target device.

[1] http://www.freedesktop.org/wiki/Standards_2fAddingMIMETutor

BR,
Lassi

More information about the maemo-developers mailing list