You can use Lightning to get a calendar that's fully integrated with Thunderbird, but what about Google Calendar synchronization? Well, there's an extension called "Provider for Google Calendar", which lets Lightning read and write events to Google Calendar.

For now, the extension doesn't support Google Tasks, but its developer says he's working on it.

Below, I'll explain how to set up both Lightning and "Provider for Google Calendar" to synchronize Google Calendar with Thunderbird (bidirectional sync).

The instructions below have been tested with Thunderbird 10 which is available in the Ubuntu 11.10 Oneiric Ocelot official repositories and Thunderbird 11 (will probably be available in the Ubuntu 11.10 repositories soon; is already available for Ubuntu 12.04).

Then open Thunderbird > Tools > Addons and select "Install Add-on from file" like in the screenshot above, then browse for the extensions you've downloaded above and select to install them. And finally, restart Thunderbird.

When prompted, enter your Google account password. Next, you'll have to enter a name for the calendar, select a color, etc.:

Click "Next" and Thunderbird should start importing all your calendar events. This may take a while and the Thunderbird window may appear to freeze (but it's actually working in the background). In a few minutes (it depends on how many events you had in your calendar), Thunderbird should finish and the calendar you've added should be synchronized (2-way) with Google Calendar.