Unix/Linux Forum: Get Black Screen for 10secs? - Unix/Linux Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Get Black Screen for 10secs? Rate Topic: -----

#1 User is offline   c_d Icon

  • Newbie (User Level: 0/10)
  • Group: Validating
  • Posts: 8
  • Joined: 10-January 09

Posted 25 February 2009 - 04:07 PM

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?
0

#2 User is offline   vibhor_agarwalin Icon

  • User Level: 7/10
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 574
  • Joined: 24-June 05

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.
Vibhor Kumar Agarwal
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Cambridge Plus :: Cambridgeshire Steam Rally :: Touch Sensor IC :: British Motorbike Piston Rings
Unix Man Pages / Linux Man Pages :: HiFi Forum :: A14 Comments :: UNIX/Linux Forum Archives