Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Jenkins as a CI server, where I'm SSHing into an iMac running OS X Mountain Lion (10.8.4) to run some UIAutomation integrations tests on an iOS app. The iMac actually sits 10 ft from me (but across a table) so I'm able to see the screen. However, the tests don't wake up the display, so I often can't see them.

Is there a way to wake up the display from the terminal once Jenkins has SSHed in?

So far I have tried using Applescript to press an arrow key, and using the Wake Assist application. I also tried setting the wake schedule to be the current date. Finally, I tried using the caffeinate command: caffeinate -t 300 &. The computer's "Wake for Wi-Fi access" checkbox is enabled.

So far my best workaround is to just set the iMac to stay awake for atleast 3 hours. However, it'd be nice to keep normal sleep behavior, as I hypothesize that the screen waking from sleep would alert me visually that the integration tests are running. It's also significantly cooler :)

share|improve this question
up vote 3 down vote accepted

The Screen Saver is a standalone program which is started and stopped by the system according to the set triggers, such as time, or a hot corner, and appears in the process status list, but only if it's running.

I was able to stop the screensaver by:

killall -1 ScreenSaverEngine

It starts again when I trigger it with a hot corner, and by the normal timer, I just checked.

share|improve this answer
    
Hm.. I get No matching processes belonging to you were found (or a similar message when run with sudo), both on my machine and the iMac. – MaxGabriel Jun 25 '13 at 18:03
    
I'll try listing all processes to see if it's there. – MaxGabriel Jun 25 '13 at 18:03
    
Note that it'll only be there if the screensaver is running. – Hack Saw Jun 26 '13 at 0:04
    
Oh, duh. Thanks! – MaxGabriel Jun 26 '13 at 2:06
    
Thanks for asking about this, I love the idea of waking up the screen to remind me to have a look at it. – Hack Saw Jun 26 '13 at 9:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .