1

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?

3
  • 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, 2013 at 21:47
  • both would be good.
    – Tebe
    Jun 23, 2013 at 21:50
  • check out "Is there a Pomodoro app available?" askubuntu.com/questions/158261/…
    – amc
    Jun 23, 2013 at 23:45

1 Answer 1

1

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

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

#!/bin/sh
#: 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!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .