I changed the default application association for a mimetype that was wrong just editing the file .local/share/applications/mimeapps.list.

Just doing this was not sufficient to change also the default icon, so how can i set that the default icon for this type of file should be a .png in my home? (I can move it anywhere)

Right clicking on one of them and change the icon just change the one of that specific file, not for all the others with the same mimetype.

1 Answer 1


There is a nice tool that may be handy for globally changing the icon for a specific file type.
Install it by executing: sudo apt-get install assogiate.
After installing you can run the tool (assogiate), seek for the file type, double click on it and change the default icon.
New icon should the be applied to all files of the specific mime type.

Screenshot: enter image description here

  • 1
    It could have been a great solution but, unfortunately, it doesn't work. I used the program and everything seems allright (in the program the new icon is showed right) but it doesn't apply to the files in nautilus or other programs. Oh, yes, obviously I reboot the system between changing it and checking if it worked ;)
    – dadexix86
    Feb 20, 2012 at 12:21
  • I'm sorry to hear that. What Ubuntu version are you using? May I suggest another solution? Try placing under /usr/share/icons/gnome/scalable/mimetypes the icon that you wish to have for your PNG files and just rename it to the appropriate MIME type with slashes replaced with "-" (i.e. 'image-png.svg'). I hope your icon is an SVG, let me know if it works with other icons formats too.
    – yossile
    Feb 20, 2012 at 13:23
  • No, it's a .png (as I said in the question). I can try to convert it to a .svg with inkscape, but I prefer to have a solution for .png images :) Anyway I'm using version 11.10.
    – dadexix86
    Feb 20, 2012 at 13:48
  • Ok, thanks to your tips I found a dirt solution, that was creating a collection of pngs with different sizes and place them in ~/.icons/Name_Of_Theme/clear/DimxDim/mimetypes with name generic-specific.png. I'm not going to make this the answer I'll accept because I think there should be a better solution to this and maybe someone knows it.
    – dadexix86
    Feb 20, 2012 at 14:15
  • It's not working because you have to reset the icon cache after changing the icons with assogiate. I would expect the program did this, but apparently it doesn't if you're not seeing the changes. The command is: sudo gtk-update-icon-cache --force <insert icon theme name here>
    – devius
    Feb 20, 2012 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.