Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- linux, python
- Domain
- desktop, documentation
Research direction
The error occurs in aw_watcher_window/xlib.py when connecting to the X11 display. Start by examining the xlib.py module and the get_current_window_linux function in lib.py. Research X11 authorization methods (like xauth) and Wayland compatibility. Check if the issue is specific to Debian/Kali and whether environment variables like DISPLAY or XAUTHORITY need to be set. Testing on a Debian-based system will be necessary to reproduce and fix.
Written by the indexing model from the issue text.
Description
On debian based distros like kali I have a truoble with running tis app. Infinity output:
2026-08-29 19:07:21 [ERROR]: Exception thrown while trying to get active window (aw_watcher_window.main:133)
Traceback (most recent call last):
File "aw_watcher_window/main.py", line 115, in heartbeat_loop
File "aw_watcher_window/lib.py", line 64, in get_current_window
File "aw_watcher_window/lib.py", line 8, in get_current_window_linux
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
File "aw_watcher_window/xlib.py", line 13, in <module>
File "Xlib/display.py", line 89, in __init__
File "Xlib/display.py", line 71, in __init__
File "Xlib/protocol/display.py", line 166, in __init__
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'
2026-08-29 19:07:22 [ERROR]: Exception thrown while trying to get active window (aw_watcher_window.main:133)
Traceback (most recent call last):
File "aw_watcher_window/main.py", line 115, in heartbeat_loop
File "aw_watcher_window/lib.py", line 64, in get_current_window
File "aw_watcher_window/lib.py", line 8, in get_current_window_linux
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller/loader/pyimod02_importers.py", line 419, in exec_module
File "aw_watcher_window/xlib.py", line 13, in <module>
File "Xlib/display.py", line 89, in __init__
File "Xlib/display.py", line 71, in __init__
File "Xlib/protocol/display.py", line 166, in __init__
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'
May be need to make wayland support?
- Dominant language
- Python
- Stars
- 31
- Forks
- 84
- Avg merge
- 11h 45m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ActivityWatch/docs#184 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ActivityWatch/docs#143 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
ActivityWatch/docs#170 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
ActivityWatch/docs#169 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ActivityWatch/docs#136 · 1 comment ·
All issues in ActivityWatch/docs
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100