Prompt for macOS Accessibility and Screen Recording at VNC enable time

This commit is contained in:
Viktor Liu
2026-05-17 08:28:40 +02:00
parent 047cc958b5
commit e75948753a
3 changed files with 121 additions and 12 deletions

View File

@@ -10,6 +10,11 @@ import (
func newPlatformVNC() (vncserver.ScreenCapturer, vncserver.InputInjector, bool) {
capturer := vncserver.NewMacPoller()
// Prompt for Screen Recording at server-enable time rather than first
// client-connect. The native prompt is far easier for users to act on
// in the moment they toggled VNC on than later when "the screen looks
// like wallpaper" would otherwise be the only clue.
vncserver.PrimeScreenCapturePermission()
injector, err := vncserver.NewMacInputInjector()
if err != nil {
log.Debugf("VNC: macOS input injector: %v", err)