Linux icons issue
See original GitHub issue- Version: 20.0.4
- Target: deb, AppImage
No matter what I try I cannot set an icon on Linux. Building from a macOS Sierra. I have dir’s customized:
"directories": {
"buildResources": "./build_res",
"output": "./build",
"app": "./dist"
}
I’ve tried setting
"linux": {
"icon": "..."
}
to all imaginable values, copying all icon folders to different locations in the root and build_res and I still get a question mark icon in Ubuntu 16.04.
I have an .icns file in ./build_res/icon.icns
.
Is there a workaround? Or a fix?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:43 (14 by maintainers)
Top Results From Across the Web
How to fix icons that never change their look whatever theme ...
On ArcoLinu we can fix this by typing the following command in the terminal sudo hardcode-fixer. This will change a hardcode path like....
Read more >Desktop icons changed - need to fix [problem rectified, cause ...
You may accidentality have changed your icon theme as well. First check whether you cannot bring the regular icons back through the appearance ......
Read more >Icons - ArchWiki
Manually · Firstly, find and download your desired icon pack. · Then navigate to the directory which contains the icon pack and extract...
Read more >Fix Your Linux Icons in Chrome OS - CrosExperts
First, go to your Files app and make your way to the Linux files. There, make sure that “Show hidden files” is checked....
Read more >How to fix missing icons, files and folders in Kali Linux
How to fix missing icons, files and folders in Kali Linux So, Aaj is video mein hum dekhenge ki kis tarah se hum...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t set an icon on Linux either, using any of the methods listed in the docs. Implicit conversion from .icns, setting it explicitly as icon.png or 1024x1024.png, or setting buildResources, or providing icon names, or copying the icons to all imaginable locations, all these methods just don’t work. I’m using 20.0.4 now.
Investigation
I investigated with my simplest config.
app-builder --version
shows 1.8.2)In this case, internally
app-builder
is executed with following args:Then
rawResult
indicates the icon size is 0x0.https://github.com/electron-userland/electron-builder/blob/37014be76e2ea8e5183a68cc4a56ffca31c08df5/packages/electron-builder-lib/src/platformPackager.ts#L609
So the icon.png is included into .deb as
/usr/share/icons/hicolor/0x0/apps/${packager.executableName}.png
. I think this is the reason why the linux icon did not appear for me. https://github.com/electron-userland/electron-builder/blob/37014be76e2ea8e5183a68cc4a56ffca31c08df5/packages/electron-builder-lib/src/targets/fpm.ts#L204-L206Workaround
icns
When I remove
build/icon.png
,dist/.icon-set
is correctly generated frombuild/icon.icns
. However we can’t use different icon from macOS.png
By following the guide, I renamed
build/icon.png
tobuild/icons/512.png
. The icon is included as/usr/share/icons/hicolor/512x512/apps/${packager.executableName}.png
and I can see it on Linux.Expected
As mentioned at previous comment, need to clarify recommended way and how icon is chosen.