Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

App icon on linux broken #109

Closed
OiYouYeahYou opened this issue Oct 24, 2019 · 11 comments
Closed

App icon on linux broken #109

OiYouYeahYou opened this issue Oct 24, 2019 · 11 comments
Labels
bug 🐛 Something isn't working help wanted ✋ Extra attention is needed wontfix
Milestone

Comments

@OiYouYeahYou
Copy link

Describe the bug
On Ubuntu the app icon is either not set or missing

To Reproduce
Steps to reproduce the behaviour:

  1. Download app image
  2. Run app image on Ubuntu
  3. Look at app icon in the dock/app-bar
  4. Observe that it is the "iconless icon" given to apps without icons

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 19.04 with GNOME

Additional context
Willing to accept PR? It's often an easy fix

@lauthieb lauthieb added the bug 🐛 Something isn't working label Oct 24, 2019
@lauthieb
Copy link
Owner

Thanks a lot @OiYouYeahYou for reporting this bug.
I don't have any Linux so I can't investigate this. Hope that anyone could fix this issue.
Have a nice day!

@lauthieb lauthieb added the help wanted ✋ Extra attention is needed label Oct 24, 2019
@lauthieb lauthieb added this to the V1.3.0 milestone Oct 24, 2019
@OiYouYeahYou
Copy link
Author

I'm looking at the code now. Do you have a raw SVG file I can use to convert into the relevant formats directly?

@lauthieb
Copy link
Owner

Just PNG sorry :(

@lauthieb
Copy link
Owner

@TheFern2
Copy link
Contributor

TheFern2 commented Jan 7, 2020

Is this still an issue? I used lubuntu, and icon works fine on that one, I don't have ubuntu VM and I don't like the distro lol.

Can you please go to ~/.local/share/applications or whatever path your .desktop file is, and show us the contents of that files. It should be called appimagekit-code-notes.desktop

I believe this is an electron issue as per the two issues below:
electron-userland/electron-builder#2269
electron-userland/electron-builder#748

Can you try on src/main/index.js adding inside BrowserWindow:

mainWindow= new BrowserWindow({
   ...
   icon: path.join(__dirname, '/build/icons/256x256.png')
})

Then do a build test, and let us know if it worked, some users on those thread said yes other no:

npm run build

@OiYouYeahYou
Copy link
Author

I cloned a fresh copy of master and made the suggested changes. The icon still doesn't work unfortunately

diff --git a/src/main/index.js b/src/main/index.js
index cc380f6..f244bb0 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -1,4 +1,5 @@
 import { app, BrowserWindow, Menu } from 'electron'; // eslint-disable-line
+import { join } from 'path';
 
 /**
  * Set `__static` path to static files in production
@@ -27,6 +28,7 @@ function createWindow() {
     width: 1160,
     minHeight: 500,
     minWidth: 900,
+    icon: join(__dirname, 'build/icons/255x256.png'),
   });
 
   mainWindow.loadURL(winURL);

@kodaman2 as an aside: lubuntu, ubuntu, kubuntu and xubuntu are all the same distribution. The only major difference is which {,l,k,x}ubuntu-desktop package is installed. And installing the different DE is just a matter of running sudo apt install [,l,k,x]ubuntu-desktop

@TheFern2
Copy link
Contributor

If is all the same, then I dunno, it works perfect on my lubuntu. Btw you have a typo on the diff you pasted. 255x256.png, might want to to try 256x256.png

@OiYouYeahYou
Copy link
Author

The typo makes no difference :(

@TheFern2
Copy link
Contributor

TheFern2 commented Jan 11, 2020

Any errors on console?

Can you include your desktop file contents.

Perhaps what you mentioned about desktop options has something to do with it. Link below edited the desktop file for gnome. I'll have to check what I'm running I've never gotten into the details of different desktops tbh.

laurent22/joplin#86 (comment)

@TheFern2
Copy link
Contributor

TheFern2 commented Jan 19, 2020

I've ran Ubuntu 19.04 with gnome with no issues. Not much I can think of to debug this issue if is working on 3 different linux systems, I've tried. Does the icon shows on the applications menu?

image

image

image

@stale
Copy link

stale bot commented Jul 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 23, 2020
@stale stale bot closed this as completed Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 Something isn't working help wanted ✋ Extra attention is needed wontfix
Projects
None yet
Development

No branches or pull requests

3 participants