Archive for the “Ubuntu” Category

HowTo Share Calendars with Thunderbird, Lightning and PHP iCalendar

This article explains how to share calendars using Thunderbird with Lightning extension and PHP iCalendar, also it supposes that you are running Ubuntu.

Installation

  1. Download phpicalendar from http://phpicalendar.net
  2. PHP iCalendar require a webserver running PHP 4.1.2 or later, so install Apache2 with PHP module
  3. $ sudo apt-get install apache2 libapache2-mod-php5

  4. Enable WebDAV module in Apache
  5. $ 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

  1. Untar phpicalendar tarball under /var/www directory
  2. Copy and edit the included configuration sample file
  3. $ sudo cp config.inc-dist.php config.inc.php
    $ sudo chown www-data: config.inc.php
    $ sudo vi config.inc.php

  4. Test application with browser at http://localhost/phpicalendar/index.php

WebDAV Configuration

  1. Create a user and password that will access to the calendars
  2. $ sudo htpasswd -c /var/www/phpicalendar/.webdav_login username
    $ sudo chmod 640 .webdav_login
    $ sudo chown www-data .webdav_login

  3. 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

  1. Open Thunderbird and click on Calendar
  2. Right click in the calendars list and create a New Calendar
  3. Choose On the Network
  4. Click on Next
  5. Select format: iCalencard (ICS)
  6. Insert location: http://localhost/phpicalendar/calendars/TestCalendar.ics
  7. Click on Next
  8. Provide a Calendar name: TestCalendar
  9. Click on Next and Finish
  10. Right click on the calendar that we have just created and click on Publish Calendar…
  11. 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.

How To Split an Audio .flac file using Ubuntu Linux

If you have big .flac audio file which include several CD tracks, sure you are interested to know how to split them and of course we are going to do it in Ubuntu Linux.

This method it use .cue files, which usually comes with the .flac ones.

First of all we need to install the following packages cuetools shntool flac. You can use Synaptic or this command in a terminal:

$ sudo apt-get install cuetools shntool flac

Now you can split the .flac audio file as follows:

$ cuebreakpoints file.cue | shnsplit -o flac file.flac

That’s all.

Now a little bit of theory,
shnsplit is the program used to split tracks, while cuebreakpoints it reads the break-points from file.cue and pipe them to shnsplit.

Spiders on the Web,
Danilo

How To Install Eclipse with PHP Development Tool on Ubuntu 7.10 Gutsy

Lee este articulo en castellano

Eclipse is a well known IDE interface which help programmers to develop their Java applications, but Eclipse is not only for Java programmers, as it can help PHP programmers as well by using the PHP Development Tools (PDT).

While searching on Internet I found several way to install Eclipse and PDT, so here I am going to tell you how I did it on my Ubuntu 7.10 Gutsy with PHP support. As I am a newbie on Eclipse I cannot tell you if it is the best way or that is error free. I only know that it worked for me, or at least Eclipse it started without any error message.

First you have to install the Sun Java Development Kit 5.0 (JDK) and Eclipse from Ubuntu repositories:

$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
$ sudo apt-get install eclipse

Now we have Eclipse installed and working, but there are a couple of problems, most important PDT is not installed as there’s no debian package yet. Second this is an older version, Eclipse 3.2.2 instead of the 3.3.0. I used this approach to assure that everything Eclipse needs is installed.

To add PDT you can use an automated installation of PDT available via the Eclipse Update Manager, but as we want to use the latest version and also keep things simple, you can download the PDT All-in-One package.

Personally I downloaded the Stable Build S20070910-RC1 under the ~/tmp directory, you can choose the release that you prefer. There is no really installation program so these are the commands that I used to install it under my home directory and to start Eclipse.

$ mkdir ~/opt
$ cd ~/opt
$ mv ~/tmp/pdt-all-in-one-incubation-S20070910_RC1-linux-gtk.tar.gz .
$ tar xzvf pdt-all-in-one-incubation-S20070910_RC1-linux-gtk.tar.gz
$ cd eclipse
$./eclipse

Optionally you can change the Gnome Menu link using, System->Preferences->Main Menu application.

Now you can start working with Eclipse and PDT just create a new PHP file or project, and code away.

Spiders on the Web,
Danilo