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?

Seth
  • 59,332
Tebe
  • 271

1 Answers1

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!

edwin
  • 3,829