How to create an icon for script, for desktop or taskbar?

For the past few months Evolution mail has been affected by some kind of break in webkit that prevents printing from within Evolution. There’s an easy work around, which is to run “WEBKIT_FORCE_SANDBOX=0 evolution” from the command line. OK, np.

But I was thinking of creating a script for the command and would like to make an icon for that which I can put on the desktop or the dock. Can anyone point me to documentation on how to build the icon, if that’s possible?
thx

If you want to create your own icon theme these links would be useful:
https://specifications.freedesktop.org/icon-theme-spec/latest/
https://specifications.freedesktop.org/icon-naming-spec/latest/index.html
And probably other specifications from freedesktop

But if you want only icon for your script better solution is creating .desktop file which will be having prefer icon name in Icon= line.

1 Like

All you need to do is edit the desktop file:

First copy it to your home directory:

cp /usr/share/applications/org.gnome.Evolution.desktop ~/.local/share/applications/

Change all the Exec= lines:

sed -i 's/Exec=evolution/Exec=env WEBKIT_FORCE_SANDBOX=0 evolution/g' ~/.local/share/applications/org.gnome.Evolution.desktop
1 Like