Ok, I have made a new mime type by creating the files
/usr/share/mime/application/x-myproject-project.xml :
Code:
<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-my-project">
<!--Created automatically by update-mime-database. DO NOT EDIT!-->
<sub-class-of type="text/xml"/>
<comment>Myproject project</comment>
<glob pattern="*.myproject"/>
</mime-type>
/usr/share/mime/packages/myproject.xml :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-myproject-project">
<sub-class-of type="text/xml"/>
<comment>Myproject project</comment>
<glob pattern="*.myproject"/>
</mime-type>
</mime-info>
By running update-mime-database and restarting nautilus, when I click for file's properties, I get
Code:
Myproject project (application/x-myproject-project)
So, I suppose that the new mime type has been created!
Now,
1)
i) How to I make this file to be opened by default with my program?
ii) Is the file opened as an argument to the command? e.g. myprogram /path/to/file ?
2) How do i add a custom icon to this file?
Thx in advance for any information, because these are really helpful for me, as I need to have ready these before a date, soon.
Bookmarks