Reminders with Ubuntu

There are some things I do daily and being a human I often forget them. I could just set up reminders on my phone but I wanted to do it on my computer. After some research I found a few articles that really helped me out. Here is my setup on Ubuntu.

Install Indicator Remindor.
sudo add-apt-repository ppa:bhdouglass/indicator-remindor
sudo apt-get update
sudo apt-get install indicator-remindor

This thing lets me setup my reminders easy-peasy. It even has an alarm to play mp3s when the notification pops up. I don’t use that though since I don’t want to take a chance of waking up my daughter from a nap or something. However, if I’m in the kitchen getting a glass of water and notification passes by quietly then am I just out of luck? No.

Install Recent Notifications
sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt-get update
sudo apt-get install indicator-notifications

Lastly, if you use Google calendar like me you probably want to be notified about your upcoming events. Ubuntu doesn’t have out of the box support for this so you have to do some setup.

Install Google Calendar Cli
sudo apt-get install git python-pip python-gdata python-dateutil python-gflags python-vobject python-parsedatetime1
sudo pip install google-api-python-client
sudo pip install apiclient urllib3
git clone https://github.com/insanum/gcalcli.git
cd gcalcli
sudo python setup.py install

A few notes about this. I ended up using the –upgrade flag when doing a pip install for google-api-python-client and urllib3. Next when I ran

gcalcli agenda

I got this ERROR: Missing module - cannot import name __version__

After searching some I found that this is an issue in the apiclient library and can be fixed by opening /usr/local/lib/python2.7/dist-packages/apiclient/model.py and commenting out the line

#from apiclient import __version__

Hopefully everything goes smoothly for you after this and then you should have your browser open when you run gcalcli agenda. You’ll need to approve the gcalcli application for your google account. After this you should be able to see your events by running gcalcli agenda once again.

However, we aren’t done yet.

You may not always be logged into google or your oauth session may expire. So you’ll need to enable the calendar API and register an application for gcalcli at https://cloud.google.com/console so that you can be sure to access your agenda’s later down the road.

To do this plugin in the client id and secret from the app you created into the file ~/.gcalclirc

Lastly, how do you get notified about your calendar events? It’s easy. Just setup a cronjob to run the remind command from gcalcli.

crontab -l
# run reminders every 10 minutes which will send-inotify
# when an event actually exists that you need to be reminded about
*/10 * * * * /usr/local/bin/gcalcli remind

Now all that is left is to go remind yourself to do some tasks via Google or in your indicator task bar. Having your events in Google calendar though let’s you propagate out on other devices like your phone so it’s a pretty sweet setup to have Google Calendar integration with Ubuntu notifications. Good luck, and may the odds be never in your favor?

post by K.D. on 06/04/2014