Quote Originally Posted by JasperK View Post
The newer versions of nautilus as available in Karmic don't store the metadata in xml files anymore. Instead nautilus now uses the new gio abstraction layer to give files a "metadata::custom_icon" attribute. This attribute contains a filename of a picture that should be used as the file icon.

I changed the python script that was posted before to use gio attributes. I have only tested this on karmic(Nautilus 2.27.4).
I've tried your script with Nautilus 2.28.0 on Karmic but it didn't work for me . Do you have any suggestions? This is what i get:
Code:
Traceback (most recent call last):
  File "custom_icon_gio.py", line 48, in <module>
    main()
  File "custom_icon_gio.py", line 42, in main
    gioFile.set_attribute_string("metadata::custom_icon", sd[1])
gio.Error: Error setting file metadata: No such file or directory