while :; do
  while ! nc -z 10.0.0.1 5900; do
    sleep 1
  done
  exec startx
done
