Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

For the sake of caring about eyes I would like my screen to be blocked e.g. every hour for 5 minutes (or another intervals).
Once I used one programme for doing it, but now I can't recall its name.

Does someone know programmes that can help to get such functionality?

share|improve this question
What do you mean by 'lock'? Do you mean the display goes black and then you have to type your password? Or does it mean just to dim your screen brightness? – edwin Jun 23 '13 at 21:47
both would be good. – Копать_Шо_я_нашел Jun 23 '13 at 21:50
check out "Is there a Pomodoro app available?"… – amc Jun 23 '13 at 23:45

To lock the screen, you can follow the answer to this post.

So you would write a script (in GEdit) containing:

#: filename: lock-script

export DISPLAY=:0.0
gnome-screensaver-command -l

and save it in your home folder (or you could create a new directory for it). If you only one to black out your display (without locking) change the -l switch for -a.

Make your script executable running chmod 744 /home/your-username/lock-script.

Then execute the following

echo '15 * * * * /home/your-username/lock-script' | crontab

Now lock-script will be executed 15 minutes after the start of every hour on every day. (At 01:15 pm, then at 02:15 pm, and so on.)

If you want more information about how to specify the period of time, you should check here.

BTW, for creating the crontab line you could install gnome-schedule which is a GUI frontend for this.

Hope it helps you!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.