Skip to content

Instantly share code, notes, and snippets.

@bwv988
Last active June 30, 2022 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwv988/dac22bfdb73bf003edbaedd92d38b6fc to your computer and use it in GitHub Desktop.
Save bwv988/dac22bfdb73bf003edbaedd92d38b6fc to your computer and use it in GitHub Desktop.

Instructions for Azure VM

FIXME VNC sucks. Better to use RDP. https://www.tecmint.com/install-xrdp-on-ubuntu/

FIXME: Port forwarding.

RS20220627

Useful links

https://microsoft.github.io/AzureTipsAndTricks/blog/tip235.html

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04

Steps

  • 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

Test connectivity

nc localhost 5901 to test

Modify .vnc/xstartup to include:

startxfce4 &

Create SSH tunnel on client (iPad via iSH)

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}

Keeping iSH alive in the background by accessing location data:

echo -e "#!/bin/sh\n\ncat /dev/location > /dev/null &" > keep_alive.sh && chmod +x ./keep_alive.sh
./keep_alive.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment