作为最小的示例,以下代码:
from Xlib import xauth
xauth.Xauthority()
提供以下输出:
Xlib.xauth: warning, failed to parse part of xauthority file /home/sam-barr/.Xauthority, aborting all further parsing
Python xlib版本:0.27
xorg-xauth版本:1.1
OS:(arch)linux
对我有用的解决方案是删除我的.Xauthority文件,然后重新启动。