Make my own icon picture and assign it to a desktop icon

Hello All,

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 :

  1. Install my picture into the system icon repository?
  2. Or point the desktop object to my own image?


You forgot to tell which desktop you use. This could be different for e.g. KDE, Gnome, …)

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=…”


Using KDE.

Is that entry a fully qualified path, of does it refer to a relative location?

What file formats and sizes are allowed for icons?

How are icon background made transparent?



When you mean “aboslute path” vs. “relative path”, an aboslute path starts with a /, a relative path does not.

(The term “fully qualified” is used for domain names, short FQDN).

  1. 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.
  1. 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.