I am able to ssh into Google VM using Putty. I have been using Putty for X11 forwarding into other linux systems (not on cloud) and use the xterm and xclock. However, while trying on Google VM I get the error
user$ xterm
xterm: Xt error: Can't open display:
xterm: DISPLAY is not set
When I do
user$ echo $DISPLAY
I get empty space which means display is not set. I did $DISPLAY=localhost.0:0
as well few other options and was able to set the DISPLAY variable accordingly but I still get the error
user$ DISPLAY=localhost:0.0
user$ echo $DISPLAY
localhost:0.0
user$ xterm
xterm: Xt error: Can't open display:
xterm: DISPLAY is not set
Also, for other systems I never have had to set the DISPLAY variable. Not sure why I have to do so here. Please let me know what the problem is.
Thanks in advance for your help