4

On Ubuntu 16.04 I used the following command to insert icons on my folders and it worked fine:

gvfs-set-attribute -t string folderIWishToInsertIcon metadata::custom-icon "file:///home/myUser/myIcon.png"

After upgrading to Ubuntu 18.04 this command still works fine but now I receive a message saying that it's a deprecated tool and it recommends me to use gio set instead :

ramuyko@myPC:~$ gvfs-set-attribute -t string folderIWishToInsertIcon metadata::custom-icon "file:///home/myUser/myIcon.png"
This tool has been deprecated, use 'gio set' instead.
See 'gio help set' for more info.

I've seen gio's man page and tried to insert icons on my folders with the gio set command but I didn't succeed using the right parameters. Does anyone know if it's possible and how to do it?

  • What parameters exactly did you use ? – Sergiy Kolodyazhnyy Jun 7 '18 at 6:02
  • Try gio set -t 'string' folderIWishToInsertIcon 'metadata::custom-icon' 'file:///home/myUser/myIcon.png' – Sergiy Kolodyazhnyy Jun 7 '18 at 6:05
  • @SergiyKolodyazhnyy Ah, my bad... It works using the exact same parameters of gvfs-set-attribute like you said. I was trying to recreate the line from zero reading the man page and it didn't cross my mind to change only the command. Well, now I know how to use a new command at least... :) – Rafael Muynarsk Jun 7 '18 at 6:19
  • Very well ! Want to post an answer with the proper command ? Or should I convert my comment into one ? – Sergiy Kolodyazhnyy Jun 7 '18 at 6:20
  • @SergiyKolodyazhnyy Just converting your comment into one is fine for me... – Rafael Muynarsk Jun 7 '18 at 6:24
4

As solved in the comments, gio set command uses same form of parameters that the gvfs-set-attribute uses, except set in gio is a separate command-line parameter, instead of gvfs-set-attribute being one whole comman. Thus the proper command should be:

gio set -t 'string' folderIWishToInsertIcon 'metadata::custom-icon' 'file:///home/myUser/myIcon.png'
| improve this answer | |

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.