Skip to content

Instantly share code, notes, and snippets.

@henri
Created July 5, 2023 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henri/1a0b91a56d25973bcf4c1f20a6eb718f to your computer and use it in GitHub Desktop.
Save henri/1a0b91a56d25973bcf4c1f20a6eb718f to your computer and use it in GitHub Desktop.
ARD on macOS Cheat Sheet
If you are connecting via VNC / ARD client to a macOS system with mutliple GUI sessions.
If the screen saver is enabled on the account and it locks the screen, any subsequent connections will be in
a stuck state, you will not be able to type or even access the screen saver password dialog box. It is like the system
will not recognise any movement.
Provided you have SSH accesss to an admin account on the system and you have no unsaved changes,
you will be able to force logout the GUI enviroment using the command below :
$ sudo launchctl bootout gui/$(id -u <usercode>)
Reconnect with ARD / VNC and you should now spawn a new session.
If you want to remove background sessions this command below is also useful :
$ sudo launchctl bootout user/$(id -u <username>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment