cryptomator / cryptomator

Cryptomator for Windows, macOS, and Linux: Secure client-side encryption for your cloud storage, ensuring privacy and control over your data.
https://cryptomator.org
GNU General Public License v3.0
11.92k stars 1.04k forks source link

System tray icon has light gray instead of transparent background on Linux / KDE #2986

Closed sschuberth closed 1 year ago

sschuberth commented 1 year ago

Please agree to the following

Summary

System tray icon background is not transparent

What software is involved?

Volume Type

None

Steps to Reproduce

Run Cryptomator with the tray icon enabled.

Expected Behavior

The tray icon should have a transparent background.

Actual Behavior

The tray icon has a light gray background (which is esp. visible with a dark desktop theme).

Reproducibility

Always

Relevant Log Output

No response

Anything else?

image

infeo commented 1 year ago

Should be fixed with https://github.com/cryptomator/cryptomator/pull/2885

Cris70 commented 1 year ago

I just finished updating to v1.10.1 I was eagerly waiting for this release to finally see mi tray icon fixed, but unfortunately the problem is still there 🙁 immagine

Operating system: Opensuse Tumbleweed DE: KDE Plasma Cryptomator 1.10.1 (appimage-4844)

purejava commented 1 year ago

Maybe Opensuse suffers from the same shared library configuration as Fedora does, see here?

appindicator-gtk3-java release 1.3.5 addresses and fixes this.

Cryptomator 1.10.1 implements version 1.3.4.

purejava commented 1 year ago

I was eagerly waiting for this release to finally see mi tray icon fixed, but unfortunately the problem is still there 🙁

immagine

The screenshot you provided looks like the native appindicator libraries are not used at all but the AWT fall back.

Could you please provide the Cryptomator log file?

Cris70 commented 1 year ago

The screenshot you provided looks like the native appindicator libraries are not used at all but the AWT fall back.

Yes, I think you're right, as this is what I see when the mouse hovers over the tray icon: immagine

Could you please provide the Cryptomator log file?

Here it is: cryptomator0.log

Thank you in advance!

Cris70 commented 1 year ago

I just gave a look at the log file. I saw this:

10:36:44.295 [JavaFX Application Thread] INFO  o.p.appindicator.RuntimeHelper - Native code library libayatana-appindicator3.so.1 failed to load
10:36:44.295 [JavaFX Application Thread] INFO  o.p.appindicator.RuntimeHelper - Native code library libappindicator3 failed to load

So I verified the installed libraries:

~ > zypper se libayatana-appindicator3 libappindicator3
Caricamento dati del repository in corso...
Lettura dei pacchetti installati in corso...

S  | Name                           | Summary                                        | Type
---+--------------------------------+------------------------------------------------+----------
i+ | libappindicator3-1             | Application indicators library                 | pacchetto
   | libappindicator3-devel         | Development files for libappindicator          | pacchetto
   | libayatana-appindicator3-1     | Ayatana application indicators library         | pacchetto
   | libayatana-appindicator3-devel | Development files for libayatana-appindicator3 | pacchetto

As you can see, libayatana-appindicator3-1 was not installed. So I installed it and restarted Cryptomator. Now the library is there:

~ > whereis libayatana-appindicator3.so.1
libayatana-appindicator3.so.1: /usr/lib64/libayatana-appindicator3.so.1

However, Cryptomator still says it cannot load the library: cryptomator0.log

Maybe it is because it's an appimage?

purejava commented 1 year ago

Thanks for your log!

None of the native libraries that are needed to display the new tray icon are loaded:

10:36:44.295 [JavaFX Application Thread] INFO  o.p.appindicator.RuntimeHelper - Native code library libayatana-appindicator3.so.1 failed to load
10:36:44.295 [JavaFX Application Thread] INFO  o.p.appindicator.RuntimeHelper - Native code library libappindicator3 failed to load

So when one or both is installed on your system (please check), please verify, that the path the native library is installed to, is contained in either /etc/ld.so.conf or one of the files in /etc/ld.so.conf.d/.

Probably the latter is missing or none of the libraries is installed and that's why the tray icon is not displayed properly.

Edit: corrections, because I did not see your last comment before I send mine

purejava commented 1 year ago

However, Cryptomator still says it cannot load the library:

cryptomator0.log

Thanks for your checks. A workaround for you would be to symlink one of the required libraries from /usr/lib, if this is an option for you.

As your native libraries live in /usr/lib64, your issue will be fixed, when 1.3.5 will be included in Cryptomator, as described before.

Maybe it is because it's an appimage?

No. That doesn't matter in your case. AppImages usually can contain required dependencies, however, the native libraries of question here are not contained and appindicator-gtk3-java does its best to locate them on a Linux system and load them.

Cris70 commented 1 year ago

Hi @purejava , I symlinked libayatana-appindicator3.so.1 into /usr/lib and now everything works correctly. Much much better now!! Thank you!

A bit dark, if I may, but still much better than before! immagine

purejava commented 1 year ago

