You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

pmarguinaud

Beginner

  • "pmarguinaud" started this thread

Posts: 1

Location: France

Occupation: Software developper

  • Send private message

1

Thursday, November 30th 2006, 10:27am

Adding a new mimetype using magic

Hi all,

I am writing an application ( should work with gnome and kde ), and I have introduced new file types... So that everything works smoothly, and these files be opened by the right application, I need to define new mimetypes. I would like files to be recognized not by file extensions, but using their contents.
I know this is possible to do that, because when I have a pdf file on the Desktop, it gets well recognized, even without the .pdf extension. One has to properly set the "magic" parameters, somewhere... But where ?
I have been trying editing the different magic files all over the /usr tree, but without any success... Maybe I need to issue a command to have my changes taken into account ?
I am pretty sure I can do that with kde; I have been able to set-up everything with gnome and it works.

I have two other constraints :
* I would like to be able to install these magic parameters in the private user config files ( ie ~/.kde ).
* My files are of type hdf5, but with a special string in them at a particular place.

Any help appreciated,

Philippe