From 7eb97879a5024316a802ba603ac227d3cfa456e8 Mon Sep 17 00:00:00 2001 From: f-trycua Date: Mon, 2 Feb 2026 13:40:49 -0800 Subject: [PATCH] refactor(lume): enable SSH via System Settings UI instead of Terminal Removes Terminal keyboard typing for SSH setup and uses System Settings UI directly to enable Remote Login. This is more reliable as it avoids issues with fast keyboard typing in Terminal. Changes: - Remove Terminal-based SSH enable (launchctl command) - Remove Terminal-based auto-login setup - Remove Terminal-based keyboard navigation setup - Enable Remote Login via System Settings toggle - Move auto-login and keyboard navigation to post_ssh_commands --- .../Resources/unattended-presets/sequoia.yml | 70 +++++++------------ .../Resources/unattended-presets/tahoe.yml | 70 +++++++------------ 2 files changed, 48 insertions(+), 92 deletions(-) diff --git a/libs/lume/src/Resources/unattended-presets/sequoia.yml b/libs/lume/src/Resources/unattended-presets/sequoia.yml index 22ccb4e3cb..cef271c735 100644 --- a/libs/lume/src/Resources/unattended-presets/sequoia.yml +++ b/libs/lume/src/Resources/unattended-presets/sequoia.yml @@ -195,57 +195,28 @@ boot_commands: - "" - "" - # Open Spotlight with Cmd+Space - - "" - - "" - - # Type "Terminal" to search for Terminal app - - "" - - "" - - # Press Enter to launch Terminal - - "" - - "" - # ============================================ - # 1. Enable SSH (Remote Login) + # Enable full keyboard navigation (required for Tab in System Settings) # ============================================ - # Enable Remote Login (SSH) using launchctl (works without Full Disk Access) - - "" - - "" - - "" - - # Enter the password when prompted - - "" - - "" - - "" - - # ============================================ - # 2. Enable Auto-Login (macOS Ventura+) - # ============================================ - # Use sysadminctl to enable auto-login for the lume user - - "" + - "" + - "" + - "" + - "" - "" - - "" - - # ============================================ - # 3. Enable Full Disk Access for Remote Users - # ============================================ - # This requires navigating System Settings GUI since TCC.db is SIP-protected - - # Enable full keyboard navigation so Tab works on all UI elements + - "" - "" - "" - - "" - - # Close Terminal + - "" - "" - - "" + - "" - # Click on desktop to ensure keyboard focus before Spotlight + # Click on desktop to refocus - "" - "" + # ============================================ + # Enable SSH and Full Disk Access via System Settings + # ============================================ # Open Spotlight and search for System Settings - "" - "" @@ -258,15 +229,21 @@ boot_commands: - "" - "" - # Use keyboard shortcut to focus search field (more reliable than clicking) + # Search for Remote Login settings - "" - "" - - "" + - "" - "" - "" - "" - # Tab to reach the "Allow full disk access" toggle, then Space to toggle + # Enable Remote Login toggle (first toggle on the page) + - "" + - "" + - "" + - "" + + # Enable "Allow full disk access for remote users" toggle (next toggle) - "" - "" - "" @@ -280,8 +257,7 @@ boot_commands: # Setup Complete! # ============================================ # SSH is now enabled - Connect with: ssh lume@ (password: lume) - # Auto-login is enabled - VM will boot directly to desktop - # Full disk access for remote users is enabled via TCC database + # Full disk access for remote users is enabled # Health check to verify setup was successful # This will SSH into the VM to confirm SSH is working @@ -296,6 +272,8 @@ health_check: # Post-setup commands to run via SSH after health check passes # These are more reliable than typing in Terminal via VNC post_ssh_commands: + # Enable auto-login for the lume user + - "sudo sysadminctl -autologin set -userName lume -password lume" # Disable screen saver - "defaults -currentHost write com.apple.screensaver idleTime -int 0" # Disable require password after sleep/screen saver diff --git a/libs/lume/src/Resources/unattended-presets/tahoe.yml b/libs/lume/src/Resources/unattended-presets/tahoe.yml index c82c213bfa..2b5d0da12c 100644 --- a/libs/lume/src/Resources/unattended-presets/tahoe.yml +++ b/libs/lume/src/Resources/unattended-presets/tahoe.yml @@ -206,57 +206,28 @@ boot_commands: - "" - "" - # Open Spotlight with Cmd+Space - - "" - - "" - - # Type "Terminal" to search for Terminal app - - "" - - "" - - # Press Enter to launch Terminal - - "" - - "" - - # ============================================ - # 1. Enable SSH (Remote Login) # ============================================ - # Enable Remote Login (SSH) using launchctl (works without Full Disk Access) - - "" - - "" - - "" - - # Enter the password when prompted - - "" - - "" - - "" - - # ============================================ - # 2. Enable Auto-Login (macOS Ventura+) + # Enable full keyboard navigation (required for Tab in System Settings) # ============================================ - # Use sysadminctl to enable auto-login for the lume user - - "" + - "" + - "" + - "" + - "" - "" - - "" - - # ============================================ - # 3. Enable Full Disk Access for Remote Users - # ============================================ - # This requires navigating System Settings GUI since TCC.db is SIP-protected - - # Enable full keyboard navigation so Tab works on all UI elements + - "" - "" - "" - - "" - - # Close Terminal + - "" - "" - - "" + - "" - # Click on desktop to ensure keyboard focus before Spotlight + # Click on desktop to refocus - "" - "" + # ============================================ + # Enable SSH and Full Disk Access via System Settings + # ============================================ # Open Spotlight and search for System Settings - "" - "" @@ -269,15 +240,21 @@ boot_commands: - "" - "" - # Use keyboard shortcut to focus search field (more reliable than clicking) + # Search for Remote Login settings - "" - "" - - "" + - "" - "" - "" - "" - # Tab to reach the "Allow full disk access" toggle, then Space to toggle + # Enable Remote Login toggle (first toggle on the page) + - "" + - "" + - "" + - "" + + # Enable "Allow full disk access for remote users" toggle (next toggle) - "" - "" - "" @@ -291,8 +268,7 @@ boot_commands: # Setup Complete! # ============================================ # SSH is now enabled - Connect with: ssh lume@ (password: lume) - # Auto-login is enabled - VM will boot directly to desktop - # Full disk access for remote users is enabled via TCC database + # Full disk access for remote users is enabled # Health check to verify setup was successful # This will SSH into the VM to confirm SSH is working @@ -307,6 +283,8 @@ health_check: # Post-setup commands to run via SSH after health check passes # These are more reliable than typing in Terminal via VNC post_ssh_commands: + # Enable auto-login for the lume user + - "sudo sysadminctl -autologin set -userName lume -password lume" # Disable screen saver - "defaults -currentHost write com.apple.screensaver idleTime -int 0" # Disable require password after sleep/screen saver