Code Monkey home page Code Monkey logo

Comments (26)

ziggy42 avatar ziggy42 commented on July 17, 2024 2

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

πŸ˜…

from desktop.

 avatar commented on July 17, 2024 1

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

from desktop.

gabrieleara avatar gabrieleara commented on July 17, 2024 1

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

from desktop.

gabrieleara avatar gabrieleara commented on July 17, 2024 1

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

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@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).

from desktop.

 avatar commented on July 17, 2024

@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.

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

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

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

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

from desktop.

picandocodigo avatar picandocodigo commented on July 17, 2024

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

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

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

from desktop.

 avatar commented on July 17, 2024

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

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

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:

from desktop.

appelgriebsch avatar appelgriebsch commented on July 17, 2024

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;

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

@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...

from desktop.

cromefire avatar cromefire commented on July 17, 2024

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.

from desktop.

gengjiawen avatar gengjiawen commented on July 17, 2024

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

from desktop.

Serkan-devel avatar Serkan-devel commented on July 17, 2024

I the screenshot squashed or is it really like that?

from desktop.

j-f1 avatar j-f1 commented on July 17, 2024

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

from desktop.

ziggy42 avatar ziggy42 commented on July 17, 2024

Yes, it's the icon

from desktop.

shgysk8zer0 avatar shgysk8zer0 commented on July 17, 2024

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?

from desktop.

Huluti avatar Huluti commented on July 17, 2024

Any news?

from desktop.

cromefire avatar cromefire commented on July 17, 2024

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

@gabrieleara why does it need to be local?

from desktop.

gabrieleara avatar gabrieleara commented on July 17, 2024

@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.

from desktop.

cromefire avatar cromefire commented on July 17, 2024

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

from desktop.

ThibaudDauce avatar ThibaudDauce commented on July 17, 2024

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.

from desktop.

shiftkey avatar shiftkey commented on July 17, 2024

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.

from desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.