question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No app icon (deb installation)

See original GitHub issue
  • Version: 20.2.0
  • Target: Linux (debian based distro)

package.json

"linux": {
      "category": "AudioVideo",
      "packageCategory": "AudioVideo",
      "synopsis": "...",
      "icon": "./build/icons",
      "target": [   {
          "target": "deb",
          "arch": [  "x64", "ia32" ]
        } ],
      "maintainer": "...",
      "desktop": {
        "Encoding": "UTF-8"
      }

The ./build/icons folder contains 10 png files named according to the image size: 16x16.png to 1024x1024.png

.desktop file produced

[Desktop Entry]
Name=appname
Comment=...
Exec="/opt/appname/appname" %U
Terminal=false
Type=Application
Icon=appname
Encoding=UTF-8
Categories=AudioVideo;

The generated .deb file have the following structure inside:

...
[usr]
----[share]
---------[icons]
-------------[hicolor]
------------------[16x16]
------------------------[apps]
---------------------------- appname.png
                                  ...
------------------ [1024x1024]
------------------------[apps]
---------------------------- appname.png

No app icon on any shortcut.

If I want to have an app icon I have to use the following: 1- add an icon file to root directory and specify it on the ExtraFiles entry of the package.json 2- change the linux.desktop key on the package.json to something like

"desktop": {
   Icon="/opt/appname/iconfilename.png"
   ...
}

What’s the correct way to automate app icon creation with the electron builder?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
samuelcarreiracommented, Mar 2, 2018

I listed the file permissions on the ./build/icons folder and notice that the file permissions are wrong (-rwxrwx—). The electron builder copied the files without changing their permissions so that was my fault that the system cannot read the icons!

I changed all the .png icon file permissions inside the icons folder with the command sudo chmod 0644 * and the all files are copied correctly and the system can now read the icon.

I will close this issue, but before that, I will leave the following warning to other users with the same issue:

If you use custom png icons inside a folder (like ./build/icons/24x24.png) make sure that the files have the correct permissions. You can change that with the command sudo chmod 0644 *

2reactions
develarcommented, Mar 5, 2018

@samuelcarreira You are hero. Thanks a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add icon for application installed via .deb file?
This new installation works fine with the VPN but the app icon is now simply a gear. I would like to change this...
Read more >
Custom App Icons - Electron Forge
The purpose of this guide is to walk through the process of generating and setting an app icon, as well as setting installer...
Read more >
Desktop App install guides - Mattermost Documentation
Install and update the Mattermost desktop app ; At the command line, set up the Mattermost repository on your system: curl -o- https://deb.packages.mattermost....
Read more >
Install PyCharm - JetBrains
Run the installer and follow the wizard steps. After you run the Toolbox App, click its icon Toolbox App icon in the notification...
Read more >
Linux app icon no longer working - Dropbox Community
I installed Dropbox using the deb on the download page a few days ago on a new install of Lubuntu 16.04 The tray...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found