Hardcode-Tray
Hardcode-Tray copied to clipboard
Element icon keeps switching back
Specifications
- Hardcode-Tray version : 4.3
- Distribution : Arch Linux
- Gtk version : Gtk3 1:3.24.27
- Inkscape version : 1.0.2
- Cairo version : 1.17.4
- Application name : Element Desktop (1.7.23)
Expected behavior and actual behavior
Every time I run hardcode-tray, Element's tray icon gets properly switched, but when I start Element again the icon gets switched back after a couple of seconds.
Steps to reproduce the problem
- Close Element
- Run
sudo -E hardcode-tray --conversion-tool RSVGConvert --size 22 - Start Element again
strange behavior, i'm test with DEB-package 1.7.23 all worked fine and icon not changed...
Try check visual changed icon on /usr/lib/element/img/element.png when switched after a couple of seconds.
Also try maybe after applying hardcode-tray set read-only premissions for this icon:
sudo chmod 444 /usr/lib/element/img/element.png
@varlesh I have the same problem. It happens when i get any message. Also i can not find an element folder in /usr/lib. Using Kubuntu, newest version.
It's old bug. Aplication initially use PNG but after loading - used ICO: https://github.com/bilelmoussaoui/Hardcode-Tray/issues/527 hardcode-tray not support ICO, but i think it's can be fixed manually. Try it:
cd /opt/Element/resources/img/
sudo ffmpeg -i element.png element.ico
@varlesh Ok, i did what you said, but it changed nothing. It seems that it's not using the ico. I did a full search and i did not find an element.ico anywhere else on my drive.
Thank you for all the help by the way, you are awesome.
Also, not sure if related, but i noticed that when i change the icon theme, the element tray icon disappears altogether. It is the only app that has this problem for me.
Ok, so i have found the issue. The icon is in the webapp.asar When you unpack /opt/Element/resources/webpack.asar you can find the icon in /vector-icons/
yes, on sources used favicon code... i think used favicon.ico for tray from webpack.asar anyway we can't fix that, because hardcode-tray not support ICO
Ok, so i have found the issue. The icon is in the webapp.asar When you unpack /opt/Element/resources/webpack.asar you can find the icon in /vector-icons/
Hmm... I can't find the /Element folder in /opt
on Archlinux it's /usr/lib/element
ok, thanks
Any news on this issue? It's not possible to fix the .ico using ffmpeg?
My temporary fix, maybe help someone...
npx asar e\
/opt/Element/resources/webapp.asar\
element-asar
rsvg-convert -f png\
/usr/share/icons/Papirus/24x24/panel/element-desktop-tray.svg\
-o element-asar/vector-icons/favicon.*.ico
npx asar p\
element-asar\
webapp.asar
sudo cp -rf\
webapp.asar\
/opt/Element/resources/
sudo rsvg-convert -f png -h 256 -w 256\
/usr/share/icons/Papirus/24x24/panel/element-desktop-tray.svg\
-o /opt/Element/resources/img/element.png
rm -rf\
element-asar\
webapp.asar
yes, on sources used favicon code... i think used favicon.ico for tray from webpack.asar anyway we can't fix that, because hardcode-tray not support ICO
As you can see on my temporary fix, there's no need to convert to ico format, just use the png format and everything's fine.