How To Share Calendars with Thunderbird, Lightning and PHP iCalendar
Published 2008-09-09
This article explains how to share calendars using Thunderbird with Lightning extension and PHP iCalendar, also it supposes that you are running Ubuntu.Installation
- Download phpicalendar from http://sourceforge.net/projects/phpicalendar/
- PHP iCalendar require a webserver running PHP 4.1.2 or later, so install Apache2 with PHP module
$ sudo apt-get install apache2 libapache2-mod-php5
- Enable WebDAV module in Apache
$ sudo a2enmod Module name? dav
- Last command should enable
dav_fs
module as well, check it out with:$ ls -la /etc/apache2/mods-enabled/dav*
PHP iCalendar Configuration
- Untar phpicalendar tarball under
/var/www
directory - Copy and edit the included configuration sample file
$ sudo cp config.inc-dist.php config.inc.php $ sudo chown www-data: config.inc.php $ sudo vi config.inc.php
- Test application with browser at http://localhost/phpicalendar/index.php
WebDAV Configuration
- Create a user and password that will access to the calendars
$ sudo htpasswd -c /var/www/phpicalendar/.webdav_login username $ sudo chmod 640 .webdav_login $ sudo chown www-data .webdav_login
- Setup the
calendars
directory as a WebDAV folder edit/etc/apache2/mods-available/dav_fs.conf
DAVLockDB /var/lock/apache2/DAVLock
#DAVMinTimeout 600
<Location /phpicalendar/calendars/>
Dav On
AuthType Basic
AuthName username
AuthUserFile /var/www/phpicalendar/.webdav_login
<LimitExcept OPTIONS>
Require user username
</LimitExcept>
</Location>
Thunderbird and Lightning
Install the following packages using Synaptic from menu System->Administration->Synaptic Package Manager
- thunderbird
- lightning-extension
Create and Publish a Calendar
- Open Thunderbird and click on Calendar
- Right click in the calendars list and create a New Calendar
- Choose On the Network
- Click on Next
- Select format: iCalencard (ICS)
- Insert location: http://localhost/phpicalendar/calendars/TestCalendar.ics
- Click on Next
- Provide a Calendar name: TestCalendar
- Click on Next and Finish
- Right click on the calendar that we have just created and click on Publish Calendar...
- Insert URL: http://localhost/phpicalendar/calendars/TestCalendar.ics then Close
Thunderbird doesn't provide any feedback, so check on the server that the calendar has been created properly
$ ls -l /var/www/phpicalendar/calendars/
You should see a `TestCalendar.ics` file.
Using Calendars from others PCs
To connect others client PCs to the same calendar, create a new calendar in Thunderbird in the same way as before, but there is no need to publish the calendar this time.
Danilo