I was thinking if there is a way that i can go about making my screen go black automatically for about 10seconds, (with a message like "take a break" printed on the screen) and after 10seconds everything comes back to normal....
is there any way that i can do this...???
to further clarify the question...
suppose now the time is 10:00am
i start my "take-a-break.sh" or "take-a-break.o"(yes, c program idea is also welcome) program...
at 10:10:00am the computer screen should go black(or Locked),with a message -"take a 10sec break"(optional) and at 10:10:10am the screen where i was working should come back(or UnLocked) automatically...
again at 10:20:10am the process would repeat , then again at 10:30:20am....and so on...
this is for my eyes...i keep forgetting the i should be taking 10sec break and see into a distance every 10mins for about 10secs to relax my eyes...(everyone else,working on a pc, should also do this...)
any ideas?
Page 1 of 1
Get Black Screen for 10secs?
#2
Posted 03 March 2009 - 10:37 AM
I can help with the shell part of this.
Write a C program which blanks your screen.
Now in your makeblack.sh:
<c_program> &
pid=$!
sleep 10
kill -9 $pid
You have captured the pid of your C program & killed it after 10 secs.
Just run the above in a loop and you are done.
Write a C program which blanks your screen.
Now in your makeblack.sh:
<c_program> &
pid=$!
sleep 10
kill -9 $pid
You have captured the pid of your C program & killed it after 10 secs.
Just run the above in a loop and you are done.
Vibhor Kumar Agarwal
Share this topic:
Page 1 of 1

Help












