aizquier / typewriter-sounds

An emulator of vintage typewriting sounds for X11.
15 stars 5 forks source link

Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n' #4

Open 9acca9 opened 1 year ago

9acca9 commented 1 year ago

Well, im having this error:

python typewriter_sounds.py             ✔ 
pygame 2.1.2 (SDL 2.0.16, Python 3.10.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
TypeWriter Sounds Emulator. v1.1
type now and enjoy the vintage experience!...
Traceback (most recent call last):
  File "/home/panchines/typewriter-sounds-master/typewriter_sounds.py", line 235, in <module>
    TypeWriterSounds()
  File "/home/panchines/typewriter-sounds-master/typewriter_sounds.py", line 101, in __init__
    self.local_dpy = display.Display()
  File "/home/panchines/.local/lib/python3.10/site-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/home/panchines/.local/lib/python3.10/site-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/home/panchines/.local/lib/python3.10/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'
9acca9 commented 1 year ago

I followed this: https://github.com/asweigart/pyautogui/issues/322#issuecomment-611290992

xhost +SI:localuser:youruserhere

and is really a beauty! Thanks!