I recently setup VNC Viewer both on my Pi (3b+) and my laptop (Ubuntu 16.04 LTS). Using Stretch Lite. Installed lightdm. Using RealVNC. Followed the guide on raspberrypi.org
After I connect to the Pi using VNC it asks for username and password
I have never change the username or password to my pi so I enter the default ones and login is successful but then the VNC Says cannot show Desktop and returns back to the login screen
What to do ?
startx
on the Pi. Due to the way RealVNC works the Desktop wll be small if no screen attached, you need to set default size. See raspberrypi.stackexchange.com/a/94052/8697 or raspberrypi.stackexchange.com/a/93278/8697