Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
2.06k stars 449 forks source link

Missing Icon in Task Bar Ubuntu 20.04 LTS #3330

Closed llbaker302 closed 2 years ago

llbaker302 commented 3 years ago

Icon missing using latest appimage

neofetch below:

        .-/+oossssoo+/-.               loz@loz-ubuntu 
    `:+ssssssssssssssssss+:`           -------------- 
  -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.3 LTS x86_64 
.ossssssssssssssssssdMMMNysssso.       Host: KPL-W0X M1D 

/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.11.0-38-generic +ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 7 mins /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 1872 (dpkg), 8 (flatpak), 11 (snap) .ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.0.17 +sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1920x1080, 3440x1440 ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: GNOME ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter +sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: Adwaita .ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: Yaru-dark [GTK2/3] /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: Yaru [GTK2/3] +sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: gnome-terminal /ssssssssssshdmNNNNmyNMMMMhssssss/ CPU: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx (8) @ 2.000GHz .ossssssssssssssssssdMMMNysssso. GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series -+sssssssssssssssssyyyssss+- Memory: 3188MiB / 6850MiB :+ssssssssssssssssss+: .-/+oossssoo+/-.

image

goldbattle commented 2 years ago

This is basically due to AppImage not really having support for icons. https://github.com/AppImage/AppImageKit/issues/346

To get the desktop file to actually be installed with the icon you need another tool it seems. Probably would be good to have this on the wiki or website someplace for users. https://github.com/TheAssassin/AppImageLauncher https://github.com/TheAssassin/AppImageLauncher/wiki/Install-on-Ubuntu-or-Debian

digidigital commented 2 years ago

I had a similar issue with my PyQt5-AppImage application. The solution was to set the icon with Qt. So at least in the Task Bar there is a proper icon.

It's python code but I think you get the idea.

# Path(s) to file(s)        
icon256=os.path.join(self.scriptRoot, 'icons', 'appicon256.png')
...
# Create QIcon Object
windowIcon=QIcon()
# Add icon(s) in one ore more different resolutions.
windowIcon.addFile(icon256,(QSize(256,256)))
...
# Set Icon ("self" is the application's QMainWindow)
self.setWindowIcon(windowIcon)

You can shorten the code but I add multiple resolutions with .addFile so I keep everything separate :)

pajlada commented 2 years ago

Can try the AppImage produced by this https://github.com/Chatterino/chatterino2/pull/3554 to see if it fixes it - I don't have a non-i3 Linux setup to test it

zneix commented 2 years ago

Tested GH-3330 and it seems to do the job just fine Pretty sure that in the latest nightly build the issue should be fixed. If there's any further problems with the icon feel free to comment below though!

gj pajlada, icons work

pajlada commented 2 years ago

Fixed by #3554 - feel free to reopen if you think it's wrong.