I edited my /usr/share/mime/packages/freedesktop.org.xml (with a text editor) to modify the file icon of application/x-7z-compressed mime type :
<mime-type type="application/x-7z-compressed"> <generic-icon name="package-x-generic"/>
I would like to know if there is a tool to edit this file (or to change the icon of a mime type) instead of using a text editor ?
EDIT: My aim is to script my modifications of the freedesktop.org.xml file, so that an text editor is not appropriate.
I would like a command-line tool to edit the
name attribut of the
generic-icon tag of a chosen MIME type.
EDIT: As @Gilles pointed it to me, it should be better to modify the
$XDG_DATA_HOME/mime/packages/Override.xml file instead of
/usr/share/mime/packages/freedesktop.org.xml file. But this does not really change my question.