user-none / KDocker

Dock most applications to the system tray
GNU General Public License v2.0
316 stars 22 forks source link

Icon is Blank after update #136

Closed username227 closed 2 months ago

username227 commented 2 months ago

Describe the bug I have Thunderbird set to open with Kdocker at startup. Before the update to 6.0, the thunderbird icon would be used automatically. After the update, the icon is blank.

I have attempted to set the icon manually, and setting it manually works, but it is not persistent after a reboot, even when the settings are saved by kdocker.

To Reproduce Steps to reproduce the behavior:

  1. use Kdocker to dock Thunderbird
  2. The icon in the tray is blank.

Expected behavior Expected to see the Thunderbird icon.

Screenshots

Screenshot from 2024-09-23 21-58-21

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Daxx commented 2 months ago

Duplicate of #135

but it is not persistent after a reboot, even when the settings are saved by kdocker

Please attach /tmp/kd.conf after running this (which just obscures your username, for modesty):

sed 's|/home/[^/]*|<HOME>|' ~/.config/com.kdocker/KDocker.conf > /tmp/kd.conf

username227 commented 2 months ago

kd.conf.txt

username227 commented 2 months ago

literally no matter what I do, I'm unble to get the icon to appear after a restart. Starting thunderbird with kdocker -i option to force a custom icon still gives me a blank icon. the kdocker.conf file does have the custom icon set, but it's not respected. Not sure what's going on.

username227 commented 2 months ago

Two more things that might help narrow down the scope of the problem: 1) I tried kdocker with a different problem (firefox) with the same results; so it's not limited to thunderbird. I wonder if it might have something to do with its interaction with cinnamon.

2) I tried disabling 'balloon tile changes' for thunderbird and that also would not save after a restart. It could be that the settings are not being respected by the program globally.

username227 commented 2 months ago

EDIT: i retract the part about the balloon tile changes. It has now saved properly.

user-none commented 2 months ago

Can you try KDocker with a non-mozilla app. Like the standard calculator app?

username227 commented 2 months ago

Can you try KDocker with a non-mozilla app. Like the standard calculator app?

OK. Just tried with gnome-calculator. Same result.

user-none commented 2 months ago

Does the corner of the window in the window frame show an icon?

username227 commented 2 months ago

Does the corner of the window in the window frame show an icon?

