Need to create the custom mime type in the Linux Flutter App

52 views Asked by At

I want to create the custom mime type in linux.

As per the research I have found the below commands which works fine when run in terminal directly.

Here is my command

 <?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared- 
 mime-info'>
    <mime-type type="application/x-foo">
        <comment>Demo App</comment>
        <glob pattern="*.foo"/>
        <icon name="x-foo"/>
    </mime-type>
</mime-info>


xdg-mime install --mode user x-foo.xml
xdg-icon-resource install --context mimetypes --size 48 --mode user --theme Adwaita x-  application-foo.png x-foo
update-mime-database ~/.local/share/mime
update-icon-caches ~/.local/share/icons`

So we tired that commands running in to flutter using Process.run which works fine in debug mode.

But when I try to create the release build of snapcraft then the same commands are not working. Could you please help with this if I am missing something or is there something I need to add in snapcraft.yaml or somewhere else?

Need to create the custom mime type in the Linux Flutter App.

0

There are 0 answers