Changing

            if efam == family and eaddr == address and num == enum:

to

            if efam == family and eaddr == address and (num == enum or
enum == ""):

in get_best_auth() in Xlib/xauth.py appears to be an effective
fix/workaround; this allows an Xauthority entry with a missing display
number to match any display.

Alternatively, and slightly more conservatively, adding:

            if enum == "" and ename not in matches:
                enum = num

before the original line will match the entry only if a display-specific
entry is not also present in the Xauthority file.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1885304

Title:
  Python Xlib applications report 'Can't connect to display ":0": No
  protocol specified' if XAUTH authentication is needed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-xlib/+bug/1885304/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to