Mime type missing description?

I am trying to create file associations so I can double click a file and it will open with my program - and will associate an icon with that file type.

I created the file myapp-xxx.xml:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns=""> <mime-type type="application/myapp-xxx"> <comment>My app dummy mime</comment> <sub-class-of type="application/octet-stream"/> <glob pattern="*.xxx"/> <generic-icon name="MyApp"/> </mime-type>
</mime-info>

I placed MyApp.png in /usr/share/icons/

I placed myapp-xxx.xml in /usr/share/mime/application/

I ran

sudo update-mime-database /usr/share/mime

and my xml promptly disappeared.

I read that it can be because i am missing description... but looking at all the examples, and the existing mimes, I don't see what I am missing.

12.04

Note: I have a .desktop file too... but since the mime database removes the mime, I don't think having the reference in the .desktop file will help.

6

1 Answer

I placed the file myapp-xxx.xml in /usr/share/mime/packages/ (instead of /usr/share/mime/application/)

Running sudo update-mime-database /usr/share/mime did not remove my xml file...

Running mimetype -a Desktop/abcd.xxx showed

Desktop/abcd.xxx: application/myapp-xxx
Desktop/abcd.xxx: application/octet-stream

Thank you Elder Geek for the resource.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like