Special mime types for directories.

Luca Cappelletti luca.cappelletti at gmail.com
Tue May 13 13:18:11 PDT 2008

try to play with ROX-Filer and you'll be done in some way.AppDir
handle your problem better than actual any directory mimetype

2008/5/13, Guillaume Schmid <guillaume at maunakeatech.com>:
> Hello!
> I am working on port to linux of a medical imaging application and I
> have a mime type problem.
> The application generates movies stored as a lot of files and meta-data
> in a directory. The whole movie is the directory (with all it's files)
> and has the .mkt extention.
> I would like to be able to display on nautilus, or an other file
> browser, a thumbnail instead of the folder icon when displaying the
> parent directory.
> I wrote a simple thumbnailer that takes 2 parameters: input and output
> file and create an image based on the directory content.
> I have 2 problems:
> 1 - Retrieving the correct mime type for the directory (it should be
> "application/mkt-bundle" ).
> 2 - Telling some file explorer application to generate the thumbnail.
> What I did:
> In  ~/.local/share/mime/packages/mkt-mimetype.xml
> <?xml version="1.0"?>
> <mime-info
> xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
>   <mime-type type="application/mkt-bundle">
>     <sub-class-of type="inode/directory" />
>     <glob pattern="*.mkt" />
>     <comment>Mkt bundle movie</comment>
>   </mime-type>
> </mime-info>
> and did a update-mime-database ~/.local/share/mime
> I wrote a simple program to display the mime type of a file using the
> gio library.
> testing a file named "file.mkt" provides the application/mkt-bundle
> type.
> Testing a directory "dir.mkt" provide also the same type.
> I would like only the directory to provide this type. How can I achieve
> this ?
> Does anybody knows if there is a file browser that will handle this
> properly and will allow me ty configure my thumbnailer ?
> Thank you for your time.
> Yours,
> Guillaume.

Luca Cappelletti

"...Together we stand, divided we fall."



GTalk,MSN: luca <dot> cappelletti <at> gmail <dot> com
Jabber: luca <dot> cappelletti <at> jabber <dot> org
Skype: luca <dot> cappelletti
Linux Registered User: #223411
Ubuntu Registered User: #7221
"l'intelligenza è utile per la sopravvivenza se ci permette di
estinguere una cattiva idea prima che la cattiva idea estingua noi"

"La chiave di ogni uomo è il suo pensiero. Benché egli possa apparire
saldo e autonomo, ha un criterio cui obbedisce, che è l'idea in base
alla quale classifica tutte le cose. Può essere cambiato solo
mostrandogli una nuova idea che sovrasti la sua"

"Uno studioso è soltanto un modo in cui una biblioteca crea un'altra
biblioteca "

More information about the xdg mailing list