Hi @purejava , I symlinked libayatana-appindicator3.so.1 into /usr/lib and now everything works correctly.

Much much better now!! Thank you!

Fine, that it's working for you. You are very welcome @Cris70.

A bit dark, if I may, but still much better than before!

immagine

The color code defined in the SVG code of the icon is #f2f2f2, which should make the icon look much lighter than it is. I don't know, why KDE isn't using the color, but will see, if I can find out something when I am back to my computer.

purejava commented 1 year ago

Hi @Cris70, I've made an AppImage, that is based on the unchanged Cryptomator develop branch. The only changes, that it contains, are two modified tray icons, that contain a slightly simplified SVG-code.

You can download the AppImage here. Could you download it and run it on your system, to see, if it makes a difference for you, e.g. the colour is better?

Cris70 commented 1 year ago

Hi @purejava , thank you very much for the new release!! Unfortunately, the tray icon color is exactly the same as before.

purejava commented 1 year ago

Thank you very much for the immediate test @Cris70!

I'll have to take a deeper look at Tumbleweed and do more research on how tray icons are handled.

purejava commented 1 year ago

@Cris70, which desktop environment are you on and which design are you using?

I installed Opensuse Tumbleweed with KDE and the tray icons look, like they should with the Breeze themes, running the common Cryptomator 1.10.1 AppImage:

Bildschirmfoto 2023-09-30 um 11 41 41


Bildschirmfoto 2023-09-30 um 11 41 53

You said, you are running KDE. Maybe with another icon theme or design as KDE calls it, as your icons are coloured?

overheadhunter commented 1 year ago

Just chiming in to mark #3127 as related regarding the loading of native libraries from /usr/lib64 instead of /usr/lib. And I'm out again :wink:

purejava commented 1 year ago

Just chiming in to mark #3127 as related regarding the loading of native libraries from /usr/lib64 instead of /usr/lib. And I'm out again 😉

Thanks, but on my Arch Linux (which exists 64 bit only), there is only /usr/lib, no /usr/lib64.

Cris70 commented 1 year ago

@Cris70, which desktop environment are you on and which design are you using?

Hi @purejava , I'm using Arc Dark global theme with Papirus-Dark icons.

Hope this helps...

Cris

purejava commented 1 year ago

Thanks again @Cris70. To be honest, I don't know why the icons look that dark with your desktop theme / icon theme combination.

Some technical background: the newly created systray icons contained in Cryptomator that work with the appindicator libraries are symbolic icons. We decided to use these instead of the previous coloured ones, because the systray areas of the major desktop environments (DE) are monochrome nowadays.

The Cryptomator symbolic icons do have an improvement: the ability to adopt their colour to the systray area. They read a colour property named currentColor and set their colour to that.

I suspect the Papirus-Dark theme to interfere with that. But that's only an assumption.

Cris70 commented 1 year ago

Thank you for all your work @purejava. I think I can call myself satisfied with the solution of the light background problem. The dark-ish color of the tray icon is just a minor nuisance. For me, the problem is fixed and the bug can be closed. But that's obviously just my opinion, I don't know if the OP solved his problem or not.

purejava commented 1 year ago

Thank you for all your work @purejava. I think I can call myself satisfied with the solution of the light background problem. The dark-ish color of the tray icon is just a minor nuisance. For me, the problem is fixed and the bug can be closed. But that's obviously just my opinion, I don't know if the OP solved his problem or not.

You are welcome. I played around a little more. My Opensuse Tumbleweed is a fresh installation, and I installed the desktop theme and icon theme you mentioned above. For me, it looks like this and OK:

Bildschirmfoto 2023-10-02 um 09 10 35

I installed the desktop theme via the system preferences in KDE: Screenshot_20231002_092027

Whereas, using the system preferences to install the icon theme did not work for me - the icon them did not appear in the list. So I downloaded it from the link you provided and installed it from disc.

Maybe it helps in your case, when you try to reset the KDE theme and icon settings and install both themes again.

purejava commented 1 year ago

Thank you for all your work @purejava. I think I can call myself satisfied with the solution of the light background problem. The dark-ish color of the tray icon is just a minor nuisance. For me, the problem is fixed and the bug can be closed. But that's obviously just my opinion, I don't know if the OP solved his problem or not.

The OP's issue is different @Cris70. Fedora 38 suffers from the same shared library configuration like Tumbleweed.

appindicator-gtk3-java release 1.3.5 addresses and fixes this.

infeo commented 1 year ago

Fixed in 2e2aa77727c212a1751c3a0a10c73bda77463e04

infeo commented 1 year ago

appindicator-gtk3-java release 1.3.5 addresses and fixes this.

@purejava Was this related to the opening issue or your side discussion? 😅

purejava commented 1 year ago

appindicator-gtk3-java release 1.3.5 addresses and fixes this.

@purejava Was this related to the opening issue or your side discussion? 😅

@infeo Side discussion.

Analyzing the issue @Cris70 had showed, that he suffered from the same as the OP, which was fixed with the introduction of appindicator and additionally suffered from the issue fixed with appindicator 1.3.5..