Aug 182007
 

Do not try this. It’s not a good idea. I don’t endorse it.

That said, I have a Google Calendar that I want to view in Evolution (if just for the nice reminders) but I don’t want to make public, and I can’t use the private URL. I need Evolution to authenticate to Google, and download the calendar. If you can use a private URL, there is already a good solution.

To that end, I made a terrible, horrible, no good patch to allow Evolution to authenticate to Google so I can download my calendar. The trick is to pre-auth with Google, get the auth token from the result, and store it in GConf. From there, the patch will make evolution-data-server recognize Google Calendar URLs and send the auth token in a special header.

Before I get to the patch, here are the problems:

  • Seriously, it’s an ugly patch
  • You have to recompile evolution-data-server
  • Adding an auth token to GConf?! What are you, nuts?
  • Evolution may not be able to understand the appointments set by Google’s calendar
  • The calendar only updates every once in a while
  • You can’t edit the calendar in Evolution

Here’s how to make it work:

First authenticate with Google to get your auth token:

curl -D - https://www.google.com/accounts/ClientLogin -d accountType=HOSTED_OR_GOOGLE \
-d Email='username%40domain' -d Passwd='password'  \
-d service=cl -d source=evolution-testing-0.0.0

Replace username with your email username. Replace domain with your email domain — this will usually be gmail.com. Then replace password with your google password.

This will return three lines, the last one will look like this: Auth=DQAAAGgA...dk3fA5N

Then run:

gconftool-2 --type string -s /apps/evolution/calendar/gauth authstring

You’ll need to replace authstring with the 180+ character string returned by the previous command.

You should only have to do the above once. Or whenever the auth string
expires which seems to be very rare, if at all.

Then quit Evolution and kill the data server with this command:

evolution --force-shutdown

Start evolution after applying this patch.

Go to the calendar component and add:

webcal://www.google.com/calendar/ical/username@domain/private/full.ics

as a web calendar. You’ll need to replace username with your email username and domain with your email domain, usually gmail.com. You’ll need to check “Use Secure Connection” and I recommend that you cache the calendar locally.

Happily it works for me until the real solution is available.

 Posted by at 11:44 am

  One Response to “Reading private Google Calendars in Evolution”

  1. does anyone knows if there is any other information about this subject in other languages?

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>