Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I put my PowerMac at work to sleep so that I can use Wake-on-LAN to do remote work on it. However the office cleaner often touches the keyboard or the mouse button unintentionally. So the question is:

How to disable mouse and keyboard wake up; to just use the power button and wake-on-LAN to wake/sleep instead?

Don't tell me to disconnect mouse and keyboard.

share|improve this question
    
Is there a reason why you need to use wake on LAN to access it? –  jmlumpkin May 6 '11 at 17:07
    
It's an old Powermac (G5) and it's quite loud even at idle. And i don't access it frequently as my Linux box to be always powered on. –  Lamnk May 6 '11 at 20:49
    
Ah, makes sense. Though if its at work, is the noise that much of a concern, when you would wake it up anyways with WoL? –  jmlumpkin May 6 '11 at 21:20
    
Are you ok with solutions that minimize the awake time or do you truly require that the sleeping Mac truly not respond to existing KB and mouse events? –  bmike Apr 22 '12 at 14:40
add comment

1 Answer 1

The solution I can offer is to use Sleepwatcher and add the following to your ~/.wakeup script:

#!/bin/bash

WR=`syslog | grep -i "Wake reason =" | tail -1 | awk '{ print $11 }'`
if [[ "$WR" =~ EHC[0-9] ]]; then
    pmset sleepnow
fi

This won't prevent your Mac from waking via keyboard or mouse. It will however sleep the computer immediately after it is woken via keyboard, mouse, or any other USB device.

share|improve this answer
    
Thanks, will try it next week –  Lamnk May 6 '11 at 21:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.