wyc
wyc

Reputation: 55303

How to use electron-packager to create a custom icon in Linux?

Following this tutorial:

https://www.youtube.com/watch?v=dz5SnmBzBXc

I did this: electron-packager . MyApp --platform=linux --arch=x64 --version=0.37.2 && cp icon.png MyApp-linux-x64/resources/atom.png

The icon is saved into the resources folder, but the icon doesn't show in my Ubuntu left panel (I just see the default cog).

What the correct way of setting up the icon for Linux?

EDIT:

I also tried this: var mainWindow = new BrowserWindow({ icon: 'file://' + __dirname + '/resources/atom.png',

No luck.

EDIT 2

Here's a screenshot of the whole thing:

enter image description here

Upvotes: 0

Views: 393

Answers (1)

phuongle
phuongle

Reputation: 1186

Try this command: electron-packager . MyApp --platform=linux --arch=x64 --version=0.37.2 --icon=<path/to/your-icon-name>

Upvotes: 1

Related Questions