Discovered that if you turn on vncserver in ubuntu it doesn’t default to asking for a password and it also defaults to let everyone access it (or at least it did on my installation). This can be fixed by going to System/Preferences/Remote Desktop and checking the box to require a password