Friday, May 23, 2008

Thunderbird on CentOS 5.1

Everyone is using Thunderbird on MS Windows, Ubuntu Linux and Fedora Core Linux. So, why shouldnt Centos 5.1 be able to install?

1. Download Thunderbird 2 from Mozilla ( or other mirros like ( I downloaded thunderbird- to the directory /tmp.

2. Extract the files

3. Open a terminal and login as root to thee directory /opt
su -
cd /opt

4. Copy the extracted forlders to /opt
cp -rf /tmp/thunderbird /opt

5. Install the older library of (5.1 comes with version
yum install compat-libstdc++-33.i386

6. Test the Thunderbird as a normal user

7. Copy the icons to the user wide pixmap
cp thunderbird/icons/mozicon*.xpm /usr/share/pixmaps/

8. When Thunderbird starts, it complains about the mode for /var/spool/mail, as it cannot write to this folder. As root do the following
chmod 01777 /var/spool/mail

Add the application launcher in the panel/menu using the mozicon icon. Only things left is to install other plugins. My first plugins are always the Calendar (lightning) and birthday.


Wednesday, May 21, 2008

Using linux to view network traffic on a port

When we are interested to investigate who/what is connecting to our server, Linux provides some nice tools. Here are some examples with the output.

Tested with CentOS 5.1.

Using tcpdump
# tcpdump -i eth0 tcp port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:16:41.172405 IP > S 1619435837:1619435837(0) win 5840
10:16:41.172433 IP > S 553643372:553643372(0) ack 1619435838 win 5792
10:16:41.172683 IP > . ack 1 win 92
10:16:41.172932 IP > P 1:445(444) ack 1 win 92
10:16:41.172951 IP > . ack 445 win 54
10:16:41.174744 IP > P 1:208(207) ack 445 win 54
10:16:41.174832 IP > F 208:208(0) ack 445 win 54
10:16:41.174996 IP > . ack 208 win 108
10:16:41.177857 IP > F 445:445(0) ack 209 win 108
10:16:41.177866 IP > . ack 446 win 54

Using Tcptrack (GUI)
# tcptrack -i eth0 port 80

Using Wireshark
# tshark tcp port 80
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
0.000000 -> TCP 46538 > http [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1461217 TSER=0 WS=6
0.000027 -> TCP http > 46538 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=609213593 TSER=1461217 WS=7
0.000279 -> TCP 46538 > http [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=1461217 TSER=609213593
0.000285 -> HTTP GET / HTTP/1.1
0.000305 -> TCP http > 46538 [ACK] Seq=1 Ack=445 Win=6912 Len=0 TSV=609213594 TSER=1461217
0.001955 -> HTTP HTTP/1.1 200 OK (text/html)
0.002056 -> TCP http > 46538 [FIN, ACK] Seq=208 Ack=445 Win=6912 Len=0 TSV=609213595 TSER=1461217
0.002212 -> TCP 46538 > http [ACK] Seq=445 Ack=208 Win=6912 Len=0 TSV=1461218 TSER=609213595
0.002593 -> TCP 46538 > http [FIN, ACK] Seq=445 Ack=209 Win=6912 Len=0 TSV=1461218 TSER=609213595
0.002601 -> TCP http > 46538 [ACK] Seq=209 Ack=446 Win=6912 Len=0 TSV=609213596 TSER=1461218

Using nc
For ports that are being used but is receiving data, the data can be displayed using nc.
#nc -l 80

GET / HTTP/1.1
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cache-Control: max-age=0

Using ngrep (from dag repo)
# ngrep -q -t -d any port 80
interface: any
filter: (ip) and ( port 80 )

T 2008/05/21 18:26:53.772736 -> [AP]
GET / HTTP/1.1..Host: Mozilla/5.0 (X11; U; Linux
i686; en-US; rv: Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.
14..Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5..Accept-Language: en-us,en;q=0.5..Acce
pt-Encoding: gzip,deflate..Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7..
Keep-Alive: 300..Connection: keep-alive..Cookie: Cacti=s5kjjkt79vg5kq17kf86

T 2008/05/21 18:26:53.774644 -> [AP]
HTTP/1.1 200 OK..Date: Wed, 21 May 2008 10:26:53 GMT..Server: Apache/2.2.3
(CentOS)..X-Powered-By: PHP/5.1.6..Content-Length: 16..Connection: close..C
ontent-Type: text/html; charset=UTF-8....
Nicholas presents Networking Tools

And the netstat

  • List all open ports
    $ sudo netstat -lpAinet
  • List users of a specific port. Example port 443
    $ sudo fuser -v 443/tcp

Monday, May 19, 2008

How many Linux do I need?

When a person wants to use Linux as a desktop or server, the most common questions will be
  • Which Linux should I use?
  • Why isnt there a policy for a single Linux distro?
These age old questions are asked when there are consistent differences and dependencies in applications, drivers and protocols used between Linux. Have you felt that you needed to learn Linux all over again when encountering another Linux distro. Well, you wont be alone in this. Even application vendors will worry if they need to write different Linux versions for each of their application.

An article from mentioned about the comings of Linux Standard Base (LSB) Desktop Project. What does this mean? Anyone can choose their own Linux desktop and still work with others in the same environment.

In 2008, we have LSB 3.2 that allows portable applications among the Linux distributions.
As a guide to which Linux distribution, refer to only those found at

Following is a list of those already LSB certified. Try to look out for the LSB Certified trademark.
  • LSB 3.1
    • RHEL 5
    • SUSE Linux Enterprise 5
    • Ubuntu 6.06
One last example of what this standard means:
  1. Bitmap images - uses PNG
  2. Compressed photo - uses JPEG
  3. Fonts - uses Freetype2 (2.1.10)
  4. Cryptographic - OpenSSL
  5. X graphics renderer - uses X version 11 release 6.4
  6. Desktop menu directory - uses Desktop Menu specification 1.0

  1. Executable and Linking Format and part of ISO/IEC 23360
  2. Required user and group names include root, bin and daemon
  3. Software installation is in RPM or LSB conforming installer

Will OSS such as MySQL still be free?

MySQL AB provides one of the largest open source software (OSS) in the form of a database manager. Those who are interested in OSS licensing and business model would have found an interesting case study, since MySQL comes in an OSS and closed source version. MySQL business is estimated to be USD$15 Billion and is based in USA and Sweden. Among servers using MySQL are Faceboox, Google, Nokia, YouTube, and China Mobile.

On 26th Feb 08, Sun Microsystems acquired MySQL AB for USD$1 Billion. Sun Microsystems gave the world and kept for itself Star Office. Will this model be the same for MySQL? Going to Sun's website, MySQL can now be seen as one of its enterprise solution product. At MySQL, the logo of Sun can be seen in its banner (merged with MySQL logo).

Some question come to mind after reading all this news and Monty Widenius presentation.

  1. Will the developers of MySQL around the world continue with the main stream development?
  2. Will Sun create closed source extensions, like it does for the other Sun products?
  3. Will there be more value for the community in the acquisition?
  4. Can MySQL start accepting more outside contribution instead of relying on MySQL AB developers? Currently it is very limited on how users can contribute to the code base.
I guess we have to start looking at Postgres database server in case things turn for the worst in MySQL / Sun deal. However, it should reflect what can happen in the Yahoo! / Microsoft deal where this time it is NOT an OSS based business taking over.

Tuesday, May 13, 2008

Installing Calendar Server on CentOS - part 2

Previous issue was that I could not get through the firewall to access With the firewall settled, I can now continue this series of notes.

In the ~/dcs directory issue the command and download Twisted
svn co svn:// Twisted

What is Twisted?
Examples of programs which were written using the Twisted framework are twisted.web (a web server), twisted.mail (a mail server, supporting both SMTP and POP3, as well as relaying), twisted.words (a chat application supporting integration between a variety of IM protocols, like IRC, AOL Instant Messenger's TOC and Perspective Broker, a remote-object protocol native to Twisted), im (an instant messenger which connects to twisted.words) and faucet (a GUI client for the twisted.reality interactive-fiction framework). Twisted can be useful for any network or GUI application written in Python.

Continue with the Calendar Server scripts

cd CalendarServer/

Test this with a web browser pointing to the server with port 8008.
Example URL location


Installing Calendar Server on CentOS - part I

I am interested to have a server to host my calendar using caldav over http on CentOS 5.1 Linux. The advantage is that this calendar can be shared, if I reformat my PC, the calendar will continue to survive. Copying an ics does not allow me to edit it from the server.

Based on the link
Here are my steps:

1. Connect to the CentOS server as user nicholas
ssh nicholas@

2. create the working folder ~/dcs
mkdir dcs
cd dcs

3. Ensure subversion is installed. Get the svn for Calendar Server
svn checkout CalendarServer

4. Install python-kerberos and python-devel
su -c "yum install python-kerberos python-devel"

5. Setup the disk to use extended filesystem
su -c "vi /etc/fstab"

Edit the options to include user_xattr in the filesystem that will hold the calendar.
/dev/hdb1 /mnt/data ext3 user,rw,user_xattr 0 2

6. Add a directory to put dcs data :
su -c "mkdir /mnt/data/dcs-data"
su -c "chown nicholas:nicholas /mnt/data/dcs-data/"

In DCS source directory, copy and edit the developement config file:
cd ~/dcs
cp ./conf/caldavd-test.plist ./conf/caldavd-dev.plist
vi ./conf/caldavd-dev.plist

Look for the string element specifying where to put data :
And change it to point to a directory of your XATTR mounting point :


7. Run the CalendarServer scripts. This will download and place the required scripts at same level as dcs directory.
cd CalendarServer
./run -s

8. Trouble was encountered to download several subversion packages. Therefore I have to download and extract them manually.
cd ../xattr
tar xzvf ez_setup.tar.gz

I am stuck at the will wait till i can find out why I cant download the Twisted.
svn co svn:// Twisted

Monday, May 12, 2008

Thunderbird Troubleshooting

IMAP maximum cached connection error
The Thunderbird email client on Ubuntu 7.10 took some getting use to. Today something had to happen. The IMAP server returned an error on my Thunderbird (email client) with the following Alert popup.

Something must have changed at the mail server over the weekend. Using the Web client, things were all fine, so this may be a Thunderbird and IMAP setting problem. At the client side, do the following to clear it. Originally I had the value 5 for the number of cached connections.

Step 1: Open Thunderbird. Choose Edit ->Account Settings
Step 2: Identify which account having the IMAP Alert problem and choose Server Settings and click on Advanced.
Step 3: In Maximum number of connections to cache from 5 to four. If this value does not work, keep reducing by one.
Step 4: Click OK. A second time OK to accept the changes.
Step 5: Restart Thunderbird to ensure things are reset. However, it still did work without restarting.

The "This body part will be downloaded on demand." message.
When the body of an email says "This body part will be downloaded on demand." and the attachments seem corrupted you cant access the Email.

Possibility 1: You are in offline mode and the downloads have been restricted.
Ensure the View -> Display Attachments Inline is checked.

Possibility 2: The message headers go messed up.
Rebuild the specific folder index table. Rebuilding the .msf file for that folder. Right click on the folder, select properties, general information and then press the "Rebuild Index" button. If that doesn't recover all of the messages its probably due to your folder being corrupted.

See Mozillazine
-- Annual Conference (OOoCon 2008)

The proposal papers for Annual Conference (OOoCon 2008) is open. This conference is being done on the 5th-7th November 08 in Beijing, China and is used by government and non-government to learn about trends and technology of (OOo).

For details of the OOoCon 2008 programmes, you will have to wait till Aug 08. However, papers can be submitted now at cfp2008. This is a first for Asia and I am looking forward to seeing the OOo future in Asia apart from the OOo technical development.

Malaysian government agencies have been moving towards OOo actively the last one year. It will be good if a government representative can be there to share on their experiences. This should raise awareness and adoption of OOo in Malaysia and the surrounding region.


Friday, May 9, 2008

First glimpse of OOo 2.4

What does OOo 2.4 have to offer?

For those who have been migrating from MS Office to (OOo), here is an upgrade that will reduce formatting problems in older MS Office documents. 2.4 adds support for Access 2007 (.accdb) and improves the "find and replace" feature in OOo Writer. The 2.4 may be the last of the 2.x series and next is the 3.x version by end of 2008. I wont go into the debate of weather one should wait for 3.x or not.

Introducing new keyboard shortcuts and the ability to print hidden and place-holder text is going to allow more areas for power users to explore. Keyboard shortcut improvement includes the Ctrl+0 for Text body, Ctrl+1 to Ctrl+5 for the Heading 1 to 5. Ctrl+Shift+0 changes to default.

PDF handling benefits from new export options. This includes ability to use slide names as bookmarks.

OOo promises Impress to allow 3D transition effects in its extensions. Ok, I cant find any extensions for this but I am looking forward to it. Initially this 3D feature will be only available on Linux.

Printing of hidden text in Writer is useful to find all those things that we have been controlling the layout. To do this in OOo 2.4 choose Tools ->Options ->Writer ->Print. Then select Hidden Text.

OOo 2.4 seems promising.

Displaying OOo version
To display the installed version of the along with its build and patches, look at the file versionrc. from the main stream is installed in /opt directory. The file can be found in /opt/openoffice.org2.4/program/versionrc

Here is the content of versionrc
UpdateURL= 2.4 (680m17(Build:9310); $_OS; $_ARCH; BundledLanguages=en-US)

Sunday, May 4, 2008 2.4 working fine

Have been trying OOo 2.4 on Ubuntu 7.10, CentOS 5.1 and MS Win XP. The standard features have been consistent with OOo 2.3 but with faster access to previews and reduced lagging of screen updates in animation. Oh, nested table problems have been reduced. Can't wait to see what other improvements there are.

Learning something new each day!

OOOP-accessories template problem with Photos

OOOP-accessories- template for OOo 2.3 works with OOo 2.4. This provides a large number of gallery cliparts and photos. The template includes world flags and maps (cant find Malaysia), Linux penguin logo, electronic symbols, shapes, vehicles, faces and various signages. Additionally there are also photos of countries and other stuff. Very useful over the basic clipart that comes with default OOo. The cliparts can be viewed in the OOo gallery view and it can be dragged into any OOo document.

In the OOo gallery, the TAB key can be used to access the different functions. Other interesting keyboard short cuts include
  • Ctrl+Shift+Insert is to create a link to the clipart
  • Ctrl+i is to insert the clipart into the document

The template is usually installed as a normal user, therefore the gallery goes into the user's home directory.

In Ubuntu 7.10, this will be in the directory

One problem with this template is that the Photos section does appear in the correct folders and can be previewed in gallery. For example, try double-clicking any of the photos, and a blank is shown. Double click on the blank space again, the preview appears again. This means that it can be previewed but it cannot be dragged into any OOo document.

One solution is to do the following.

  1. Amend each Photo that you want to view. For example to view Photo - fauna.
  2. In the Gallery view, Right click "Photo - Fauna" and choose Properties.
  3. Select Files tab. Click "Find Files"
  4. Choose gallery/clipart/fauna/Photos/Fauna
  5. Click "Add All" -> "Ok"
  6. Right click "Photo - Fauna" and choose "Update".
You can now use the Photo - Fauna part of the gallery. Do the same for other Photos that are of interest. Alternative is to install that template as administrator and make accessible to all users. That is another story for another time.


Blog Archive