Ximi1970 / systray-x

SysTray-X: A system tray extension for Thunderbird. Needs both the addon AND the companion app installed to work. Will not work with TB flatpaks or snaps.
Mozilla Public License 2.0
217 stars 14 forks source link

Workaround for Wayland desktops #70

Open Ximi1970 opened 3 years ago

Ximi1970 commented 3 years ago

This add-on and companion app will never work with FULL Wayland desktops due to the design of Wayland. (No interaction between window clients)

Please have a look at the workaround:

https://github.com/Ximi1970/systray-x/issues/159#issuecomment-1773941228

christophehenry commented 3 years ago

Another Thunderbird system tray extension, Birdtray, has the same issue. However, in their issue, the maintainer, mentions a new Wayland protocol specifically designed for system trays, the Wayland Toplevel Management protocol. It is currently unstable and probably still not implemented in Gnome and KDE — as mentionned in Birdtray's issue — but hopefully, it will eventually reach stable and offer a way to solve that issue?

Ximi1970 commented 3 years ago

Thanks for the tip. But we need to wait for it the work at least a bit before I will have a try.

mi16087 commented 2 years ago

I recently switched to EndeavourOS (Arch-based distro) gnome which has wayland and xorg (wayland is default), i set everything up on xorg (and activated gnome extension "AppIndicator and KStatusNotifierItem Support"), then switched to wayland and it's still working, restarted, run wayland from the start, stil working. Gnome version is 41.2. Did not try to set it up on wayland cause it's statet that it doesn't work. Mabe the gnome extension is the key. I don't know much about it, just wanted to share the info. :)

christophehenry commented 2 years ago

IIRC, there's a compatibility layer between Wayland and X11 for now because a lot of softwares have no support whatsoever of Wayland yet. I suppose it's why it' working right now. But, as the time passes, X11 is expected to slowly become deprecated and Wayland become the standard.

lgbaldoni commented 1 year ago

Hi, I just switched to Wayland on Leap/Plasma and noticed the problem :frowning_face:

Any news?

ouzbirki commented 1 year ago

Making Thunderbird run under XWayland mode makes it work properly. Basically, edit your desktop entry and change Exec line like this: env GDK_BACKEND=x11 thunderbird. Tried many other solutions, like Birdtray and the Minimize on Close extension; none of them worked like charm as systray-x does.

lgbaldoni commented 1 year ago

Would it be possible to reimplement this in Betterbird?

LinAGKar commented 1 year ago

env GDK_BACKEND=x11 thunderbird

Or MOZ_ENABLE_WAYLAND=0, which specifically applies to only Thunderbird and Firefox. I feel like the readme should point to one of those instead of recommending to disable Wayland completely (or as an alternative).

Zahrun commented 1 year ago

Betterbird now has a working systray on linux, included on Wayland https://github.com/Betterbird/thunderbird-patches/issues/111 https://www.betterbird.eu/releasenotes/index.html https://www.betterbird.eu/downloads/index.php https://www.betterbird.eu/donate/index.html

christophehenry commented 1 year ago

If I understand the code correctly, the relevant code is here. It uses internal Mozilla API which, in the present case, cannot be used if I'm not mistaken.

Ximi1970 commented 1 year ago

@ouztheone thank you for the simple workaround. Tested in Ubuntu 23.10 and it worked nicely. Will change the README. I will also have a look at the other distributions. Hopefully they all allow the same workaround. @LinAGKar the MOZ_ENABLE_WAYLAND=0 seems not to work in Ubuntu?

ouzbirki commented 1 year ago

@Ximi1970 I'm using Arch Linux so you can count that too.

tbertels commented 5 months ago

Betterbird now has a working systray on linux, included on Wayland Betterbird/thunderbird-patches#111 https://www.betterbird.eu/releasenotes/index.html https://www.betterbird.eu/downloads/index.php https://www.betterbird.eu/donate/index.html

BTW: Anyone, like me, who wanted Wayland support for this to get Birdtray or some other Thunderbird add-on working should go check out BetterBird. It's a set of patches on top of Thunderbird which include a tray icon that works in both X11 and Wayland.

Betterbird's minimize to tray feature doesn't actually work on Wayland in Wayland mode (with Exec=env MOZ_ENABLE_WAYLAND=1): https://github.com/Betterbird/thunderbird-patches/issues/279 This means that the text will be blurry if you use upscaling.