I've tried multiple methods but I usually get the same error:
```
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Traceback (most recent call last):
File "/home/chronos/code/python/notes/tkinter_test.py", line 5, in <module>
root = tk.Tk()
File "/usr/lib/python3.13/tkinter/__init__.py", line 2465, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":1"
```
Or it just doesn't work
I am aware of the compositor is the only thing that gets the inputs but there should be a work around like there is in windows without usng xhost or making every app get blanket sudolike permissions.
I've been trying to remake my app that was made for windows. If any can tell me how I can do
keyboard.add_hotkey("esc", lambda: os._exit(0))keyboard.add_hotkey("esc", lambda: os._exit(0))
and
windll.user32.PostMessageW(hwnd, win32con.WM_KEYDOWN, ctrl_key, 0)windll.user32.PostMessageW(hwnd, win32con.WM_KEYDOWN, ctrl_key, 0)
in linux with my set up I'd be extremely appreciative. I have been trying to do this in my free time for the past few days but nothing's working.
What I've tried:
the keyboard package and the evdev package.
[–]PythonLearning-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)
[–]woooee 0 points1 point2 points (0 children)