1

I have a mac mini with users X and Y. The mac mini auto-logins to user X on startup. I often use that mac mini via screen sharing for user Y.

Is it possible to run a command on that mac mini, so that a local (disconnected/headless) sharing session is launched for user Y? This would just sit in the background waiting for someone to run the screen sharing client via user Y.

My goal would be to use that command in launchctl daemon/agent that runs on startup (i.e. on boot, after a system restart) to have user Y start a headless session in the background.

So after a restart, the monitor would show user X logged in (as per the "Automatic login" preference in the "Login options" of "Users & Groups" in "System Preferences". At the same time though, user Y is also logged in (with startup programs restarted etc) and is rendering headless. If I were to run "ps -ef" I would see processes from user Y active and if I use screen sharing to access user Y from my laptop, I would not have to wait for a "login" but rather be met with a desktop of running programs as soon as I enter the password...

3
  • Why not have Y log in automatically and instantly lock the screen. Have X log in when they arrive on the scene and Y runs at boot each time. I’m of course interested if anyone can pull off what you ask or to learn how Apple blocks that.
    – bmike
    Oct 20, 2019 at 14:30
  • I need both users logged in. X is a family member that normally uses that computer (it's on their desk, they are the ones sitting in front of the screen and keyboard). On the other hand Y is a user for myself, I use that machine only remotely and I need to have things running in the background if X restarts the machine.
    – Alexandros
    Oct 20, 2019 at 14:37
  • I understand that entirely, just it’s easier / possible today to implement your session starting first.
    – bmike
    Oct 20, 2019 at 15:01

0

You must log in to answer this question.

Browse other questions tagged .