Dummy interactive logon session?

DanJ_LRSFC
Contributor II

Is there a way with a script to create a "dummy" interactive logon session on a remote Mac? Similar to what happens when you log in with Screen Sharing but choose to log on as yourself instead of sharing the current user's screen?

Basically I'm trying to get Unity remotely activated on a classroom full of Macs, but it currently has a bug where even if ‑nographics is selected, it requires someone to be logged on to the target Mac in order for activation to succeed.

Thanks,
Dan Jackson (Senior ITServices Technician)
Long Road Sixth Form College
Cambridge, UK.

3 REPLIES 3

davidacland
Honored Contributor II
Honored Contributor II

You can do this with Apple Remote Desktop and the "Send Unix Command" option:

osascript -e 'tell application "System Events" to keystroke "LOGIN_NAME"'; 
osascript -e 'tell application "System Events" to keystroke tab'; 
osascript -e 'tell application "System Events" to delay 0.5'; 
osascript -e 'tell application "System Events" to keystroke "PASSWORDHERE"'; 
osascript -e 'tell application "System Events" to delay 0.5'; 
osascript -e 'tell application "System Events" to keystroke return'

https://www.jamf.com/jamf-nation/discussions/15038/mass-login-in-os-x

DanJ_LRSFC
Contributor II

@davidacland so there's no way to do it in the background, so it doesn't impact the physical screen?

davidacland
Honored Contributor II
Honored Contributor II

The only other thing I can think of is a VNC session, but that would have to be one by one