The installation documentation
is somewhat correct for Actually, including the wiki, I count
no less than four guides for handling installation of DAViCal. None of
them are completely right. Scary, no?

Here’s a verified working procedure for installing DAViCal on Debian
GNU/Linux Etch as of this writing. As indicated at the link above,
you’ll need to add a new source for apt. (Feel free to use sudo if it
suites you.)

# echo "deb unstable awm" >> /etc/apt/sources.list<br /># apt-key advanced --keyserver \<br />  --recv-keys CCA377BD77494424B0DB674F8C90347F8F068012<br /># apt-get update<br /># apt-get install davical</pre></div></div>

<p>The above should pull down PostgreSQL, PHP, and the necessary Perl
DBI dependencies. If you’ve never used PostgreSQL before, now isn’t
really the time to learn. Fortunately, the setup script for DAViCal,
with a small change, will do all the work for you.</p>
<p>As a quick overview, PostgreSQL has a concept of database roles.
Each role can have different privileges. There are two roles involved
with DAViCal: <em>davical_dba</em> and <em>davical_app</em>. Both are
created by the script In some DAViCal
documentation, you may see instructions to create database users
manually. Don’t do this. You don’t need to. Also, there is no longer
any such thing as the general user. It’s from an earlier version of
libawl-php, which DAViCal depends on.</p>
<p>First let’s correct</p>
<pre># perl -i -pe 's/template0/template1/g' /usr/share/davical/dba/<br /># su - postgres -c /usr/share/davical/dba/<br /><br />No directory, logging in with HOME=/<br />Supported locales updated.<br />CalDAV functions updated.<br />RRULE functions updated.<br />Database permissions updated.<br />NOTE<br />====<br />*  You will need to edit the PostgreSQL pg_hba.conf to allow the<br />   'davical_dba' database user access to the 'davical' database.<br /><br />*  You will need to edit the PostgreSQL pg_hba.conf to allow the<br />   'davical_app' database user access to the 'davical' database.<br /><br />*  The password for the 'admin' user has been set to '[replaced with per install random passwd]'"<br /><br />Thanks for trying DAViCal!  Check in /usr/share/doc/davical/examples/ for<br />some configuration examples.  For help, visit #davical on<br /></pre>
<p>Additionally, I needed to change the owner of one of the sequences.  I don’t know why.</p>
<pre># su - postgres -c "psql -c 'alter table dav_id_seq owner to davical_dba;'"<br /></pre>
<p>If for some reason that fails, you’d want to run the following to
drop any incompletely populated database and any unnecessary roles:</p>
<pre># su - postgres -c 'psql'<br />postgres=# drop database davical;<br />postgres=# drop role davical_app;<br />postgres=# drop role davical_dba;<br />postgres=# \q<br />#<br /></pre>
<p>Assuming nothing fails, you’ll be given an admin password for you
DAViCal install’s web interface. This is uniquely for your install.
Copy it somewhere. Don’t lose it, or you’ll have to recover it somehow.
Not losing it myself, I didn’t investigate how you’d accomplish that
short of starting over again.</p>
<p>Once has had its way with your PostgreSQL
install, you need to allow the roles specified in the post install text
access to the davical database. There are many ways to handle that,
including some in the various instances of the installation
documentation. I went did the following simply to be different:</p>
<pre># cat /etc/postgresql/8.3/main/pg_hba.conf<br />...<br /># Database administrative login by UNIX sockets<br />local   all         postgres                          ident sameuser<br />local davical davical_app ident davical-app<br />local davical davical_dba ident davical-dba<br />...<br /></pre>
<p>Then I configured mappings for those in pg_ident.conf:</p>
<pre># cat /etc/postgresql/8.3/main/pg_ident.conf<br />...<br />davical-dba www-data davical_dba<br />davical-app www-data davical_app<br /></pre>
<p>Instead, you could simply replace <em>ident</em> in the first file with <em>trust</em> and skip changing the second file altogether.  But, I rather enjoy the way ilustrated above.  <b>You must restart PostgreSQL for changes to pg_*.conf to take effect.</b></p>
<p>After all this, if you noticed I am using PostgreSQL 8.3, which is
not available in Etch, kudos to you. I am using the version from for Etch, mostly for access to CREATE OR REPLACE TRIGGER.</p>
<p>Next it’s time to configure the beast.</p>
<pre># gunzip \<br />  /usr/share/doc/davical/examples/davical-conf.php/example-config.php.gz -c > \<br />  /etc/davical/<br /></pre>
<p>You may wish to change a few things, but it’s unnecessary to get started.</p>
<p>Finally an Apache configuration is necessary. The ones specified in
the installation guides are fine. Everyone has a different flavour, but
I stick my configurations in /etc/apache2/sites-available and run <code>a2ensite</code> to enable.</p>
<pre># Virtual Host def for Debian packaged DAViCal<br /><VirtualHost *:80><br />  DocumentRoot /usr/share/davical/htdocs<br />  ServerName<br />  Alias /images/ /usr/share/davical/htdocs/images/<br />  php_value include_path /usr/share/awl/inc<br />  php_value magic_quotes_gpc 0<br />  php_value register_globals 0<br />  php_value error_reporting "E_ALL & ~E_NOTICE"<br />  php_value default_charset "utf-8"<br /></VirtualHost><br /></pre>
<p>At this point, you ought to restart Apache with <code>apache2ctl graceful</code> and access your new DAViCal URL.  You’ll be asked to login.  The login is <em>admin</em> and the randomly generated password was provided to you earlier during install.  You did write it down, yes?</p>
<p>Once inside, the interface is fairly self explanatory.  (Maybe not, but it isn’t too difficult to figure out.)</p>
<p>If you’re trying to get <a onclick="javascript:pageTracker._trackPageview('/outgoing/');" href="">Chandler</a> working with DAViCal, again, the directions aren’t entirely correct.  First you need to create a new account under <em>File -> Accounts</em>.  Using the <em>WebDAV Sharing</em>
account type, enter your DAViCal information. The last part of the path
is the collection, which can be whatever. As far as I can tell, you
need an account for each collection. (Don’t be fooled by the account
type; Chandler will actually use CalDav if it is supported and running <code>wireshark</code> confirms it.)</p>
<pre>Path: caldav.php/caldav_user_name/home<br />

If you want to push entries to DAViCal from Chandler, right click on a collection in the left pane and select Publish… You should find your newly created account listed. Select it and hit Publish. It ought to work. Afterwards, you can choose to Unpublish… if you so choose. Going back to the DAViCal web interface, you can confirm calendar entries are been propgated successfully.

Being new to Chandler, I don’t know what actually works, other than
publishing. We’ll see. (Now if only Python + GTK didn’t suck so much to

It appears Chandler picked a new collection name while I slept. The default Work now appears three times. That can’t be good.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s