Giter Club home page Giter Club logo

Comments (8)

alphamarket avatar alphamarket commented on August 19, 2024 1

Hey there... Are you going to do something to fix this issue?

from keep-presence.

shadeep avatar shadeep commented on August 19, 2024 1

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>

See:
https://stackoverflow.com/questions/48833451/no-protocol-specified-when-running-a-sudo-su-app-on-ubuntu-linux

from keep-presence.

YusufMavzer avatar YusufMavzer commented on August 19, 2024

I'm not the one that implemented this but I can create a fix if you want

from keep-presence.

YusufMavzer avatar YusufMavzer commented on August 19, 2024

an update. We'll have to wait for this to be closed
moses-palmer/pynput#331

from keep-presence.

carrot69 avatar carrot69 commented on August 19, 2024

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.

from keep-presence.

austinsr1 avatar austinsr1 commented on August 19, 2024

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.

from keep-presence.

suncoastkid avatar suncoastkid commented on August 19, 2024

Is this project dead? Still seeing this issue open from two year ago and having the same issue with it not working on Wayland.

from keep-presence.

carrot69 avatar carrot69 commented on August 19, 2024

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

from keep-presence.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.