Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No safe browser icon on Linux #382

Open
S-Coyle opened this issue Sep 19, 2018 · 8 comments
Open

No safe browser icon on Linux #382

S-Coyle opened this issue Sep 19, 2018 · 8 comments
Labels
Milestone

Comments

@S-Coyle
Copy link
Contributor

S-Coyle commented Sep 19, 2018

Noticed when testing #373 that the safe icon was present in Windows and OSX, however not in Linux. Tested both the branch for adding icons to Peruse Safe Browser as per #373 , as well as the most recent Beaker Safe Browser release (https://github.com/maidsafe/safe_browser/releases/tag/0.10.2) - no icon appearing on Linux.

My linux VM = ubuntu 16.04 LTS

Icon showing =
image

@bochaco bochaco added this to the v1.0 milestone Sep 19, 2018
@hunterlester hunterlester self-assigned this Sep 28, 2018
@hunterlester hunterlester removed their assignment Oct 2, 2018
@hunterlester
Copy link
Contributor

Setting this task aside until I can find another clue as to the issue.

One trial was the possibility of needing to explicitly set icon in BrowserWindow options: https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#icon

Another trial was possible needing to move icons directory into a build directory: https://www.electron.build/icons

Both to no avail.

@hunterlester
Copy link
Contributor

hunterlester commented Oct 3, 2018

Currently looking into necessary desktop entry: https://developer.gnome.org/integration-guide/stable/desktop-files.html.en

https://www.electron.build/configuration/linux

Thinking this is the case because there is no Icon entry in the desktop file:

   [Desktop Entry]
   Type=Application
   Name=Peruse-Browser
   Exec="/home/hunterlester/safe/dev/browser/node_modules/electron/dist/electron" "/home/hunterlester/safe/dev/browser/app/main.js" %u
   Terminal=false
   MimeType=x-scheme-handler/safe
   NoDisplay=true

@hunterlester
Copy link
Contributor

hunterlester commented Oct 3, 2018

This issue should have been fixed with electron-builder@v20.26.0.
Attempted with v20.28.4, to no avail.
Although perhaps I have misunderstood and this is a fix only for Ubuntu 18 LTS

@hunterlester
Copy link
Contributor

Upgrading electron-builder on Ubuntu 18 does not resolve the issue either.

@shriram2301 shriram2301 self-assigned this Oct 30, 2018
@joshuef joshuef added the blocked label Nov 6, 2018
@joshuef
Copy link
Collaborator

joshuef commented Nov 6, 2018

@shriram2301 can you post what you've tried here so we have record of what's been tried, and link to the electron builder issue.

@shriram2301
Copy link
Contributor

@joshuef sure thing.
So far, I have tried the following approaches:
- remove the .png file and try packaging. For Linux in the absence of the png icon, it converts the .icns icon file for macOS and uses it as app icon. This didn't work.

  • I gave the app directory and link explicitly in package.json and tried packaging both normally and explicitly with --linux as the params by adding a new script. This also didn't work.
  • another solution suggested was to move the set permissions for the files with size name in /icons directory to 644 by using chmod 644 * . This also didn't work.
  • In addition, I tried a host of restructuring the folders and their structure to no avail.
  • I also tried downgrading electron-builder to older version as well as upgrading to latest release this didn't work as well.
  • Finally, I tried moving the resources into build folder like @hunterlester had done previously. That also didn't work. But adding icon in Browser Config now shows icon in dev mode.

The link to the issue is:
electron-userland/electron-builder#2577

There are other projects which use electron-builder that have the same issue.

@shriram2301 shriram2301 removed their assignment Nov 7, 2018
@bochaco bochaco modified the milestones: v1.0, next Dec 6, 2018
@calumcraig
Copy link

calumcraig commented Dec 14, 2018

I have been able to resolve this on my local machine (Linux Mint 19 Cinnamon) by creating a .desktop file for the SAFE browser in:

/usr/share/applications/SAFE Browser.desktop

I had to manually copy an image file into the source folder for the icon then reference it:

[Desktop Entry]
Encoding=UTF-8
Exec=/home/calum/Documents/safe-browser-1.0.0-rc.2/safe-browser-v0.7.0-linux-x64/safe-browser
Icon=/home/calum/Documents/safe-browser-1.0.0-rc.2/safe-browser-v0.7.0-linux-x64/safenetworklogo.jpeg
Type=Application
Terminal=false
Comment=SAFE Browser
Name=SAFE Browser
GenericName=safe-browser
StartupNotify=false
Categories='Network';'Web Browser';

I was doing this to create a launcher in my menu for the browser but was able to add the icon image file at the same time.
image

Edit - this workaround only works for when the browser is launched from the menu launcher that the .desktop file configures. If I click on a safe link which opens the browser there is no icon as described in the original issue.

@joshuef joshuef modified the milestones: 0.11.1, Next Jan 17, 2019
@calumcraig
Copy link

Just an observation - I built another (non SAFE) Electron app today and when it is running I get the same thing as the browser - a generic icon in the taskbar. This app doesn't officially support Linux though I guess the developer hasn't considered this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants