It's getting more and more serious all the time because of sitting in front of the computer. In order to remind yourself to rest in time, recommend that you use the Crontab Plan task to set up a timed shutdown Ubuntu, as well as the notify-send in a few minutes before the shutdown Timer bubble reminder is about to shut down.
First confirm that Ubuntu has installed and run Crond:
harry@ubuntu:~$ sudo service cron status
Cron start/running, Process 923
We will use Notify-send to send bubbling pop-up prompts to confirm that the installation is:
harry@ubuntu:~$ Notify-send–help
None to install:
harry@ubuntu:~$ sudo apt-get install Libnotify-bin
Then set the cron scheduled task:
harry@ubuntu:~$ sudo crontab-e
When you select an editor, enter:
* * * */sbin/shutdown-h 23:55
* * * Export display=:0.0;su–harry-c "Notify-send-i/usr/share/icons/humanity/emblems/48/emblem-danger.svg, the sky has been Late "It's time to wash and sleep!!" Automatic shutdown in 5 minutes.
* * * * export display=:0.0;su–harry-c "Notify-send-i/usr/share/icons/humanity/emblems/48/emblem-danger.svg, the sky has been Late "It's time to wash and sleep!!" Automatic shutdown in 2 minutes.
Change Harry's username to its own, display specifies the output terminal device, and the bubbling pop-up reminder background icon can be set itself. Reboot Crond after Setup:
sudo service cron restart
PS: If there is an urgent need to cancel the automatic shutdown: sudo shutdown-c. There is also a simple and useful small software gnome-typing-monitor, which can be set on a timer-locked computer screen, reminding you to take a break to work again, set below (Ubuntu 11.04):
The System settings-> hardware-> keyboard-> Typing break Check the lock screen to enforce Typing, setting the lockout interval and duration.
Reprint: http://farlee.info/archives/ubuntu-crontab-set-notice-shutdown.html