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

GitHub Desktop App Icon not shown #16

Closed
ghost opened this issue Dec 18, 2017 · 26 comments
Closed

GitHub Desktop App Icon not shown #16

ghost opened this issue Dec 18, 2017 · 26 comments
Labels

Comments

@ghost
Copy link

ghost commented Dec 18, 2017

Issue: I don't know if this is intentional or not but the GitHub Desktop App icon is not shown. And the icon shown for when a window does open is weird looking.

The GitHub Desktop window which is open is the one with the red stop/close thing in the icon. And the one on the left of the screenshot tool is the GitHub Desktop App icon although as you can no doubt see, it is not the real GitHub Desktop icon.

GitHub Desktop Version: 1.0.11 RC1 for Linux

OS version: Ubuntu 17.10 with latest updates.

Steps to Reproduce

  1. Pin GitHub Desktop App to favorites/taskbar
  2. Launch GitHub Desktop App

Expected behavior: Official GitHub Desktop app icon to be used in taskbar/favorites and to create a window with that icon.

Actual behavior: A generic app icon was used in taskbar/favorites and it created a window a weird icon.

Reproduces how often: [Every Time

@shiftkey
Copy link
Owner

@AluminiumTech can you try out RC2? I think this was fixed in #11 but I couldn't confirm it on Ubuntu 16.04 (see #11 (comment) for more context).

@ghost
Copy link
Author

ghost commented Dec 19, 2017

@shiftkey In RC2, I see it now but it's super pixelated and also it doesn't show in the correct icon in "Show Applications" bit on Ubuntu.

@shiftkey
Copy link
Owner

shiftkey commented Dec 19, 2017

@AluminiumTech can you attach screenshots? The source image should be 512x512...

@ghost
Copy link
Author

ghost commented Dec 19, 2017

Sorry for the late reply. Here's what it looks like for me.

@shiftkey
Copy link
Owner

Any thoughts @picandocodigo - should we be using a smaller image here?

@picandocodigo
Copy link

picandocodigo commented Dec 19, 2017

Maybe we should use 128x128?

I don't know if it would be possible with Electron to set different icon sizes for different situations, but I found this specific to Ubuntu:

128: App details view in the Software Center, Alt-tab Switcher
64 : Dash, and resized to 48 for the Launcher and the Software Center tiled view
32 : Software Center list view
16 : Some places on the desktop (Nautilus list view?) and probably in the software update

@shiftkey
Copy link
Owner

The VSCode icon in the Linux build (both in the repository and the shipped release) is 1024x1024, which really doesn't help here:

@ghost
Copy link
Author

ghost commented Dec 25, 2017

Idk, the VSCode icon on my Ubuntu favorites/taskbar looks just fine.

@shiftkey
Copy link
Owner

I can see a variation of this issue in my Fedora 27 VM using the RC3 AppImage install:

  • when searching for Desktop the icon renders fine

  • when using ALT + TAB to switch between windows, the icon does appear aliased:

@appelgriebsch
Copy link

appelgriebsch commented Dec 28, 2017

I fixed some issues on my GNOME3 desktop with GitHub Desktop RC3 by changing the content of /usr/share/applications/desktop.desktop to:

[Desktop Entry]
Name=GitHub Desktop
Comment=Simple collaboration from your desktop
Exec="/opt/GitHubDesktop/desktop" %U
Terminal=false
Type=Application
Icon=github
StartupWMClass=github desktop
Categories=GNOME;GTK;Development;

@shiftkey
Copy link
Owner

shiftkey commented Jan 6, 2018

@appelgriebsch I'm intrigued by those changes:

  • Icon should map to something inside the distribution. Here's what gets generated for AppImage:
$ cd dist/__appImage-x64/usr/share/icons/
$ tree .
.
└── hicolor
    ├── 1024x1024
    │   └── apps
    │       └── desktop.png
    ├── 256x256
    │   └── apps
    │       └── desktop.png
    └── 512x512
        └── apps
            └── desktop.png

7 directories, 3 files

So where is you github icon coming from?

  • I wasn't sure what StartupWMClass represented, but this answer seems to suggest its a nice bit of helpful polish.

I've figured out how to add custom values to the .desktop file at package time, so it's possible to add this value in alongside whatever is generated...

@cromefire
Copy link

I don't know if this works, but have you ever tried to use an svg? In this case the OS decides, wich is the best size.

@gengjiawen
Copy link

I reported an issue to electron-builder electron-userland/electron-builder#2098, but got no reply for now.

@ziggy42
Copy link

ziggy42 commented Jan 18, 2018

Probably related:
screenshot from 2018-01-18 18-02-17

😅

@Serkan-devel
Copy link

I the screenshot squashed or is it really like that?

@j-f1
Copy link

j-f1 commented Jan 19, 2018

@Serkan-devel Given that the text in the image looks normal, it’s probably the icon that’s squashed.

@ziggy42
Copy link

ziggy42 commented Jan 19, 2018

Yes, it's the icon

@shgysk8zer0
Copy link

I've had all these issues and more. I have the .deb for Ubuntu 17.10 and the .rpm for Fedora 27.

On Ubuntu, it was at first showing the desktop icon (as in the brown folder one). I renamed /usr/share/hicolor/*/apps/desktop.png to be github.png instead and changed the Icon in desktop.desktop, and now I've got a generic icon. I even tried creating an SVG to put in hicolor/scalable/apps/ but that had the same results. Also, realized the SVG version is the first thing you'll find on the GitHub Desktop site.

I'm also having duplicate icons on Fedora. I pinned it, but when opening it there's a second icon that shows up. Have I missed somebody mentioning that?

@Huluti
Copy link

Huluti commented May 3, 2018

Any news?

@gabrieleara
Copy link

Hi,
I wrote a small workaround for this issue that worked for me using Ubuntu 18.04 and Gnome.
Basically it incorporates both fixes suggested by @appelgriebsch in this thread and @jkbest2 on #42.

The solution is contained in the bash script attached to this comment as a zip archive (bash script are not supported as attachment). You can get it here githubfix.zip or check the code below.

The first part changes the file of the icon in hicolor theme from desktop.png to github-desktop.png name, to avoid conflicts with already-existing system icon with that same name.
The second part changes the icon reference in a new .desktop file (that overrides default one provided with the .deb installation) and sets StartupWMClass=desktop flag, which tells the desktop manager to treat that app as a desktop app. This forces the usage of theme-provided icon as the icon both in app drawer and when the application is running.

#!/bin/bash

# After installing the deb file, execute this script

sudo mv /usr/share/icons/hicolor/1024x1024/apps/desktop.png /usr/share/icons/hicolor/1024x1024/apps/github-desktop.png
sudo mv /usr/share/icons/hicolor/512x512/apps/desktop.png /usr/share/icons/hicolor/512x512/apps/github-desktop.png
sudo mv /usr/share/icons/hicolor/256x256/apps/desktop.png /usr/share/icons/hicolor/256x256/apps/github-desktop.png

cp /usr/share/applications/desktop.desktop ~/.local/share/applications/

sed -i -e 's/=desktop/=github-desktop/g' ~/.local/share/applications/desktop.desktop
echo "StartupWMClass=github desktop" >> ~/.local/share/applications/desktop.desktop

I'll also attach here some screenshot to show how this works in my settings.

screen1
screen2
screen3

@cromefire
Copy link

cp /usr/share/applications/desktop.desktop ~/.local/share/applications/

@gabrieleara why does it need to be local?

@gabrieleara
Copy link

gabrieleara commented Aug 10, 2018

@chromefire actually it doesn’t have to be, I just found it more convenient than modifying the original file because

  • I usually work on machines with only my user
  • user-specific entries take precedence over global ones when concerning .desktop entries, as stated here
  • I don’t know how exactly how deb installers work, but if after an application update the desktop file is overwritten, then the new desktop file shall be changed as well, while in this case it is not needed. Also if updating the application re-creates icons it’s not a problem since their copies would remain there.

So it’s not strictly necessary, just a personal preference that I though many users would share.

@cromefire
Copy link

Okay but that is nothing that should be included in the actual fix

@gabrieleara
Copy link

No, indeed, it’s just a workaround that could be used while this problem is not fixed.

@ThibaudDauce
Copy link

On KDE there is a Breeze icon named /usr/share/icons/breeze/places/64/desktop.svg which override the Github /usr/share/icons/hicolor/1024x1024/apps/desktop.png icon.

@shiftkey
Copy link
Owner

I believe most of these issues were related to the name of the package, which was changed from desktop to github-desktop in #80 and is available with the 1.5.0-linux1 release.

I'm going to close this out but please open a fresh issue if you notice any ongoing issues with the current installer.

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