9

I want to take a break from my system after every one hour. How to enable Popups(I mean Pop ups, not notifications). OS: Ubuntu 16.04 LTS, Unity DE

4

3 Answers 3

9

You can add a cron job to run once every hour:

crontab -e

Add this line (if you have xcowsay installed):

0 * * * * env DISPLAY=:0 /usr/games/xcowsay -t 0 "Coffee Break!"

To install xcowsay:

sudo apt update
sudo apt install xcowsay

Screenshot:

enter image description here

4
  • I am a beginner in using crons. I cant understand where to head after installing xcowsay. Where shoud I add the line"0 * * * * env DISPLAY=:0 /usr/games/xcowsay -t 0 "Coffee Break!" "? Also, do I need to enter this command "crantab -e" everytime in order for cron to work? Mar 6, 2018 at 3:37
  • @SiddharthBarhate You only need to run crontab -e when you want to edit your cron jobs. After that they will always automatically run at the times you specify. The line that you are adding should be at the bottom. Have a look at the cronhowto for more information.
    – stumblebee
    Mar 6, 2018 at 3:51
  • the cron jobs are runing after 10 mins, not one hour? Also please edit your answer to crontab -e instead of crantab -e Mar 6, 2018 at 8:33
  • @SiddharthBarhate fixed typo ty. The first field is minutes which is set to "0" in this example. So if you started the cron at 8:50 then it would run at 9:00 (10 minutes later). The next run would be at 10:00 and every hour thereafter.
    – stumblebee
    Mar 6, 2018 at 18:46
1

Also, you may want to consider the package workrave. It can be set to lock the screen after an hour (or any other time period) and suggest exercises.

0

I use and enjoy workrave (in MATE this is included in the Software Boutique, else sudo apt-get install workrave, or Workrave).

It is fairly customisable. You can set up micro-breaks, rest breaks and daily limits, all of which can be edited to your preference, and enabled or disabled depending on your needs. You can also enable or disable the ability to skip a break, and how many times you are allowed to skip, which I find useful if I'm really in the zone or just about to finish a task. There are also helpful exercises you can prompt with each break to help reduce the risk of repetitive strain injury.

Workrave Rest Break settings

I have mine setup as one of the Startup Applications, so I have to make an effort to ignore it.

The only thing I really miss is that it used to have a "reading mode", where the timer would count down even without keyboard strokes or mouse input. This was very useful while doing research or to have consistent breaks throughout the day. As it is, I set the timer slightly lower than I want the work session to be, and that usually accounts for my thinking breaks.

You must log in to answer this question.

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