LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   programmatically wake up monitor (https://www.linuxquestions.org/questions/programming-9/programmatically-wake-up-monitor-379701/)

dovkruger 11-03-2005 04:05 PM

programmatically wake up monitor
 
I have a remote machine that I ssh into.
The screen is normally asleep, with the screensaver running.
I could disable the screensaver, but that's not the point. I need to wake up the video, and to do that i need to programmatically do the equivalent of pressing a key or moving the mouse.

I actually tried logging in as root and:

echo "foo" >/dev/mouse

but it didn't work

In any case, I assume that something in the keyboard driver calls some low-level kernel function that keeps a timer reset or something, and I would prefer to just call the right magic function.
The system is running redhat EE3, not that I think it matters too much for something like this.

macemoneta 11-03-2005 04:27 PM

Just ask the screensaver to wake up:

xscreensaver-command -deactivate

From the man page:

-deactivate
This tells xscreensaver to pretend that there has just been
user activity. This means that if the screensaver is active
(the screen is blanked), then this command will cause the
screen to un-blank as if there had been keyboard or mouse
activity. If the screen is locked, then the password dialog
will pop up first, as usual.


All times are GMT -5. The time now is 06:58 PM.