Ubuntu – Reverting to the default icon of the Trash bin

gnomeiconstrash

I'm using Ubuntu 18.04 (GNOME). I have just changed the default icon of the Trash bin to a custom one by right-clicking the trash bin icon, choosing properties, clicking on the old icon and finding the new corresponding icon file via Nautilus. No terminal commands were used.

Now I'm trying to revert the changes, but with no luck so far. Unfortunately, there's no working option like "revert changes" or something like that.

Best Answer

when the trash icon is changed by right clicking it, Properties and clicking on icon,

the path of this newly selected icon will be saved in ~/.config/nautilus/desktop-metadata

enter image description here

when the icon was not changed, some of the content in this file is

[trash]
nautilus-icon-position-timestamp=1551022571
nautilus-icon-position=56,146
icon-scale=1

for example:

I have changed the trash-icon by right clicking... then the content of above mentioned file changed to

[trash]
nautilus-icon-position-timestamp=1551022571
nautilus-icon-position=56,146
icon-scale=1
custom-icon=file:///home/pratap/Pictures/Screenshot%20from%202019-02-24%2021-09-32.png

enter image description here

to revert the changes.. the below line need to be deleted from the file ~/.config/nautilus/desktop-metadata

custom-icon=file:///home/pratap/Pictures/Screenshot%20from%202019-02-24%2021-09-32.png

to delete the line and save the changes..run the below command, edit and save the file.

sudo -H gedit ~/.config/nautilus/desktop-metadata

Now logout and login to see the change..

enter image description here

Related Question