以前在X11环境下面只需要export了DISPLAY=:0就可以,wayland的需要多加一项 XAUTHORITY
export DISPLAY=:0 export XAUTHORITY=~/.Xauthority
如果还是不行的话尝试下上下面两个环境变量
export WAYLAND_DISPLAY=wayland-0 export XDG_RUNTIME_DIR=/run/user/1000

以前在X11环境下面只需要export了DISPLAY=:0就可以,wayland的需要多加一项 XAUTHORITY
export DISPLAY=:0 export XAUTHORITY=~/.Xauthority
如果还是不行的话尝试下上下面两个环境变量
export WAYLAND_DISPLAY=wayland-0 export XDG_RUNTIME_DIR=/run/user/1000