BrowserWindow Icon not working?


I did some research on this and I can’t seem to find any relevent posts about setting the app icon that will show in the dock for example.

I thought it was just defined in the BrowserWindow like:

win = new BrowserWindow({
width: 1200,
height: 600,
frame: true,
transparent: false,
icon: ‘./images/logo.png’

But this does not change it. Does this not work? Any thoughts on how I can set this icon?



There are topics on how to set a new Atom icon here on the forum. I suspect they would be similar in how to do it.


I do not see any threads discussing how to insert a custom icon into the dock for when the app is running. I see thread about changing the atom icon but that is all… link? Name of thread maybe?


@CragVFX This issue sounds similar to yours:

So the “dock” icon is an .icns file defined in Info.plist. That’s for OS X. Are you also trying to do the same for Windows and Linux?


As @simurai said, on OSX the icon is defined in the Info.plist file.

As Atom (and other atom-shell apps) can run without a window the dock icon isn’t bound to a window but rather to the main app. This is why, when you close all opened Atom windows, there’s still the Atom icon in the dock.

Also, there’s a strange thing about Finder and app icons cache. Once the Finder had retrieved the app icon once it keeps it cached unless you use the following commands:

touch bin/darwin/atom-shell/
touch bin/darwin/atom-shell/

Doesn’t ask me why, but this is how you clear the cached icon for an app…


As abe mentions, indeed the icon cache is in Finder. As an alternative to the given terminal commands, you could also force-quit finder entirely under command + alt + escape. This will also cause the icon cache to be rebuilt.