-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux: Use tray_manager instead of system_tray; remove system_tray #1255
Conversation
And use upstream instead of a forked repo (which was stuck on 0.2 and did not contain e.g. leanflutter/tray_manager#38 ) This additionally enables building on Linux again since Tienisto's forked repo used to disable the Linux plugin: Tienisto/tray_manager@b37f5e0
This is a fixup of c734471 which did not re-generate the necessary files
This allows ditching of the unreliable and seemingly less-than-well maintained flutter library' system_tray' and unifies desktop tray handling across platforms. Note: This commit requires bumping of tray_manager from 0.2.0 to at least 0.2.2 in a previous commit and works around issues with newer libayatana-appindicator versions: leanflutter/tray_manager#38
@Nixuge I see your efforts at packaging for the AUR. With this PR (for me locally) I can successfully use LocalSend with a tray icon again. Note however that this is using the generated artifacts ( See #40 I'm not quite sure what to do about segfaulting |
Thanks for your effort! I will test this ASAP |
Superceded by usage of tray_manager on all platforms in a previous commit Also remove superfluous dart:io import (unused since no exit() is performed any more)
3008a33
to
e0beec2
Compare
Splendid, thank you @Tienisto! You've created and maintained a great app, I'm happy to contribute. Pushed with a fix for the CI complaining about unused imports (it was |
LGTM! |
Finally here, will try and switch the -bin aur package to use the deb/targz see if it works |
Those seem to work just fine anyways (see the -git AUR package) unlike the .deb & .tar.gz from the releases tab for some reason (no idea how you're making those @Tienisto?) Anyways if you got rid of that dependency it's probably fixed anyways, thanks for the epic PR. Got a PKGBUILD for deb support ready for when this gets into a release build |
The release binaries are all built on the Github Pipeline: https://github.com/localsend/localsend/blob/main/.github%2Fworkflows%2Frelease.yml |
Aight thanks, did a test build and it seems to work perfectly now with the deb |
Using tray_manager for Linux as well allows ditching of the unreliable and seemingly less-than-well maintained flutter library system_tray and unifies desktop tray handling across platforms.
At the same time, use upstream
tray_manager
instead of a forked repo (which was stuck on 0.2 and did not contain e.g. leanflutter/tray_manager#38 ). This additionally enables building on Linux again since Tienisto's forked repo used to disable the Linux plugin: Tienisto/tray_manager@b37f5e0. This also works around issues with newer libayatana-appindicator versions: leanflutter/tray_manager#38Caveats discussed previously still apply: #404
Mainly:
snap
having incompatibleGLib
: Failure to build on Ubuntu - "undefined reference to `g_time_zone_new_identifier'" leanflutter/tray_manager#30 and On Linux Mint 21 and Ubuntu 22.04 unable to build using libayatana library. undefined reference to `g_time_zone_new_identifier' leanflutter/tray_manager#28.Note that the incompatibility should have existed with both
system_tray
as well astray_manager
, the latter being a slightly more maintained fork (?) but utilizing very similar build macroslibayatana-*
packagesAs for @TheGB0077 saying:
I'm not quite sure what the issue was, but it seems to work okay now. The only thing to keep note of for me was to guard the call to
setToolTip()
since it would throw aMissingPluginException
on Linux, but this was noted in the API docs oftray_manager
.For reference, potentially relevant prior discussions/commits:
Issues?
I have only tested this on an up-to-date Arch Linux system and cannot speak to the viability of
tray_manager
for other (older) distros.It seems that the
AppImage
andFlatpak
distributors as well as Debian-based systems might not be fully compatible with anything recent, but I cannot see how re-enablingtray_manager
on Linux would surface any additional errors that weren't previously being thrown bysystem_tray
.My setup:
With
flutter
installed throughfvm
: