I'm using a Google Compute + Ubuntu 18 VM. I can connect to the command line by SSH, but I cannot get a GUI.
I've tried this tutorial for connecting by VNC, but when I execute "nc (my external IP) 5901", the Linux terminal hangs. So I can install a VNC on Ubuntu, but I cannot connect from another computer.
So then I tried this tutorial for connecting by RDP. But when I try to connect with the Windows Remote Desktop Connection, I receive this error:
connecting to sesman ip 127.0.01 port 3350 sesman connect ok sending login info to session manager, please wait . . .
login failed for display 0
Finally, I tried using PuTTY plus X11. I set up a private and public key, entered the appropriate public key in my Google Compute profile, and entered the appropriate keys in PuTTY. Then I enabled X11 in PuTTY. In the end, I was able to get a Linux terminal in PuTTY. But I could only get individual applications to display, not the whole Ubuntu desktop. For example, if I executed "xclock" in the Linux terminal, I'd see a clock on my Windows desktop. But I couldn't get the entire Ubuntu desktop to display. (I've also tried XFCE and Cinnamon.)
So try as I might, I can't figure out how to get a Linux desktop GUI to display.