How to Set Linux Icon
See original GitHub issueAm opening a separate issue here rather than carry on in #125.
I’ve not been able to set an icon for the packaged Linux version of my app. It’s not documented and must work differently than OS X or Windows? In the other thread it was mentioned that you just need to set icon
in BroswerWindow
, however, that doesn’t work for me. Perhaps I’m missing something obvious?
Either way it would be good to get it stated clearly so that we can add it to the documentation 📖
I set icon
in my BrowserWindow
here. I’ve tried it both as a NativeImage
and as the path to the .png
via iconPath
. I get the same results.
When using electron-packager
I’m running this npm script. I’ve tried it with the --icon
flag and without along with both variants of the main.js
code I mention ☝️
I still do not get my icon as the app’s icon in the file manager or in the dock:
Are there other formatting specifications like size or color type? My image is here.
Issue Analytics
- State:
- Created 8 years ago
- Comments:22 (11 by maintainers)
I’ve done some testing on this and found out icons can work under certain conditions (Without using native images) which I detail at: https://github.com/electron/electron/issues/6205
I missed it before, you need to set a PNG, not an ICO.