Remote control of a classroom

Dear All,

I am a teacher in a school in the UK and I’ve been trying to write a script which will allow me to control a classroom full of Macs. Essentially, I want to be able to perform basic operations such as muting the sound, turning the screen brightness up to full, locking the screens etc. etc.

After a few hours of experimenting, I have the basic chunks of code which all work locally, but I’m having a few problems when it comes to running them on a remote machine while another user is logged in. At the moment, I’m trying to ssh into the remote machine, get a list of the current users using the ‘users’ command and then pipe the output of this into awk to get the username of the pupil. I then use su to get a bash prompt as that user, but running even simple commands such as oascript -e “beep” doesn’t seem to work.

Am I running up a blind alley? If someone could possibly point me in the right direction I’d be incredibly grateful.

Thanks :slight_smile:

Are ‘Remote Apple Events’ enabled in System Preferences under Sharing
on all of the computers?

Matt Neuburg’s book, “AppleScript, The Definitive Guide” covers Remote Events
in detail. This is also a very good resource to have handy.



Many thanks for the reccommendation - it’s on order now!