Skip to content

BUG (maybe Wayland related): Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n' #9

Description

@sohang3112
$ python src/awake.py 
Traceback (most recent call last):
  File "/home/sohangchopra/Programming/Stay-Awake/src/awake.py", line 1, in <module>
    import pyautogui
  File "/home/sohangchopra/.local/lib/python3.13/site-packages/pyautogui/__init__.py", line 246, in <module>
    import mouseinfo
  File "/home/sohangchopra/.local/lib/python3.13/site-packages/mouseinfo/__init__.py", line 223, in <module>
    _display = Display(os.environ['DISPLAY'])
  File "/home/sohangchopra/.local/lib/python3.13/site-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
                   ~~~~~~~~~~~~^^^^^^^^^
  File "/home/sohangchopra/.local/lib/python3.13/site-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sohangchopra/.local/lib/python3.13/site-packages/Xlib/protocol/display.py", line 129, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'

Bug occurred on Fedora 42 linux laptop. Fedora uses Wayland instead of X11, this may be related to Wayland.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions