FIXME VNC sucks. Better to use RDP. https://www.tecmint.com/install-xrdp-on-ubuntu/
FIXME: Port forwarding.
RS20220627
https://microsoft.github.io/AzureTipsAndTricks/blog/tip235.html
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04
- Create inbound port rule for port 5901
sudo apt update && sudo apt upgrade -y
sudo apt-get install -y tightvncserver xfce4-session xfce4-goodies
# The below also asks for the creation of a password.
# Resolution optimized for iPad 12.9 aspect ratio
tightvncserver -geometry 1536x1152
nc localhost 5901 to test
startxfce4 &
Note: Reqiuires a root pw to be set up in iSH:
passwd
Keep the below in a script:
#!/bin/sh
export VM_IP="13.93.XX.YY"
export USER="youruser"
ssh -L 59000:localhost:5901 -C -N -l ${USER} ${VM_IP}
echo -e "#!/bin/sh\n\ncat /dev/location > /dev/null &" > keep_alive.sh && chmod +x ./keep_alive.sh
./keep_alive.sh