I have kali pi installed on my pi3
I could not get vncserver to work - i only go a grey screen so i am using x11vnc.
The problem is that it keeps disconnecting after some time (5-10 minutes).
when it happens i cannot reconnect - i get: "The connection was refused by the computer".
i see this message when it crashes
x11vnc *** stack smashing detected ***: x11vnc terminated
what can i do?

i am using x11vnc since i could not use vncserver.
when i was connecting to vncserver i got grey screen with red X.