I’ve made a script that launches a tool, and created a desktop icon for it. Works well.
Now I want to take a little image (png file) and make it the icon’s picture.
I can see the icon properties where I can chose the icon image.
But that function will only open a (large) list of what I would call predefined ‘system’ provided icons. Nowhere in that screen is y own little picture.
How do I either :
Install my picture into the system icon repository?
You have to create a .desktop file. There’s hundreds of them on your system, use one as an example and adjust to your needs. They also contain a line which says “Icon=…”
No need to. Just drop a square bitmap in some folder - preferably with a resolution multiple of 16, I use 256 or 512 with a 4K monitor.
Right-click the desktop shortcut you created, select Properties. Click the current icon (or empty space). In the dialog window select Other Icons and browse to your bitmap.
I think the chosen icon will be added to the icon cache or something, but you can always leave your bitmap where you placed it.
Forgot that one. I open the bitmap in GIMP, add the alpha channel (this gives transparency to empty regions), select all pixels you want to vanish (you can use the contiguous selection tool for that) and press DEL. Save as PNG, resolution as above.