Skip to main content
Question

Dummy interactive logon session?

  • January 14, 2020
  • 3 replies
  • 19 views

Forum|alt.badge.img+10

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

davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • January 14, 2020

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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • January 14, 2020

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


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • January 14, 2020

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