LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-03-2005, 04:05 PM   #1
dovkruger
LQ Newbie
 
Registered: Nov 2003
Location: NY area
Distribution: redhat EE3, Fedore Core 4
Posts: 23

Rep: Reputation: 15
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.
 
Old 11-03-2005, 04:27 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to programmatically monitor a process memory usage? thanhvn Programming 14 02-20-2009 01:15 AM
Monitor doesn't wake up at power-on pingu Linux - Hardware 5 04-29-2007 05:51 AM
how to programmatically monitor a process memory usage? thanhvn Linux - Software 1 11-15-2005 08:44 PM
Wake-On-Lan or only closing monitor rayesteq Debian 1 11-29-2004 08:05 PM
Monitor doesn't wake up after stanby and battery monitor problems (tm) Linux - Laptop and Netbook 2 03-23-2004 06:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration