-
Notifications
You must be signed in to change notification settings - Fork 13
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
Removed need for sudo
/root permissions on Linux
#22
Conversation
* If DBus is available, wakepy doesn't need root permissions to work. * Wakelock gets automatically released when the process setting it dies/exits. * `systemctl mask` solution still available as a fallback
Wow that was fast! I'll take a closer look on this in the near future! :) |
Tested behaviour on Ubuntu Unity 22.04 LTS and Linux Mint 21.1 with the GNOME-based Cinnamon desktop. Works flawlessly. |
I accidentally left in a development artefact (I tried to also get the GNOME context manager, didn't work...) that caused there to be up to two nested exceptions (captured in variables `e1` and `e2`).
Which dbus python package did you install for this? I'm planning to test this on Ubuntu, too :) |
@np-8 I used the pre-installed module And if the module should be missing on some distro, my implementation will just fall back to the |
Oh, I see, also on my Ubuntu 22.04 it was installed. It is located at I tested this PR and it works flawlessly. Thanks a ton! I will merge this but I will think a moment before publishing a new version on PyPI. Installing
during the installation process. There are also other dbus alternatives. I wonder if they can be installed more easily, or even better, if I could copy-paste just the part needed for wakepy.. Thanks again, and hello from the neighbor country! (Finland) |
Sorry, I forgot to update the plaintext description of the Linux behaviour when making the PR fohrloop#22 ...
Sorry, I forgot to update the plaintext description of the Linux behaviour when making the PR #22 ...
Added DBus support to wakepy on Linux:
systemctl mask
solution still available as a fallback