Ubuntu / Linux news and application reviews.

Google Calendar desktop ubuntu

This post explains how to display Google Calendar on your Desktop using Conky and Gcalcli (a tool you can use to manage Google Calendar via the command line).

If you already have a Conky instance running and want to also display Google Calendar on your desktop using Conky, see this how-to on running multiple Conky instances.

1. Install Gcalcli:
sudo apt-get install gcalcli

Update: in Ubuntu 14.04, gcalcli doesn't work properly because of a bug in parsedatetime. The bug was fixed in a newer version but it wasn't updated in Ubuntu. A work-around is to install the latest parsedatetime via PIP:
sudo apt-get install python-pip
sudo pip install --upgrade parsedatetime

2. Configure Gcalcli

Unfortunately, Gcalcli needs your password in a configuration file in plain text. But then again, even Pidgin does this.

To be able to use Gcalcli, you have to create a configuration file in your home folder where you must add your Google username and password:

gedit ~/.gcalclirc

And paste this:
user: yourusername
pw: yourpassword

Replace yourusername and yourpassword with your Google username and password, then save the file.

3. Install conky and the DejaVu fonts (so that Conky is displayed properly using the settings below)
sudo apt-get install conky ttf-dejavu ttf-dejavu-core ttf-dejavu-extra

4. Configure conky to display Google Calendar on your desktop
gedit ~/.conkyrc

And paste this:
alignment top_right
background no
border_width 0
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=12
gap_x 5
gap_y 60
minimum_size 5 5
net_avg_samples 2
double_buffer yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
text_buffer_size 8096

${execi 300 gcalcli --nc --cals=owner calw 4}

Then save the file and start conky: press ALT + F2 and type: "conky".

5. Set Conky with Google Calendar to autostart

Open Startup application, click "Add" and add a new startup application. Enter "Conky" under the name of the app and for the command enter "conky --pause=50", without the quotes (this will delay the Conky startup by 50 seconds, to avoid issues with it).

Gcalcli can also add events to Google Calendar and a lot of other stuff. See a complete how-to @ MakeTechEasier (this is also where we've found the Conky with Google Calendar on the desktop part).