0

I am trying to assign custom icons via the bash shell using "gio set" in the following manner: "gio set -t string $FOLDERPATH metadata::custom-icon file://$FILEPATH" where $FOLDERPATH is the folder, and $FILEPATH is the image to be assigned, and receive the following error: gio: Setting attribute metadata::custom-icon not supported

"gio info --query-writable $FOLDERPATH" does not show metadata::custom-icon as writable, but it appears that this used to be possible using "gio set" or "gvfs-set-attribute". Is there any method to set a custom icon via command line or has this been fully deprecated?

EDIT: Here's an example of the command I am trying without variables: "gio set -t string /home/dud/test metadata::custom-icon file:///home/dud/test/test.jpg". Has anyone tested this or set custom icons via command line in Ubuntu 20.04?

2 Answers2

1

I don't know if you already fix the problem but for the people of the future:

Are you writing correctly the command? It is very tricky to make it works, I had a lot of problems because the path of picture has a space and because of the slashes '/'.

The command should be like this example: gio set $HOME/Documents/C metadata::custom-icon file://$HOME/Pictures/App_Logos/C.png

DO NOT USE SPACES! Using \ don't works,

I have created a bash script to change icons in bulk, check it here

0

I've encountered this problem too, Maybe it was coursed by a wrong version of gio, you can try this here https://stackoverflow.com/questions/68874201/gio-command-wont-display-metadatacustom-icon-attribute/76742254#76742254