In Ubuntu, is it possible to change the icon for a specific file from the command line? I want to create a shortcut with a custom icon, so I'll need a way to change a specific file's icon. (Instead of changing the icon associated with a filetype, I want to change the icon associated with just one specific file.)
There are 2 solutions:
You change the icon from the terminal using
gio set
here is the command you will use:gio set
is an update ofgsfv
for anyone who is familiar wih this command.You can create a
.desktop
using the following code:and make the desktop entry executable using
chmod +x MyApp.desktop
You can also use
desktop-file-edit
command as below.https://manpages.ubuntu.com/manpages/bionic/man1/desktop-file-install.1.html#edit%20options