Brief: This simple quick tip shows how to remove trash icon from the desktop in Ubuntu 18.04. Both graphical and command line methods have been discussed.
Starting Ubuntu 17.10, Canonical uses a customized version of GNOME as the default desktop environment. This customized version has a resemblance to the previous default desktop environment, Unity.
While I find the new GNOME desktop quite pleasing, I don’t like one thing here and that is the trash icon on the desktop. It reminds me of the Windows XP days when there always was that recycle bin on the desktop with no direct way of removing it.
It’s pretty much the same in Ubuntu 18.04 and later versions. You won’t find the option to hide the trash icon from the desktop in the default system settings.
Then how do you remove the trash icon? GNOME Tweaks tool comes to rescue.
Remove trash icon from the desktop using GNOME Tweaks tool
If you have not installed it already, you must. GNOME Tweaks enables you to further tweak your system including installing new themes in Ubuntu 18.04. I cannot imagine myself using Ubuntu without this tool.
You can find it in the software center, just search for it.
Once you have it installed, launch it by searching (press Super/Windows keys) for Tweaks:
In here, go to Desktop in the left side pane and toggle the button for Trash.
That’s it. It will disappear immediately. You can toggle it again to bring back the trash icon on the desktop.
Remove trash icon from the desktop using command line
If you prefer the command line, you can use the command below in a terminal to remove the trash icon from Ubuntu desktop.
gsettings set org.gnome.nautilus.desktop trash-icon-visible false
If you want it back, simply replace the false in the above command with true:
gsettings set org.gnome.nautilus.desktop trash-icon-visible true
I hope this quick tip helped you in customizing GNOME desktop on your Ubuntu system. If you know other such quick tips, please share it in the comment section.