Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jhaspell

macrumors newbie
Original poster
Feb 17, 2008
7
0
Hi,

I'm not sure if this is even possible but I figured this was the best place to ask :)

I have a Mac Mini and am currently using it under my TV to stream audio and video to a couple of AV devices (for example Slimdevices Squeezebox).

It currently has no keyboard, mouse or monitor connected - only power and wired ethernet.

Is it possible to write an automator (or similar) script to react to a manual press of the physical power button? I would like to issue a shutdown command to the machine on pressing it.

I know pressing the button for 6 seconds powers off the Mac but I figured that this won't do the machine any good in the long run and it would be better to take it down gracefully.

Thank you for your help.

John
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
I don't think it's possible to catch this event using an Automator or even Apple Script app. I think a distributed notification gets posted when the machine will got to sleep or will shutdown, but that's after the user chooses one of the options when the button gets presses (these notifications could be caught by a Carbon or Cocoa app).

Probably the easiest solution is to enable SSH (if it's not already available) and use that to remotely shutdown the machine from another computer.
 

jhaspell

macrumors newbie
Original poster
Feb 17, 2008
7
0
Thank you for the reply Robbie.

I am trying to avoid having to connect to the machine from elsewhere, as the Mac which is streaming data needs to be turned off / on by people with little or no knowledge of computers.

I am going to have a look at the "Remote Buddy" application. Hopefully this will allow me to add some shutdown commands from my Pronto IR remote control, which can achieve the same result.

John
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.