-
Notifications
You must be signed in to change notification settings - Fork 17
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
Issue: darkdetect listener cannot work under sudo #37
Comments
Just tested on Ubuntu 22.04, same steps except for installing darkdetect using |
I took a quick glance on the implemetation of macOS side, not sure why it would fail because it's just interacting with pyobjc. Also, because of issue #33 , I have to fall back to combination of |
Hi. Recently I found that darkdetect listener cannot work under sudo mode. This is how I reproduce:
Environment: macOS 13.5.1 Apple Silicon, Python 3.11
Create a new venv, and install darkdetect by
pip install "darkdetect[macos-listener]"
Test
sample.py
as follows:When running with
python sample.py
, the theme is printed correctly when changing system theme in the settings manually.However, if running with
sudo python sample.py
, the callback never called when switching system theme.There are some cases that I want to launch my application as sudo, and found that darkdetect failed to behave as expected.
Is this a bug related to darkdetect, or related to macos-listener implementation under the hood? Will darkdetect fix this in the future? Thanks.
The text was updated successfully, but these errors were encountered: