Open YusufMavzer opened 3 years ago
Hey there... Are you going to do something to fix this issue?
I'm not the one that implemented this but I can create a fix if you want
an update. We'll have to wait for this to be closed https://github.com/moses-palmer/pynput/issues/331
Indeed, keep-presence uses pynput who is currently having issues as well with Wayland. Once they fix it, we should be fine!
Anyway, if someone finds a bugfix, please create a PR or tell me and I'll submit the changes.
This might not be ideal, since it requires sudo/root to move the mouse, but evemu-event does work. Example that I found on an ask ubuntu thread: sudo evemu-event /dev/input/event5 --type EV_REL --code REL_X --value 50 sudo evemu-event /dev/input/event5 --type EV_REL --code REL_Y --value 50 sudo evemu-event /dev/input/event5 --type EV_KEY --code BTN_RIGHT --value 1 sudo evemu-event /dev/input/event5 --type EV_KEY --code BTN_RIGHT --value 0
Added the X and Y move commands into the is_user_away: function and its up and going again.
I get the following error when running keep-presence with Wayland on Fedora 37.
Traceback (most recent call last):
File "/snap/keep-presence/96/keep-presence.py", line 6, in <module>
from pynput.mouse import Controller as MouseController
File "/snap/keep-presence/96/lib/python3.6/site-packages/pynput/__init__.py", line 40, in <module>
from . import keyboard
File "/snap/keep-presence/96/lib/python3.6/site-packages/pynput/keyboard/__init__.py", line 31, in <module>
backend = backend(__name__)
File "/snap/keep-presence/96/lib/python3.6/site-packages/pynput/_util/__init__.py", line 82, in backend
if resolutions else '')
ImportError: this platform is not supported: ('failed to acquire X connection: Can\'t connect to display ":0": b\'Authorization required, but no authorization protocol specified\\n\'', DisplayConnectionError(':0', b'Authorization required, but no authorization protocol specified\n'))
Stumbled across this while looking for a solution. Running the following solves the authorization issue:
xhost si:localuser:<user-id>
Is this project dead? Still seeing this issue open from two year ago and having the same issue with it not working on Wayland.
an update. We'll have to wait for this to be closed moses-palmer/pynput#331
@suncoastkid keep-presence uses the pynput library, we have to wait for pynput to fix the problem.
https://pynput.readthedocs.io/en/latest/limitations.html?highlight=wayland#linux
Fedora 34 uses wayland and this one doesn't work on it