From 9ae8a80a4d767d8c8fdc0729b68256e985db3be2 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Mon, 25 Dec 2023 04:59:51 +0000 Subject: [PATCH] Latest --- .../universal/run_after_20-post-install.sh.tmpl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl b/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl index 0b13829b..5361a139 100644 --- a/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl @@ -207,13 +207,7 @@ candyIconTweaks() { configureVNC() { if [ -d /Applications ] && [ -d /System ]; then ### macOS - # Source: https://apple.stackexchange.com/questions/30238/how-to-enable-os-x-screen-sharing-vnc-through-ssh - # To disable, run: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off - # Only enable when computer is not a corporate / work computer - if [ -z "$HEADLESS_INSTALL" ] && [ -z "$SSH_CONNECTION" ]; then - logg info '**macOS Manual Security Permission** Enabling VNC using the VNC_PASSWORD variable which is vncpass when nothing is specified' - sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -allowAccessFor -specifiedUsers -clientopts -setreqperm -reqperm yes -setvnclegacy -vnclegacy yes -setvncpw -vncpw "{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_PASSWORD")) }}{{ includeTemplate "secrets/VNC_PASSWORD" | decrypt | trim }}{{ else }}{{ default "vncpass" (env "VNC_PASSWORD") }}{{ end }}" -restart -agent -privs -all -users "$USER" && logg success 'Finished running the macOS Remote Management kickstart executable' - fi + logg info 'VNC previously setup in prepare step on macOS' else ### Linux ### VNC set-up / configuration