https://gist.github.com/tjluoma/70c936b36d099e37ed9bf64c1df8debe
https://www.brunerd.com/blog/2021/08/24/automating-automatic-login-for-macos/
https://gist.github.com/pudquick/b1188a35a47c314e42b6
https://gist.github.com/johndturn/09a5c055e6a56ab61212204607940fa0
https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/
https://gist.github.com/masklinn/a532dfe55bdeab3d60ab8e46ccc38a68
If you’re calling a Bash script from launchctl, and that script writes to your disk, you need to explicitly give Bash “Full Disk Access” permissions. (In System Preferences, Security & Privacy preferences, Privacy tab.) Even if you’re calling the script as superuser, it won’t write to disk without Full Disk Access. (Giving Full Disk Access to a shell is slightly complicated: you need to open /bin in Finder, then drag the shell icon into the right part of the System Preferences window.)
https://openradar.appspot.com/FB16541221