How to use VNC to connect PYNQ-Ultra96 v2?

When I try to use VNC to connect to the PYNQ-Ultra96 v2, the interface is gray and the following error message appears:
Unable to load a failsafe session
Unable to determine failsafe session name. Possible causes xconfd isn’t running (D-Bus setup problem);environment variable $XDG_CONFIG_DIRS is set incorrectly (must include “/etc”) or xfce4-session is installed incorrectly.
I tried many methods, but none work.

Have you tried x11vnc? Install the packages necessary for your distribution.
Launch the following:

  1. x11vnc
  2. Enter VNC view [enter the ip:port]

Install tightvncserver

sudo apt-get update
sudo apt-get install tightvncserver