简体   繁体   中英

How to change electron app icon without electron-packager?

I want to create a simple desktop application on Linux(Ubuntu) and set an icon for my application. For the first time i changed it simply by icon property:

win = new BrowserWindow({width: 800, height: 600, icon: `file://${__dirname}/icon.ico`});

After that i changed its icon file, But it didn't change to new icon on Ubuntu Launcher! Its icon is the same icon which i set for the first time and it doesn't change even i remove its icon file. Can anybody help me?

Contrary to my impression this issue was an Ubuntu matter. To solve this problem go to ~/.local/share/applications then you'll see all config files with .desktop extension, now simply remove intended config file to reset application icon on Ubuntu Launcher.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM