From 60168d0c0fb919d44ff7f13f9cad06bd4e69d84f Mon Sep 17 00:00:00 2001 From: Bryan Johnson Date: Wed, 10 Jul 2024 09:19:54 -0400 Subject: [PATCH] Query nameservers for public IP (#72) --- src/scripts/enable-vnc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/enable-vnc.sh b/src/scripts/enable-vnc.sh index c9cb66a..d0dd9e2 100644 --- a/src/scripts/enable-vnc.sh +++ b/src/scripts/enable-vnc.sh @@ -15,7 +15,7 @@ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resourc -restart -agent -privs -all printf '\nDone! To Access VNC (SSH jobs only), run the following command to forward the VNC port:' -IP=$(ifconfig en0 | awk '/inet / {print $2}') +IP=$(dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | sed s/\"//g) printf '\nssh -p 54782 %s -L5901:localhost:5900 -N' "$IP" printf '\nThen point your VNC client to localhost:5901 and use username %s and' "$MAC_ORB_VNC_USERNAME" printf '\nthe password set in your MAC_ORB_VNC_PASSWORD project environment variable'