wakelock icon indicating copy to clipboard operation
wakelock copied to clipboard

Linux support

Open creativecreatorormaybenot opened this issue 3 years ago • 4 comments

Description

The wakelock plugin has added support for web (#40), for macOS (#86), and now also for Windows (#96) over time. The only missing platform at this time is Linux.

This issue tracks the feature request for Linux support (replacement for the general desktop support issue #57).

Attack plan

Wakelock should be all ready for Linux support. All it takes now is a contribution from someone implementing it.

I myself am currently not into Linux and therefore have no direct plans for adding it myself. However, any contributions are welcome!

Considerations

When https://github.com/flutter/flutter/issues/52267 lands on stable, we should consider using that if necessary. Otherwise, we should try to use pigeon. In this process, we could also adjust the other platform implementations to comply with https://github.com/flutter/flutter/issues/52267 or pigeon instead of currently existing workarounds.

Not an expert in linux dev, but maybe dart dbus plugin can be used for it: https://pub.dev/packages/dbus wiith it then, disable (or enable) org.freedesktop.ScreenSaver.Inhibit. (https://stackoverflow.com/questions/31498114/how-to-programmatically-prevent-linux-computer-from-sleeping-or-turning-on-scree).

The org.freedesktop... should work on any DE that implements it (should work on GNOME as well as on KDE, for example), but it need to be checked.

I currently don't have access to a linux machine, so maybe one can try to implement it and check if it work on some major linxu distros.

anyway, great work!

dvirberlo avatar Dec 23 '22 09:12 dvirberlo

any update?

0Franky avatar Mar 05 '23 22:03 0Franky

@0Franky There is an open PR that attempts at adding Linux support (#186). I will try to look at it soon.

In the meantime, you can try checking out that branch manually and using the linux support from that branch.

Looking forward to this as well

Areopagitics avatar Mar 30 '23 01:03 Areopagitics