If the folder .local/share/mime or .local/share/mime/packages does not exists, the user cannot choose icon Reproducible: Always Steps to Reproduce: 1. Start with a new user and empty directory 2. Try to choose a custom icon for a mimetype, application-x-dvi through the select icon dialog. Actual Results: The is no visible change. Restarting/deleting the icon cache has no effect. One gets the error: """ m_userSpecifiedIcon has changed. Now set to "aapplication-x-dvi" m_userSpecifiedIcon has changed. Now set to "aapplication-x-dvi" writing "/home/luisfe/.local/share/mime/packages/application-x-dvi.xml" Couldn't open "/home/luisfe/.local/share/mime/packages/application-x-dvi.xml" for writing """ Expected Results: The chosen icon is shown The obvious workaround is to create the folders .local/share/mime .local/share/mime/packages After doing this the icon can be set. So the code needs to create these directories if they do not exist.
This was a bug in kde-cli-tools (keditfiletype) which has been fixed in 5.6.5. *** This bug has been marked as a duplicate of bug 356237 ***