You mean in thunderbird (or whatever other program we've tried) itself? No, I don't think so, but I'm not 100% sure what you mean.

user-none commented 2 months ago

Here's an example with a calculator and emoji selector application. The indicated are the window icons I'm referring to. Do you have these on your windows?

Screenshot 2024-09-24 at 12 35 27 PM
username227 commented 2 months ago

that's what I thought you meant. No, I don't have those on any of my applications. I could try to play with the settings to see if I can add them.

Daxx commented 2 months ago

Does the corner of the window in the window frame show an icon?

Yes. gcalc

... and it can be seen in _NET_WM_ICON: xprop_gcalc.txt

user-none commented 2 months ago

that's what I thought you meant. No, I don't have those on any of my applications. I could try to play with the settings to see if I can add them.

Okay I think what might be happening is KDocker first tires to read that icon. If it can't find an icon it tries another method (_NET_WM_ICON). What might be happening is there is actually an icon there but it's transparent. It's a valid image so fallback isn't happening. I'm going to make some changes to how the icon is read (hopefully tonight) that will attempt to deal with transparent icons.

@Daxx Maybe that's what's happening for you but I'm not sure. I hope what I have in mind will fix your problem too.

username227 commented 2 months ago

that's what I thought you meant. No, I don't have those on any of my applications. I could try to play with the settings to see if I can add them.

Okay I think what might be happening is KDocker first tires to read that icon. If it can't find an icon it tries another method (_NET_WM_ICON). What might be happening is there is actually an icon there but it's transparent. It's a valid image so fallback isn't happening. I'm going to make some changes to how the icon is read (hopefully tonight) that will attempt to deal with transparent icons.

@Daxx Maybe that's what's happening for you but I'm not sure. I hope what I have in mind will fix your problem too.

Transparent icons...hmmm....I wonder how I can get Cinnamon to show the icon there. Just looked and didn't see anything in settings. In any case, this sounds promising, and I appreciate all your work.

user-none commented 2 months ago

It's the best explanation I can come up with. I installed Cinnamon on Fedora and the icons are showing in the dock for me.

username227 commented 2 months ago

quick question - when you installed Cinnamon on Fedora, did you have icons in the top corner? I have been doing some research, and it seems like this requires a metacity theme, and cinnamon/mint dropped support for this somewhere around mint 19.2, or something. If you are seeing them, i'd be interested in knowing how.

user-none commented 2 months ago

when you installed Cinnamon on Fedora, did you have icons in the top corner?

No, no icons in the corner.

I'm guessing on what's going on because several people are having this issue but for some reason I can't make it happen. I've tested (before and now after the 6.0 release) with Mate, Gnome, KDE, XFCE, Cinnamon, and LXDE. Firefox, Thunderbird, and multiple desktop default applications.

user-none commented 2 months ago

A tray-icon branch has been made with some reworking of some of the icon code. It also added in some basic debug that gets written to the console. @username227, can you build this branch and see what it does. Run from the console and provide the output too please. @Daxx too if you can with Sublime.

Daxx commented 2 months ago

2. It could be that the settings are not being respected by the program globally.

I agree. V6.0 is ignoring "CustomIcon" settings and "Balloon title changes" and maybe others :(

user-none commented 2 months ago

I agree. V6.0 is ignoring "CustomIcon" settings and "Balloon title changes" and maybe others :(

Some settings are indeed broken. "CustomIcon" is definitely one of them.

user-none commented 2 months ago

I check all options, setting them saving, unsetting, saving. Only custom icons were not working. Everything else appears fine.

user-none commented 2 months ago

Settings fixes (and some additions) have been merged to main.

username227 commented 2 months ago

On a completely separate note, I have reworked the Arch git package on the AUR (kdocker-git) so that it builds again. I have reached out to the maintainer of that package to let him know. The new pkgbuild is here: https://github.com/username227/kdocker-git-package-fix. Hopefully whoever maintains it will either update it or give me rights to do it myself.

Daxx commented 2 months ago

Settings fixes (and some additions) have been merged to main.

Thanks, John @user-none, looking good now!

user-none commented 2 months ago

6.1 released which closes this out.

username227 commented 1 month ago

Wanted to follow up and alert you. The latest commit seems to have done something to the fix you implemented here. The prior fix showed my Thunderbird application properly in the dock. however, the current commit shows only the backup icon that you programmed to show in the event that it can't find an icon.

Daxx commented 1 month ago

shows only the backup icon

See if there's any output(1) from kreadconfig5 --file ~/.config/com.kdocker/KDocker.conf --group "thunderbird" --key CustomIcon If it returns a filename, make sure that file actually exists, else you'll see the backup icon.

(1) Or fish about in ~/.config/com.kdocker/KDocker.conf, manually.

username227 commented 1 month ago

Hmmm....OK, so you're right, the icon didn't exist, it was present under a different file name. When I added a second one with the correct file name it worked.

But here's the really strange thing - both versions of the program resulted in the same output, and the older version of the program worked properly to show the icon even though the icon wasn't the right name. that's bizarre.

username227 commented 1 month ago

Oh, anyway, while I have your attention, I finally got access to the kdocker-git package on the AUR and fixed it. The regular kdocker package is out of date, but whoever maintains it did update to 6.0, just never updated it to 6.1. Do you know this guy "Presence" who maintains that package?

user-none commented 1 month ago

Do you know this guy "Presence" who maintains that package?

Nope. I don't have anything to do with distro packaging.

make sure that file actually exists, else you'll see the backup icon.

I'm going to make a change to have the icon not found icon be a different color when it's file not found from the config so it's easier to differentiate this situation.