Archive for the “Linux” 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

3D Effects with Compiz in Ubuntu

Few months ago everybody was staring at some windows and saying “WoW !”.

So… What we should say now with these 3D effects in Ubuntu ?

Spiders on the Web,
Danilo

New Ubuntu version 7.10

Last week the new Ubuntu Ubuntu, Gutsy Gibbon 7.10 went out.

There are some new interesting features:

  • Gnome 2.20
  • 3D Desktop, Compiz Fusion is enabled by default but I think it needs a good graphic card
  • Desktop Search, a deskbar applet is now included in the default configuration. It allows quick access to your common actions, including opening web bookmarks and searches, sending messages to your contacts, and more
  • A wizard to install Firefox’s plugins
  • … and a lot more

Today somebody told me that Linux it’s difficult and is good only for programmers. I replied that this is not true anymore, I saw a demo of what you can do with the 3D desktop that definitely we can say that Linux is good for anyone.

So I suggest you download the CD so you’ll check it out yourself.

Spiders on the Web,
Danilo

How To Generate Random WEP Keys

Lee este articulo en Castellano
Leggi questo articolo in Italiano

When it comes to wireless networking, it is important to use a form of encryption called Wired Equivalent Privacy (WEP), so that only clients that know the “secret key” can connect to the wireless network.

While configuring a WiFi router we have to provide some WEP keys, the best is to generate random keys using our Linux, or any other Unix like OS.

$ dd if=/dev/random bs=1 count=13 2>/dev/null|xxd -ps

You will get something like:

3cafee64845c2617aa9d1b1411

This is a 104-bit key consist of 26 Hex digit, if you need a different key length just set count as follow:

  • 40 bits: count=5
  • 64 bits: count=8
  • 104 bits: count=13
  • 128 bits: count=16
  • 152 bits: count=19
  • 232 bits: count=29
  • 256 bits: count=32

Danilo,
Spiders on the Web

Checking the BIOS date in Linux

Leggi questo articolo in Italiano
Lee este articulo en Castellano

If you want to check the BIOS date without rebooting your PC, here it is a command that you can use in Linux

$ sudo dmidecode | grep -C 3 -i date
BIOS Information
Vendor: Phoenix Technologies, LTD
Version: 6.00 PG
Release Date: 04/20/2004
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 256 kB

Danilo,
Spider on the Web