Register the icon for the MIME type:

xdg-icon-resource install --context mimetypes --size 48 myicon-file-type.png x-application-mytype

Add a configuration file into ~/.local/share/mime (can copy and modify existing entries)

Update mime database

update-mime-database    ~/.local/share/mime

Reference