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

After installation 2.9.0 icon does not appear #559

Closed
AlysonRM opened this issue Jul 18, 2021 · 15 comments · Fixed by #606
Closed

After installation 2.9.0 icon does not appear #559

AlysonRM opened this issue Jul 18, 2021 · 15 comments · Fixed by #606
Labels
bug retest-requested Issue needs to be verified against latest version of app

Comments

@AlysonRM
Copy link

Operating System/Distribution

Which distribution of Linux are you using?
Linux Mint 20.2 base: Ubuntu 20.04 Xfce 4.16.0

Installer

Which version of the app?
2.9.0
Which installer type?
GitHubDesktop-linux-2.9.0-linux3.deb

What happened?

After installation the icon does not appear in the bottom bar.
Captura de tela_2021-07-18_15-06-06

Provide as much detail as possible. Error messages or output are extremely useful.

@K0-RR
Copy link

K0-RR commented Jul 18, 2021

Seems to be the same as #522 (comment)
Can you launch it from the xfce start menu?

@AlysonRM
Copy link
Author

AlysonRM commented Jul 18, 2021

I open and continued the same
Captura de tela_2021-07-18_18-01-08

@shiftkey
Copy link
Owner

Cross-referencing this thought: #522 (comment)

@AlysonRM are you able to test the previous release and see if that shows your icon? If so, I think backing out that line that I removed should be the right fix for this issue at least...

@shiftkey shiftkey changed the title After installation 2.9.0 icon does not apper After installation 2.9.0 icon does not appear Jul 19, 2021
@shiftkey
Copy link
Owner

Please test 2.9.0-linux4 to see if that resolves the issue

@shiftkey shiftkey added bug retest-requested Issue needs to be verified against latest version of app labels Jul 19, 2021
@AlysonRM
Copy link
Author

Captura de tela_2021-07-19_20-12-47
Tested and still in the same way as shown in the image.

@mamantoha
Copy link

The same in KDE

@ReduxFlakes
Copy link

I have the same issue in MX Linux with the Deb pacakge and the AppImage as well.

@owocado
Copy link

owocado commented Aug 14, 2021

I'm also having same issue on my Arch Linux XFCE setup after updating to 2.9.0. Previously the icon on taskbar used to show properly.

gh_desktop

@themagicalmammal
Copy link

This can be fixed by adding StartupWMClass=github desktop inside the .desktop icon. I fixed the same on my budgie setup.

@owocado
Copy link

owocado commented Sep 15, 2021

This can be fixed by adding StartupWMClass=github desktop inside the .desktop icon. I fixed the same on my budgie setup.

not working for me on Arch Linux XFCE setup. I assume you meant to edit /usr/share/applications/github-desktop.desktop ? because I couldn't find any .desktop file for github-desktop package on my system.

@sarim
Copy link

sarim commented Oct 1, 2021

I upgraded from 2.8.2 to 2.9.3 and the icon is gone. I'm running a headless WSL2 ubuntu 20.04 without any DE, its running over remote X11.
I think its happening bcz of

windowOptions.icon = join(__dirname, 'static', 'logos', '512x512.png')

There is no /usr/lib/github-desktop/resources/app/static/logos/512x512.png file. ( I installed from deb file ). Downloading and putting the 512x512 icon png and editing /usr/lib/github-desktop/resources/app/main.js to point it to the filename fixes the issue.

@owocado
Copy link

owocado commented Oct 1, 2021

OMG @sarim that fixed the icon for me too. 😱 Thank you so much. I wish if it hopefully gets fixed in next release.

EDIT: for me, it was in /opt/github-desktop/resources/app/main.js
and I had to manually create logos folder in /opt/github-desktop/resources/app/static/ and download 512x512.png and save it in there.

gh_desktop_fix_icon

@shiftkey
Copy link
Owner

shiftkey commented Oct 3, 2021

@sarim thanks for taking the time to dig into it - I must have missed something at the time about this when I tried to fix it in #561.

I was able to reproduce it locally with this patch:

diff --git a/app/src/main-process/app-window.ts b/app/src/main-process/app-window.ts
index 5ab5832c5..712269fbd 100644
--- a/app/src/main-process/app-window.ts
+++ b/app/src/main-process/app-window.ts
@@ -9,6 +9,7 @@ import { ILaunchStats } from '../lib/stats'
 import { menuFromElectronMenu } from '../models/app-menu'
 import { now } from './now'
 import windowStateKeeper from 'electron-window-state'
+import { pathExists } from '../lib/helpers/linux'
 
 export class AppWindow {
   private window: Electron.BrowserWindow
@@ -57,7 +58,13 @@ export class AppWindow {
     } else if (__WIN32__) {
       windowOptions.frame = false
     } else if (__LINUX__) {
-      windowOptions.icon = join(__dirname, 'static', 'logos', '512x512.png')
+      const path = join(__dirname, 'static', 'logos', '512x512.png')
+      console.log(`path: ${path}`)
+      windowOptions.icon = path
+
+      pathExists(path).then(result => {
+        console.log(`path exists: ${result}`)
+      })
 
       // relax restriction here for users trying to run app at a small
       // resolution and any other side-effects of dropping this restriction are

And building the app for production verifies this isn't valid:

> yarn start:prod 
yarn run v1.21.1
$ cross-env NODE_ENV=production ts-node -P script/tsconfig.json script/start.ts
path: /home/shiftkey/src/desktop/dist/github-desktop-linux-x64/resources/app/static/logos/512x512.png
...
path exists: false

I have a fix in flight, and after testing the new deb installer I think this is now working as it should:

> github-desktop
path: /usr/lib/github-desktop/resources/app/static/logos/512x512.png
...
path exists: true

@shiftkey
Copy link
Owner

shiftkey commented Oct 3, 2021

Please check out 2.9.3-linux3 which will hopefully fix this

@sarim
Copy link

sarim commented Oct 3, 2021

Yes I can confirm its fixed. Thank you very much for the quick release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug retest-requested Issue needs to be verified against latest version of app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants