I thought I'd post this because I handlessly failed to get it sorted 1st time, and that ole internet didn't have nice how to for n00bs.
So...
Ubuntu, install thunderbird
sudo apt-get install thunderbird
sudo apt-get install lightning-extension
sudo apt-get install calendar-google-provider
will install thunderbird and the lightning calendar extension.
this guide will get you started with imap http://mail.google.com/support/bin/answer.py?hl=en&answer=77662
NOTE: don't use the "gmail" account type, as this will only set up a POP connection, not IMAP.
This guide http://ubuntuforums.org/showthread.php?t=540330 will get you started with lightning, the crucial paragraph is this: NOTE: ignore the installation instructions, you've done that using apt.
Install both plugins, and restart Thunderbird, you will then be shown, a Calendar in the left pane, this calendar has 3 tabs Agenda, Todo and Calendars. To setup Google Calendar, click on the Calendar tab.
Click on the New Button, in the Calendar Tab, and you will be given a choice, you need to select, On the Network. Click on Next, there is an option for Google Calendar, select this.
In the Text bar under the Google Calendar you will need to enter the Link URL which allows you to write to your Account, you can find this, buy logging into the Google Calendar account you created earlier.
Create a new Calendar, or if you already have a celedar created, click on the down arrow next to the calendar. And click on Share this Calendar.
You will be taken to a new page, where you will need to click on Calendar Details on the top of this page.
Then Select the XML button, next to the Private Address, this will allow you the read/write access to the calendar, if you need read only access, or wish to share calendards with read only access, use the XML button next to the Public Tab.
When you click on the XML button a URL will be displayed (i’ve edited the whole strin below for security reasons) Copy this URL , and paste it into the Thunderbird Text box, then click on Next.
Give the Calendar a name which you will use in Thunderbird to identify this calendar, and choose a colour, this is the colour which will identify your Google Calendar, if you are using multiple calendars. Then CLick on Next and then Finish.
You will then see your calendar listed as available. you should now be able to add an event in either Thunderbird, or the wEb Interface, and both will update to show the events. You can set reminders, repeat events, and all the usual type of Schedule details.