Tuesday, December 30, 2008

Installing OpenOffice.org 3 on Intrepid (1st try)

Finally have the time to do a dry run of OpenOffice.org (OOo) 3.0 on Kubuntu 8.10 (Intrepid). There is the choice of using the OOo main stream or from the Canonical Personal Package Archives (PPA).

OpenOffice.org is a total remake of the popular Office productivity suite in the open source software (OSS) world that is available on Linux and MS Windows.

Installation from OpenOffice.org main stream (works)
Step 1: Download from the openoffice.org (As of today, I have OOo300m9 installed)
Step 2: Extract all of the files.
tar -xvzf /home/nicholas/software/OOo_3.0.0_LinuxIntel_install_en-US_deb.tar.gz

Step 3: Install all of the deb files.
sudo dpkg -i *.deb
sudo dpkg -i desktop-integration/*.deb

Done. Everything works fine but first thing I notice is that it saves in ODF 1.2 format which is not compatible with previous OOo2.x versions. The Extension Manager did not work with either Sun's JRE or OpenJDK's JRE.

FAILED Installation procedure for PPA (currently not working!)
Note: On 3rd Jan 2009, Kubuntu provided the same OOo3 for upgrade in its mainstream. Same results here.
Step 1: Choose Kmenu ->Applications ->Adept
Step 2: Select sources. Here choose the Third-Party Software tab and choose Add..
Enter the source as
deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main


Step 3: Click Close. The update will begin immediately and when completed the software upgrade applet will be lighted. Choose to upgrade all.

Installing back OOo 2.4.1

1. Completely remove OOo3 and the PPA source list.

2. Install the OOo 2.4.1

sudo apt-get install openoffice.org

3. Install other OOo 2.4.1 Desktop specific components (optional)

sudo apt-get install openoffice.org-gnome
OR
sudo apt-get install openoffice.org-kde openoffice.org2-thesaurus-en-us pstoedit kde-icons-crystal crystalcursors xfig ivtools-bin tgif transfig

4. Install additional stuff (optional)

sudo apt-get install libxerces2-java-doc openoffice.org-help-2.4 openoffice.org-hyphenation openoffice.org2-thesaurus openclipart-openoffice.org pstoedit libmyodbc odbc-postgresql libsqliteodbc tdsodbc mdbtools libmysql-java libpg-java openoffice.org-gcj openoffice.org-report-builder openoffice.org-style-industrial openoffice.org-style-hicontrast

Saturday, December 27, 2008

Photos and Gwenview

Introduction
Just tried to view photos from the dolphin file manager. Default of Kubuntu Intrepid is to launch Gwenview 2.1.3 which is rather new to me.

It is a nice basic tool that still uses KDE3. This may explain why the Gwenview plugin did not detect the KDE Image Plugins Interface (KIPI) which is kipi-plugins version 0.1.5-1ubuntu2 at the moment. It still doesnt show the EXIF info of photos. Keyboard short cuts are still not completely incorporated for faster navigations.

The main configuration files are:
  • gwenview.rc
  • gwenviewui.rc
View mode
The photo name and size is displayed on the right sidebar. Other functions are found on the right sidebar to edit the image and to manage file operations such as move and copy photos. I have not found a way to move to next photo without going to the browse mode. The PgUp and PgDn keys did not function as I'd like it to. I need to click on the flimstrip (enabled by choosing the "Thumbnail Bar" button) to allow the right and left arrow keys to move between photos.

The slider bar at the bottom allows a neat quick a zoom feature.

Gwenview in view mode.

Browse mode
Allows quick access to all photos. This includes basic editing features of rotation, mirror, flip, resize and crop.
Gwenview in browse mode.

Gwenview was not attractive enough at first glance but it takes time for one to grow interest in it.

Wednesday, December 17, 2008

How to add Screensavers in KDE4.1

Installing KDE screensaver

KDE 4 in KUbuntu 8.10 is slightly different from KDE3. This example of installing a screen saver called KCometen will help to expose the various method of how KDE 4 works.

Step 1. Download KCometen41.0.3 from http://www.kde-apps.org/content/show.php/KCometen4?content=87586

Step 2. Compile and build the screen saver binaries.

$ apt-get install build-essential kdebase-workspace-dev libqt4-opengl-dev

$ cd /home/nicholas/sources/kcometen4-1.0.3/CMakeFiles

$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local

-- Found Qt-Version 4.4.3 (using /usr/bin/qmake)

-- Found X11: /usr/lib/libX11.so

-- Found Threads: TRUE

-- Found Automoc4: /usr/bin/automoc4

-- Found Perl: /usr/bin/perl

-- Found KDE 4.1 include dir: /usr/include

-- Found KDE 4.1 library dir: /usr/lib

-- Found KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler

-- Found automoc4: /usr/bin/automoc4

-- Found QtOpenGL: /usr/lib/libQtOpenGL.so

-- Found QtOpenGL includes: /usr/include/qt4/QtOpenGL

-- Found KScreenSaver include: /usr/include/kscreensaver.h

-- Configuring done

-- Generating done

-- Build files have been written to: /home/oscc/sources/kcometen4-1.0.3


$ cd ..

$ make

[100%] Built target kcometen4.kss

make[1]: Leaving directory `/home/oscc/sources/kcometen4-1.0.3'

/usr/bin/cmake -E cmake_progress_start /home/oscc/sources/kcometen4-1.0.3/CMakeFiles 0

$ sudo make install

Step 3. Install the screen saver

/usr/bin/cmake -P cmake_install.cmake

-- Install configuration: "Debugfull"

-- Installing: /usr/local/bin/kcometen4.kss

-- Installing: /usr/local/share/apps/kcometen4/pixmaps/lightmap.png

-- Installing: /usr/local/share/apps/kcometen4/pixmaps/particle.png

-- Installing: /usr/local/share/kde4/services/ScreenSavers/kcometen4.desktop

-- Installing: /usr/local/share/man/man1/kcometen4.kss.1

Step 4. Edit the KDE4 configuration to use recently added screen saver. Follow changes to this by rebuilding the KDE4 system configuration cache.

Create the path for all users by adding your local installation prefix to /etc/kde4rc configuration.

$ sudo vi /etc/kde4rc

[Directories]

prefixes=/usr/local


$ sudo kbuildsycoca4

Step 5. Test and use the newly installed screen saver.

Ensure that the System Settings window is closed until your managed to reach this step.

You can test the screen saver by typing the screensaver name.

$ kcometen4.kss --setup

To apply the screensaver, open KDE System Settings, choose Desktop ->Screen Saver, look for Kcometen4.


Sunday, December 14, 2008

Kubuntu 8.10 and Bluetooth

I am working on having the handset bluetooth to pair with my Kubuntu 8.10 (Intrepid) via a bluetooth dongle. Purpose was to transfer files and use the remote control.

Kubuntu have installed the bluetooth stack called bluez by default. Kubuntu currently adviced to use the Gnome file transfer tool and it works. I am having reservations to keep this, cause the last time I did something similiar, nautilus and lots of other Gnome stuff was installed which made the KDE wobbly. E.g. sometimes the Nautilus gets launched instead of Konqueror or Dolphin.

Here are steps I have taken (bluetooth not fully working yet)
Verify that the Bluez stack is functioning
$ hcitool scan
Scanning ...
00:3E:E5:88:88:88 K810i tboxmy


Install the File transfer utility
sudo apt-get install obexftp scmxx

Install the CMAKE and Kubuntu development tools. Download kdebase-workspace-dev (~27Mb), CMAKE (~20Mb) and install.
$ sudo apt-get install kdebase-workspace-dev
$ sudo apt-get install cmake

Download KDEbluetooth4 (not included in Kubuntu Intrepid) from www.kde-aps.org then extract kdebludetooth4 and install.

$ cd kdebluetooth4-0.2/
$ cmake . -DCMAKE_INSTALL_PREFIX=/usr;
$ make
$ sudo make install

===output===
nicholas@tboxmy:~/sources/kdebluetooth4-0.2$ sudo make install
[ 73%] Built target kbluetooth4
[ 86%] Built target kbluetooth4-inputwizard
[100%] Built target kbluetooth4-devicemanager
Install the project...
-- Install configuration: "Debugfull"
-- Installing: /usr/bin/kbluetooth4
-- Installing: /usr/share/applications/kde4/kdebluetooth4.desktop
-- Installing: /usr/bin/kbluetooth4-inputwizard
-- Installing: /usr/bin/kbluetooth4-devicemanager
-- Up-to-date: /usr/share/icons/hicolor/16x16/apps/./kbluetooth4.png
-- Up-to-date: /usr/share/icons/hicolor/32x32/apps/./kbluetooth4.png
-- Up-to-date: /usr/share/icons/hicolor/64x64/apps/./kbluetooth4.png

===end output===

Restart bluetooth
$ sudo /etc/init.d/bluetooth restart

Saturday, December 13, 2008

Kubuntu 8.10 recording sounds

In the midst of configuring Mr Potato to use Martha's own voice, I found that the default Kubuntu 8.10 did not come with any voice recorder. Had to install one of the easier to use recorder called Audacity and its Lame libraries (this is the name of a set of MP3 and other sounds converter library). In Gnome there was the gnome recorder that was a simplified recorder but this did not work in the KDE 4 environment.

Step 1: Install Audacity
sudo apt-get install audacity

Step 2: Install the sound libraries
sudo apt-get install xubuntu-restricted-extras

Audacity was recording great and am saving files to .ogg format. The export feature allows my to save the Artist name, Track title, Album title, Track number, year, Genre, Comments.

A wierd thing, when I save and close the project (.aup), then next time I open it again the recorder gives an error. Need to manually reset back manually the recording device to OSS: /dev/dsp each time the file is opened.

Well, Martha is happy to hear her voice in Mr. Potato

Monday, December 8, 2008

Shopping - What web server are used?

Below is a list of shopping websites in Malaysia and the Web server its hosted on (8 Dec 08). It is in no particular order:
Apache 1 / Cayote:
  1. Beautyholicsanonymous
  2. Cari.com.my
  3. IreneLim
  4. EOE Online
  5. Malaysia Central
  6. Mydin
  7. My1stop

Apache 2:
  1. Annexe Gallery
  2. Everyday
  3. MyPDACafe
  4. Shoppingnsales
  5. Offernutz
  6. Real Mart
  7. Street Directory
  8. TimeOut
  9. The Curve
  10. Xerie
MS IIS 5:
  1. BlueHyppo
  2. Sungei Wang Plaza
  3. Sunway Pyramid
MS IIS 6:
  1. 1 Utama
  2. 121motor
  3. All99.com
  4. All Malaysia
  5. Axcess
  6. Business.com.my
  7. Ikea
  8. KUL
  9. Metrojaya
  10. Mines
  11. Motor Trader
  12. Ultimate Toys
  13. VirtualMalaysia
  14. VisionKL
Zope
  1. Berjaya Times

However, I am using a method to detect web servers that is not guaranteed corect all the time.

Sunday, December 7, 2008

Installing Firefox 3.0.4 source

The problem with Firefox on CentOS 5.2 and Ubuntu 8.10 is that the version displayed wrongly for the About command. It showed 1.9b3 instead of 3.0...

Posting the bug in CentOS, the next day K Singh reported fix.

Posting the bug in Ubuntu, no immediate positive response.

I am running through the source. If anyone also wants to work on this, here are the steps to get the Ubuntu/Debian source.

  1. Download.
    cd ~
    sudo apt-get source firefox
  2. Extract the source.
    cd firefox-3.0-3.0.4+nobinonly
    sudo mkdir mozilla
    sudo chown oscc.oscc mozilla
    tar -xjvf xulbrowser-3.0.4-source.tar.bz2
  3. Compile and run from the mozilla directory

Friday, December 5, 2008

Installing GIMP on Kubuntu 8.10

Need to edit jpeg and other images? Install GIMP along with its tools for the most complete graphical editing solution.

Steps:
sudo apt-get install gimp gimp-help-en libgimp-perl gimp-data-extras

Details of GIMP is in http://gimp.org

Wednesday, November 26, 2008

Garmin GPS

Just got hold of a Garmin Nuvi GPS set. I downloaded the malsing files via usb to Kubuntu 8.10 laptop.

Some software being tested:
  1. gpsbabel - text based and its too difficult to use as there is not much documentation.
  2. josm - Java based and took so long to load. Uses the gpsbabel engine to generate maps.
  3. qlandkarte 0.7.3 (keeps crashing when I load a map and GPX) - Can view the maps on Linux

Kubuntu 8.10 with Apache2, PHP 5 and MySQL5

In order to resume testing and developing web based application, I needed PHP, MySQL and Apache to complete the LAMP stack. Default Kubuntu 8.10 did not include those.

Steps taken.
1. Install Apache2 web server
sudo apt-get install apache2

2. Install PHP5 and enable the PHP5 in Apache
sudo apt-get install php5 php-pear
a2enmod php5

3. Install MySQL server
sudo apt-get install php5-mysql libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql

This requires the setup of MySQL root password.

4. Install the Apache and MySQL documentations
sudo apt-get install apache2-doc mysql-doc-5.0

5. Enabled the user public_html directory
cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/userdir.load
sudo ln -s ../mods-available/userdir.conf

6. Steps to install the training application
  1. Create the database "example.db"

  2. Insert into the database with the script.
    mysql -u root -p example.db < mysqldata.sql

  3. Add the mcrypt tools.
    sudo apt-get install libmcrypt4 php5-mcrypt

  4. Add the MySQL pear libraries.
    sudo pear channel-update pear.php.net
    sudo pear install Auth_HTTP
    sudo pear install pear/MDB2#mysql

  5. Test the application.

Tuesday, November 25, 2008

OSS Certification at OSCC

As part of the OSCC programme to increase OSS skilled officers in the government, an OSS certification inititative is launched. This week we have just completed the 2nd Certified Linux Administrator 01 training and it is their test day. Good to see that those in my class have been making steady effort to improve themselves over the days.

Some found time to make tasty chocolate cakes for the class with well wishes.


Today, they will sit for the practical paper in the morning then the MCQ paper at 3PM. All the best to all of the hard working students. I have seen the effort some have put in, and hopefully all will be smooth sailing.

Still, there is the test C that needs to be done later.

Friday, November 14, 2008

Kubuntu 8.10 Desktop at first glance.

The KMenu
Favourites must have the System Settings menu to configure the Dashboard & Kubuntu until it is just right for daily work.


Desktop

There are Plasmoid widgets by default that I will leave on the desktop for the moment. This means that what I see is called the Dashboard and the Desktop is now a small window that can be moved around. Its neat, cause I can press Ctrl+F12 (or press the Show Dashboard Applet in the bottom panel) to dim all applications and view only the widgets and Desktop. No need to minimised all the application Windows.

By Default applications are launch with a single click, unlike the default Gnome desktop. I've been on Gnome for about 1.5 years now and its taking some getting use to reduce the number of clicks.

Workspace
Default Kubuntu had only 2 workspace and no keyboard shortcut to switch between many workspaces. I can only return to 1st workspace with Ctrl+F1.

1. Right click Pager applet (in the bottom panel) and choose "Configure Desktop", increase to 4 workspace.
2. Click Kmenu ->System Settings ->Keyboard & Mouse ->Keyboard shortcuts. In the "Action" box scroll down to "Switch one desktop to the Right", and click the Global field. Click on the "None" button and enter Ctrl+Alt+Right Arrow. Do the same for the Left direction command. Test the shortcut and click "Apply".

Screen
The screen is sharp and nice, which is why I have always choosen KDE when Looks matters.

Problems are occuring when I plugin the Likom monitor and the projector. It is flickering on those external displays as though its switches the refresh rates. The monitor configuration tool didnt seem to work as it should when I plug-in the external displays.

FIX the projector flickering: Select KMenu
1. System Settings ->Advanced ->Service Manager
2. Turn off "Detecting RANDR (monitor) changes"

Application Windows
Firefox and Thunderbird scrollbars can be improved by Choosing
Kmenu ->System Settings ->Appearance ->Gtk Styles & Fonts
Then Click "Install Scrollbar Fix..." and restart both Firefox and Thunderbird.

Screen Capture
There isnt any program link to the "PrtSc" or Print Screen button. So here are steps taken to apply the screen capture button. Seems KDE 4.1 is broken in this area of keyboard configuration. Killed the khotkeys deamon but its still reading other hotkeys, I am still looking for daemon thats accepting the hotkeys. Things I will try...

1. Update the ksnapshot (mine upgraded to 0.8.1) and other systems updates.
2. Apply the shortcut keys to the Ksnapshot program.
Choose Kmenu ->System Settings. Choose the Advanced tab ->Input Actions


System Processes
To view or terminate system processes, press Ctrl+Esc. I can send kill signals to terminate processes. This also lets me see the amount of RAM being used.

Thursday, November 13, 2008

OLPC and web browsing

The OLPC connection to the wireless network was very stable and it came with Firefox 3.0.1
The yahoo mail pages rendered better than the Kubuntu 8.10 with Firefox 3.0.1. And its so neat! However since there are tonnes of online stuff for kids it also means more fun. But most ofthe games were Flash based and the Gnash that came with OLPC did not have any sound for the flash.

Here are my notes on adding Adobe flash plugins.

1. Go to www.adobe.com and download flash 10 as an RPM package. It should then appear on the /home/olpc directory if I recall correctly. Alternativelyin a terminal type


wget http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-10.0.12.36-release.i386.rpm

2. Open a terminal and login to root

su -l

3. Install the flash

rpm -ih flash-plugin-10.0.12.36-release.i386.rpm

4. This installs flash to standard mozilla directory, which will not work. Create a link in the Activities directory for Firefox.

cd /home/olpc/Activities/Firefox-6.activity
ln -s /usr/lib/mozilla/plugins/libflashplayer.so .

5. Open Firefox and test it on the flash website.

Martha then can play the online alphabet games! yippee!

Sunday, November 9, 2008

FOSS.my 2008 at APIIT

Wow a major FOSS event held at APIIT! This I couldnt miss and I brought along Martha for both days.

FOSS.my ran between 8 to 9 Oct 2008 with a capacity of close to 250 participants. This brought about the much needed awareness for students and fellow developers who have been using OSS but have not had the chance to embrace its aura. Abdullah found it mind blowing, OSS speak. Others were just awed that there was even such a movement and the various technologies available.

I had chance to mingle with FOSSchixs Nuha, Eavay, Liyana and Saro. They are keen to recruit Martha, but I suspect its more to make her into a mascot. They will have to wait a couple more of years before Martha can show her ICT skills. If not as a programmers, maybe a coordinator of OSS projects. See photos of martha at http://flickr.com/photos/lotso

Pia had a session where everyone is invited for a 10 sec pitch on why they should own an OLPC laptop. Martha pulled me down and managed to get an OLPC! Yippee she was so happy and managed to get around quite a bit on her own. Martha could move the cursor, turn the screen and select some of the menus.

Initially I could not get the OLPC wireless to work at home. With a hard reboot, then I saw my WPA network and managed to get connected after the password prompt appeared and I entered the correct password.

Some how the web browser wasnt very easy to locate.

Monday, November 3, 2008

Kubuntu 8.10 on Thinkpad R60

Kubuntu being just released, I tried it on the following system:

Thinkpad R60
Intel 3945
RAM 1G

The result:
KDE 4.1 looked fantastic with minimal applications. The Alt-Tab between applications provided a nice 3D look.

Networking:
The Wireless didnt work as well as the Eth. With the network manager I can add a WEP (Wired equivalent privacy) wireless AP (Access point) but no connection is established. I edited the wireless AP to use WPA (Wi-fi protected access) Personal and it works.
Another matter is that Kubuntu doesnt accept channel 12,13 and 14 (EU and Japan) out of the box. To support these channels, the Ubuntu main website provided instructions to edit the /etc/modprobe.d/options with the following:
==start==
options cfg80211 ieee80211_regdom=EU

==end==

Of course this means that defaults MS Windows XP cant access the device without downloading the WPA patch.

Sample output of iwconfig
==start==

wlan0 IEEE 802.11abg ESSID:"xcitebox"
Mode:Managed Frequency:2.417 GHz Access Point: 00:12:A9:06:58:74
Bit Rate=54 Mb/s Tx-Power=15 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=80/100 Signal level:-65 dBm Noise level=-97 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

==end==

Konqueror:
The browser is far from complete for access to simple web based applications like editing this Blog. Basically, the WYSIWIG editors didnt appear during editing of this blog. Need to install JRE.

First software will be JRE using the command below:

sudo apt-get install sun-java6-plugin sun-java6-jre
Installed Flash player 10 from www.adobe.com for better access to web applications.

Firefox3:
Konqueror didnt render very well. I am installing Firefox as I can import bookmarks from my previous Firefox on Ubuntu (Gnome).

Dual monitor:
Attaching Likom monitor to the laptop, the initial resolution was 640x480. Plugged out the monitor and plugged in then the program to reconfigure the monitor appeared. This can be done manually;

kcmshell4 display

Thunderbird:
Through Adept, I installed the Thunderbird2.0.0.17. Copied the previous profile directory into ~/.mozilla-thunderbird

CODECS:
Installed MP3 codecs with
sudo apt-get install libk3b2-extracodec

Tuesday, October 28, 2008

Rise of Email spam

The Sophos Report on spam in Aug 08 will really make many companies re-look at their anti spam capability, in particular MS Windows based systems.
There are a few employees who attempt to inform or complain in the increase number of spam to the ICT managers, but these are ignored or placed in a low level of importance. Worst, I heard that one MS Exchange based organisation decided that nothing much can be done and employees were to delete spams on their own.

Some of the spams are Agent-HNY Trojan Horse, is disguised as the Penguin Panic arcade game for Apple iPhones, EncPk-CZ Trojan which pretended to be a Microsoft security patch, and the Invo-Zip malware, which masqueraded as a notice of a failed parcel delivery from firms such as UPS.

Spam origins are ranked highest from US, Russia, Turkey and China. If more desktops for critical areas are migrated to Linux, then these desktops can be proctected.

Friday, October 17, 2008

OpenOffice.org 3.0 Released!

Installed Windows OOo 3.0 (OOO300m9) on Ubuntu Linux 7.10 with Wine 1.0 successfully! Downloaded from http://mirror.oscc.org.my for faster download. Already there is a 300m10 within the week.

But the Check for updates button isnt working.

Others look good!

Friday, October 3, 2008

Fresh install of OpenOffice.org

Downloaded and installed OpenOffice.org (OO0) 300m8 on the following platform.

Wine 0.9.46
Sun Java Runtime Environment (JRE) 1.6.0_04
Ubuntu Linux 7.10

Filed bugs:
#94603 because the File ->Open dialog didnt appear till I reboot.
#94604 because the drag and copy did not show a plus sign.
#94605 because the solver tool in Calc doesnt allow slection of multiple cells for "By Changing cells" option.
#94607 because the Impress is not able to play slides with graphics smoothly. See Image below.

#94609 because the Drawing tool didnt allow wrapping of images around 3D objects.

Noticeable changes in OOo3
  1. Start Centre Dialog (appears when OOo is open without any documents).
  2. Native Tables can be added to Impress slides. This includes Table design styles in the Task Menu.
  3. Calc sheet names can now contain non alphanumeric characters like % $ ' .
  4. Calc includes a solver tool that works.
  5. Writer notes feature that is displayed at side of the document with different colours for each user.

Thursday, October 2, 2008

A CMS called Drupal

Content Management Systems (CMS) like Drupal have been popular as it provided a relatively powerful framework for customisation. As Drupal is upgraded, the user customised modules are protected to ensure that it can continue to work. Currently many CMS administrators fear upgrading their CMS as things will break due to extensive customisations.

Drupal version 5.x and 6.x currently supports PHP 5.2. This provides better security and performance. Did I mention performance? Currently due to Drupal modularity, it can be tweak for performance to the max. This depends on the web server, PHP and MySQL settings. By default, non registered visitors use Drupal cached pages which reduces load on Drupal.
See a typo3, Joomla and Drupal and part II comparison.

Drupal provides regular security updates at http://drupal.org/security and through mailing list.

Following are general precautions on installation of CMS, refer to http://tboxmy.blogspot.com/2008/08/cms-called-joomla.html
Additional precautions you can take:

Use only modules that is proven secure. Drupal security problems revolve mostly on poorly written additional modules.

Example of vulnerability:
Plugin Manager - Access Bypass, allowed any user to uninstall and remove modules.
Mail handler - SQL injection, allowed malicious users to gain administrator access.

Fax server on Linux

Installing Hylafax to achieve mass faxing. You need to know what is a fax and how it operates before proceeding here.

Currently the Ubuntu does not detect Lenovo R60's built in modem. So I did not get to actually test if the fax server works. The Thinkwiki site didnt show that R60's modem can work. However 2 years ago, Hylafax could what I tried to set out doing today on a PC with Modem attached.

Hylafax Homepage, Documentations. Listed here are the basics for Hylafax on Ubuntu.

Step 1: Installation
sudo apt-get install hylafax-client hylafax-server libfax-hylafax-client-perl transfig
[OPTIONAL]
sudo apt-get install mgetty-viewfax mgetty psrip libtiff-opengl

Step 2: Configure server
faxsetup

[NOTE] This will result in the file /etc/hylafax/config.ttyS0

Step 3: Auto server
vi /etc/default/hylafax/

Remove comment (#) for RUN_HYLAFAX=1

[TODO] Create links to
/etc/hylafax/getty-link
/etc/hylafax/vgetty-link
/etc/hylafax/egetty-link

Sending faxes
sendfax -f "myname@mydomain.com" -R -r "faxsubject" -c "coverpage comments" -x "Recipient's company" -d "Recipient@1234567" tofax.ps

Standard HylaFAX-compatible file formats are ASCII, TIFF, PostScript, and PDF (in versions newer than 4.1beta2)

Notes:
Modem support is in /var/spool/hylafax/etc/setup.modem
Configuration parameters written to /var/spool/hylafax/etc/setup.cache
Add modems with faxaddmodem command

Wednesday, October 1, 2008

Malaysia moves to OSS - Will it help the economy?

With the OSCC MAMPU success of the MyGOSSCON 2007, lots of government OSS projects have started to be highlighted. This year's MyGOSSCON 08, will be held on 5-6 Nov 2008 at the PICC, Putrajaya.

Economy and jobs for OSS

Will all this move to OSS help the economy? Malaysia is a country surrounded by Singapore, Indonesia and Thailand and depends a lot of its revenue from trades. Malaysia have a modest broadband availability and quality of service with a largely open Internet policy.

In regards to any ICT procurements, the cost can be reduced by;
  1. Preference of alternative/cheaper software
  2. Preference of software that reduces maintenance and security
Currently Malaysia buys too much of software. This leads to:
  1. Lost opportunity of exposure to building enterprise/advanced applications
  2. Preference of foreign systems to local ICT solutions when making procurement decisions
If more OSS is introduced;
  1. Malaysia can be a net exporter of ICT solutions (increase in jobs, more revenue)
  2. Increase in skilled ICT workforce (increase in local and foreign jobs)
  3. Collaborative work on a global level (increase job opportunities)
  4. Nature of OSS is productivity (a wider number of solutions will be available, more busines/jobs)
  5. Increase in home based workers. Freelance, home makers, students, retiree and those with lots of free time can take part in many more business as the barrier entry is lowered. Cheaper software on any platform can be easily accessible for Internet based business.

Tuesday, September 30, 2008

The Large Hadron Collider

The Large Hadron Collider (LHC) is the world's largest and highest-energy particle accelerator complex, intended to collide opposing beams of protons or lead, two of several types of hadrons, at up to 99.99 percent the speed of light.

After the September 2008 system failure (suspected electrical connection), work is expected to reschedule in 2009.

Keep updated at the following sites
  1. LHC Home Page
  2. http://www.interactions.org/LHC/
  3. http://en.wikipedia.org/wiki/LHC@home
  4. Reports on experiments with the LHC

The LHC computing grid uses Berkeley Open Infrastructure for Network Computing (BOINC) where volunteer MS Windows and Linux machines assist in the processing of data. The primary configurations for the computers used on the grid is based on Scientific Linux (OS based on RHEL).

Spam, Scam and Hoaxes

Internet, Email and other forms of Online tools are increasingly getting accessible to all level of users. This includes the students, teachers, housespouse (i thought housewifes may soon be subjective), business person, security guards, cleaners and other professions.

There are some out to take advantage of the new comers, ignorant or busy Internet people with these new technologies. The ideas may be as old as the Ford T but many people still find themselves a victim. As a start, if any thing on the Internet is doubtful or sound too opportunistic there are some web sites that list common issues.

  1. Hoax-Slayer (http://www.hoax-slayer.com )
  2. Scambusters (http://www.scambusters.org )
  3. Sophos (http://www.sophos.com)
There are many more sites, but the list above is a start.

Friday, September 26, 2008

Courseware for OSS usage/licensing

Its a dying time trying to read up all the stuff for this courseware.

Still havent actually written anything yet but am able to stick to the objectives.

  • Know the various sources of OSS

  • Know common OSS licenses

  • Able to list where to find OSS projects

Hope I dont get assigned with more distractors.

CentOS 5.2 x86_64 installed

Installed CentOS 5.2 x86_64 with the Netinstall CDROM via the mirror.oscc.org.my site in under 25mins. Smooth installation and added wine with OOo 3.

It comes with Firefox 3. I sent a minor bug report and the next day it was fixed and is available for next update. That is how fast OSS works.

Wednesday, September 24, 2008

Mail Merge with OOo

OpenOffice 2.0 provides a comprehensive list of Mail Merge features.

What is mail merge?
This is taking a list of details (usually in column and rows format) from a spreadsheet or database and forming a document (Writer) with details from each of the database rows in a user defined format. Namely this is used for letters and labels for a large number of users.

OOo provides several methods to achieve a mail merge.

In the following examples, I take the registered database name is db. The database as a spreadsheet file named db.ods that contains the following column names in a table called friends;

Position, Salutation, Name, Address1, Address2, Postcode, Area, State

A. Data to Text Method - simplified
This provides a list of the records which is usually separated by new lines.
  1. Open a new Writer document.
  2. Press F4, Select the database db, Tables friends
  3. In the database view, select the cell that is in the upper left corner (highlights all) and in the Datasources toolbar, select the button Data to Text.
  4. In the pop-up, Insert data as: Text
  5. Select the fields from the Database Column into the right empty box. Here, you can arrange the position of the fields and add extra text. Click OK when done.
  6. A document with all the data is prepared, save and exit.
B. Multiple records per page
Create a single file containing continuous rows of records.
  1. Open a new Writer document.
  2. Press F4, Select the database db, Tables friends
  3. In the database view, select the column headers that you want into the text document. Rearrange and format as needed. In the last row, select the Insert ->Field ->Other. A pop-up box appears, select Database ->Next Record, set value to TRUE. Click Insert then Close. This should provide the basic set of information to display a single record.
  4. Highlight the rows for the newly create record. Copy and paste as many as required per page.
  5. Click File ->Print.
  6. On the pop-up "Do you want to print a form letter" click Yes.
  7. Select File, Save as Single Document. Click OK.
  8. Enter a filename and click Save.
  9. Open the newly created file to verify the records are correct.
  10. Save the file with the formatted rows as a template for future use.

Tuesday, September 9, 2008

Linux Password Managers.

What happens when there are too many accounts with different passwords? Well, recently I heard a number of people losing their access to their email passwords. This prompted me to write on Password Managers. Here are some points on using password managers.

1. Passwords must be strong. Example is passwords not using the same as the username and using easily recognised words like "password". Password managers can advice if a password is strong.

2. Since all passwords are now centralised, the manager itself must be secured. The master password to launch the application should be well encrypted and strong.

3. The code to the password manager must be clean. This means that various parties have access to audit the source code for compromising functions.

4. Password Managers should be run on own computer to avoid others from accessing a data that is open.

5. Know the Password Manager database filename and back it up. When you need to change computers or reinstall, all the old data can be retrieved.


Below are examples of GNOME applications released under the GNU GPL licence to manage a collection of passwords. To retrieve the password select the key and press c or c to copy to clipboard. This means that you can paste the password into the password field. However, problem is that the clipboard must be cleared else others can dig the password.
Note: I have tested these on a Ubuntu 7.10 Linux.

(A) GPass. Uses Blowfish encryption.
Homepage http://projects.netlab.jp/gpass/

i. How to install? At the prompt;
$ sudo apt-get install gpass

Download size 113K, install version 0.5.0-2

ii. After installation menu, select
Application ->Accessories ->G Password Manager
First time, enter a master password (if you forget this, all is lost).
This saves all password in ~/.gpass/paswords.gps (perm 600)


(B) Revelation. Uses AES encryption.
Homepage http://oss.codepoet.no/revelation/development/

i. How to install? At the prompt;
$ sudo apt-get install revelation
Download size 1565k, install ver 0.4.11-2ubuntu2 . Dependency is pycrypto and crack-lib2 (2.7-19)

ii. After installation menu, select
Application ->Accessories ->Revelation Password Manager
First time, save and enter a master password (if you forget this, all is lost).
User is requested for a filename to saves all password. I used nicholas.revelation (perm 600)

Contains a password generator and checker for weak passwords.

(C) KeePass 1.x is also available on MS Windows. Uses AES and Twofish encryption.
Download http://keepass.info/download.html or for the linux version

i. How to install? At the prompt;
$ sudo apt-get install keepassx
Download size 1036k, installs ver 0.2.2-2.

ii. After installation menu, select
Application ->Accessories ->KeePassX

The database is saved as .kbd

(D) Password Gorilla
A multi platform Tcl/tk tool. The gui is rather poor but you can use this program without worry of people looking over the shoulder as all passwords are hidden.

In 1.4-3, it uses the Blowfish encryption.

i. Installation
sudo apt-get install password-gorilla

ii. Create a password store.


Sunday, August 24, 2008

How to convert AVI to VCD

The VCD format allows most video players to playback movies. My portable camera can only save files to AVI format. Using the ffmpeg and K3B, the AVI can be burned to a VCD format. I am doing this on Ubuntu 7.10 and a CDROM burner that comes with the Lenovo R60.

This how to converted a 32Mb AVI to 286Mb VCD under 5 mins.

Step 1. Translate to MPG, which is a format K3B recognises. I am using the PAL TV system, if it is NTCS, replave with the value ntsc-vcd.

ffmpeg -i jacq_grad20080824.03.avi -target pal-vcd /tmp/jacq20080824.mpg

This gave me resolution of 352x228 and the following output:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Aug 10 2008 11:11:16, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Input #0, avi, from 'jacq_grad20080824.03.avi':
Duration: 00:03:48.1, start: 0.000000, bitrate: 10031 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 20.00 fps(r)
Stream #0.1: Audio: pcm_u8, 11024 Hz, mono, 88 kb/s
PIX_FMT_YUV420P will be used as an intermediate format for rescaling
Output #0, vcd, to '/tmp/jacq20080824.mpg':
Stream #0.0: Video: mpeg1video, yuv420p, 352x288, q=2-31, 1150 kb/s, 25.00 fps(c)
Stream #0.1: Audio: mp2, 44100 Hz, stereo, 224 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
--- end of output---

Step 2. Use K3B 1.0.4 to burn to the VCD format.

In K3B choose File ->New Project ->New Video CD Project.

Drag the MPG file to the VideoCD0, window.
Click on the Burn button.
Select the Volume Descriptor tab, edit the Volume name.
Click Start button.

Tuesday, August 19, 2008

A CMS called Plone

Plone is a content management system using Zope application server. Just like any other popular application, it is prone to hacker attack. There is lesser exploits compared to PHP based CMS,

Example of pre Plone 3.1 security issue is the
Cross Site Request Forging (CSRF) security vulnerability where CSRF attacks work against people with a valid session on a Plone site: an attacker can — by tricking them (or their browser) to make an HTTP request to the site — use their active session and change security sensitive settings such as the users email address.

Following are general precautions on installation of CMS, refer to http://tboxmy.blogspot.com/2008/08/cms-called-joomla.html
Additional precautions you can take:
  1. Keep Python updated.
Examples of vulnerability:
Password reset vulnerability, Plone tools did not have proper security checks for its password reset method, allowing anonymous users to reset any users password through the web. (affects pre 2.5)
plone-group-spoofing, Plone could allow a remote attacker to spoof certain information, caused by an unspecified vulnerability in member registration. If anonymous users can register as a member, a remote attacker could exploit this vulnerability and falsely register as a group. (Affects 2.5.1)
Plone CMS cookie places a base64 encoded form of the username and password in the __ac cookie for all user accounts, which makes it easier for remote attackers to obtain access by sniffing the network. (Affect pre 2.5)

Monday, August 18, 2008

A CMS called Joomla

Joomla! is a widely used content management system using PHP and its frameworks. However due to its large user base, hackers have been attracted like bees to honey.

Example of pre Joomla! 1.5.6 security issue is the
Joomla "token" Password Change Vulnerability where the admin password could be reset easily. Users can then install the Joomla explorer component, and upload malicious scripts.

Following are some precautions on installation of Joomla!

  1. Patch the OS and its other software
    1. Open only needed ports (HTTP, HTTPS)
    2. Patch the software
    3. Configure the software in a secure manner
  2. Verify that Joomla! is from the official site http://www.joomla.org
  3. During installation - Do not use the default MySQL tables prefix as jos_
  4. Change the default administrator name (default is admin)
  5. Remove all files as instructed by Joomla! And other unneeded files or directories
  6. Ensure files and directories have the proper permissions. Below are for Linux based systems.
    1. PHP files: 644
    2. Config files: 666
    3. Other folders: 755
  7. Password protect sensitive directories with .htaccess
  8. Move the configuration.php file to outside of the web directory if possible. Make it non-writable.
  9. Use a search engine friendly (SEF) URLs
    1. The Google inurl: command can be used to search for a vulnerable exploit. Use Artio, SH404SEF or another SEF component to re-write your URLs. This will prevent hackers from finding the exploits.

  10. Establish a security plan and ensure the relevant parties know about it.
  11. Remove unused extensions and themes. Existing extensions and themes should have their version removed from the end user view.
  12. Subscribe to Joomla! and the extensions/themes sites for continuous updates. Additional sites that can help with updates:
    1. http://joomla-wiki.de/doku.php?id=howto_s:security:checklist
    2. http://docs.joomla.org/Joomla_Administrators_Security_Checklist
  13. Subscribe to security sites such as http://www.ictsecurity.gov.my/
  14. Carryout routine backup of Joomla! Site and its database.
Using Apache Benchmarking tools
One good reason to use Apache web server is the availability of a benchmarking tool. There are some constrains that you should know in using this data. Read the documentations. Install Apache and execute as below:
ab -n7500 -c100 http://server.com

Where
-n option is the number of request for benchmark
-c is the number of concurrent page request

===========
Document Path: /
Document Length: 36649 bytes

Concurrency Level: 100
Time taken for tests: 183.819035 seconds
Complete requests: 500
Failed requests: 383
(Connect: 0, Length: 383, Exceptions: 0)
Write errors: 0
Total transferred: 6472586 bytes
HTML transferred: 6260026 bytes
Requests per second: 2.72 [#/sec] (mean)
Time per request: 36763.806 [ms] (mean)
Time per request: 367.638 [ms] (mean, across all concurrent requests)
Transfer rate: 34.38 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1446 4324.4 0 21000
Processing: 47 23707 49002.2 1897 175812
Waiting: 47 21936 45081.7 1897 173650
Total: 47 25153 49793.2 2214 183816

Percentage of the requests served within a certain time (ms)
50% 2214
66% 6756
75% 10461
80% 27527
90% 132227
95% 151803
98% 175812
99% 181539
100% 183816 (longest request)
=== END ====

Other references:
For discussion on application security see https://nvd.nist.gov/cwe.cfm#NVD-CWE-DesignError.

My advice to those considering other CMS is this;
All CMS will have their weak points. However Joomla! have thus far been prompt with security notices and updates. Hackers tend to crawl the webs on Friday to Sundays, when systems are unattended. As the care taker of the Joomla! you need to be proactive, it goes the same for any other CMS. Finally, Joomla! is easy to use for end-users and provides lots of features for beautifications.

Wednesday, July 16, 2008

Portable OpenOffice.org

OpenOffice.org flexibility is in the hands of creative users. One example is the installation of OpenOffice.org on a portable device such as a USB thumbdrive.

The OOo 2.4.1 and OOo 3 (beta) can be downloaded from portableapps.com

Thursday, July 10, 2008

Lightning can now edit Task

Just updated Lightning for Thunderbird to version 0.9pre build 2008070918 on Ubuntu 7.10.

Before this, the task can't be edited even if I choose the modify button. Now just double click and i can edit the task. That is what OSS is about, building stuff.

In the calendar, when I double click on a date to create a new event,
the date was always set to today. Now, it sets to the date I double clicked.

Things are looking good!

--

Sunday, June 29, 2008

My list of Linux commands

Listing of Linux commands.

Hardware related
dmidecode = display computer hardware information. E.g. dmidecode -s bios-version
ifconfig = display and configure the network interface. E.g. ifconfig -s eth1
lshw = display hardware
lspci = display the PCI buses in the computer. E.g. lspci -tv
xrandr = display and configure the available displays (output) connected to the computer.

File system
find = search in specified directory for files.
locate= search for files in the system as index by the locatedb database.

-

Thursday, June 26, 2008

R60 and wireless

The default Centos 5.1 does not detect the wireless on the Thinkpad R60. It seems to detect perfectly well using Ubuntu 7.10.

Go to CentOS page and install the RPMForge plugin.
yum install dkms-ipw3945
lsmod |grep ipw

Done..the wireless card is detected but still cant seem to get the wireless network. After some more digging, found that the ipw3945 project has been deprecated and superseded by Iwlwifi at http://intellinuxwireless.org

Below are notes to try, but I have yet to find the apps that is talk to the wifi daemon that connects to the wireless network.

The ATRpms repository contains Iwlwifi. Plugin to the wired network. Edit the repo file with
[atrpms]
name=EL $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=1
exclude=*kmdl*i586*
includepkgs=*iwlwifi* *mac80211*

Since gpgcheck is enabled, run the command
rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

Install the drivers
yum install iwlwifi iwlwifi-kmdl-`uname -r`

Friday, June 20, 2008

Cases on why we need to be open sourced

Listed here will be cases that can bring back reasons to why we need to be open sourced in many cases.

  • Klien from AT&T - 2007 case on findings of the NSA, USA using the telco line to tap into calls. See "Spying on the home front".
  • Online Voting - such software must require that no funny stuff happens in the background and exploits can be exposed soonest for a resolution.

Viewing the network

The Nessus tool provides information on your network. This means installing a Nessusd server, then data can be continuously collected. Using a Nessus client, the information can then be made into more manageable form.

After installing Nessus

Get the updates of plugins from nessus (http://www.nessus.org/register)
Check your email for the registration code (Example XXXX-11A0-B9A4-A2DD-xxxx)

On the Linux:
sudo /usr/bin/nessus-fetch --register

Wednesday, June 18, 2008

Problems with FTP

Traditionally, electronic files such as scripts, graphics, documents and spreadsheet was transfered between computers with FTP (File Transfer Protocol). The files could be placed in public places for anyone to access with a login name or as anonymous.

However, the alternative to FTP is sFTP (secure File Transfer Protocol). What is the problem with FTP? Why stop using FTP?
  1. FTP sends the login username and password across the network as clear text.
  2. Typical network firewall needs to be altered to open up min 2 ports for FTP.
  3. FTP communication talks too much. A typical connection goes like this, you contact the server, do handshake, you the get a banner, you then send your name to the server and wait for the server to acknowledge. Then you send your password (in plain clear view for everyone to see) and wait for the server to acknowledge, then you send the type of inquiry (how you want the server to respond). This isnt even anywhere near the actual transfer of the file.
  4. FTP does synchronous communications.
  5. Complex firewall configuration for FTP servers and FTP clients. FTP servers prefer active transfer while opening inbound port 21, outbound port 22. FTP client firewalls prefer passive transfer while opening outbound from any port to port 21, inbound any port to any permitted (ephemeral) port.

sFTP is a completly different protocol (method) of network file transfer.

Monday, June 16, 2008

Multiple X servers - Xephyr and Xnest

To run several X servers that are different, I can switch to other virtual screens (F7-F12) or use an X server tool like Xephyr and Xnest. Xephyr is considerably newer than the well known Xnest.

Using Xnest
(On CentOS 5.1)
yum install xorg-x11-server-Xnest
Xnest -audit 0 -name Xnest :1 & export DISPLAY=:1


Using Xephyr
(on Ubuntu 7.10)
sudo apt-get install xserver-xephyr
Xephyr -ac -screen 1024x768 -reset :1 & export DISPLAY=:1

Running X on the X server
Test X applications like xterm and xeyes.

xterm
xeyes

If there is a need to send an application via the chroot/server use SSH. Example below is to start and xterm on the X server

ssh -XfC -c blowfish nicholas@nicholas-server.lan xterm


If you dont understand stuff here, dont worry. It means you need to move on to other stuffs.

Installing KDE on Ubuntu (Kubuntu)

Ubuntu 7.10 (Gutsy) by default installs the GNOME desktop (2.20.0). To install the KDE desktop (reasons are many) many more applications can then be accessed by the Linux system. This at the same time make the Ubuntu transform into Kubuntu!

Simple installation
  1. Connect to the Internet
  2. Run the command
    • sudo aptitude update && sudo aptitude install kubuntu-desktop
  3. Reboot the system. At the bottom left of the login swcreen change the login option to KDE.
  4. Configuration of the default desktop can be done by editing the file /etc/X11/default-display-manager to either KDE or GNOME
    1. /usr/bin/kdm
    2. /usr/bin/gdm
  5. To remove KDE, if you found that it was a big mistake be glad that you used aptitude. Run command
    • sudo aptitude remove kubuntu-desktop
Advanced is to install KDE4
  1. Edit sources.list to include the KDE4 resources
    • deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu gutsy main
  2. Update aptitude
    • sudo aptitude update
  3. Install KDE4
    • sudo aptitude remove kdelibs5 kde4base-data kde4libs-data
    • sudo aptitude install kde4-core
  4. Reboot, at the login screen select the option for KDE 4.

Friday, June 13, 2008

CentOS kernel

The Linux kernel can be reconfigured directly or through the use of modules.

I found the following link useful for CentOS;

1. http://wiki.centos.org/HowTos/BuildingKernelModules

2. I need to build a custom kernel

Thursday, June 12, 2008

OSS Seminar 08 - Miri

The OSS Seminar on 9th Jun 08 really was an opener for most of the participants from Sabah, Sarawak and Labuan Public Sector.

See OSCC MAMPU website for the details.
Apart from presenting a paper on Building OSS Competency, I am mainly taking care of the AV. I'd like to point out an instance where the overhead projector could only flicker the Linux screen intermittent. The video projector model was Sanyo XtraX and was mounted on the ceiling as shown below.

After changing over 2 different VGA cables and checking the connections, nothing improved. Some put it to the Linux being the problem, as other functions were said to have ran smoothly. The AV man finally came and brought a VGA switch with built-in booster, this managed to put the display on the large screen. When another two more projectors were used with a splitter, there were lines scrolling vertically. This was for the projector screens at the sides. This showed that there is not enough power supplied to the projectors.

Wednesday, June 11, 2008

Mobile phone tools

Listing
  1. Wammu
  2. Mobile Media Converter

Wammu
Wammu is a tool to connect with mobile phones and uses Gammu and Phyton. Phones that support open standards like OBEX and IrMC can be easily accessed by OSS tools like Gammu. For a list of phones supported by Gammu see Chihar.com.

Lets install Wammu!
Installation of Wammu takes about about 15.1Mb disk space. Current version for Ubuntu 7.10 is 0.22-1. Those who are using IMAP server access with the phone need to update to Wammu 0.27 or newer.

sudo apt-get install wammu
sudo apt-get install gammu python-gammu-doc wx2.6-doc wx2.6-examples

Plugin the USB cable to the PC/Laptop and phone.

Choose Applications ->Accessories ->Wammu

Note: btctl is needed for Bluetooth






Choose Phone ->Connect

To get the contents of the phone choose Retrieve then selected any of the sub items below;
  • Contact
  • Calls
  • Messages
  • Todos
  • Calendars
To save the files or backup, choose Backups and save/export.

Mobile Media Converter - Converting AMR and 3GP to MP3 and MPEG
The SE K810i and most other mobile phone that supports audio recording, stores the sound in AMR format. The Mobile Media Converter can be used to convert following files:

Audio: AMR files to MP3, WAV, WMA format
Movie: 3GP files to MPEG

(Tested on Ubuntu 7.10)
Step 1: Download Mobile Media Converter from http://miksoft.net/mobileMediaConverter.htm

Step 2: Extract the file mmc-lin.tar.gz and you get the directory mmc-lin

Step 3: Change into the directory mmc-lin and run the programme
Mobile Media Converter

Note: There is a FFMPEG that have been compiled to support AMR and 3GP

OpenOffice.org Document Recovery screen

After using OOo 2.4 for sometime some of the following can happen:
  1. No electric - you loose a document
  2. Laptops run out of juice - you loose a document
  3. The OOo document is moved/renamed - OOo didnt detect the changes since it was done within OOo (Save as).
When you open OOo again, the following screens can appear.




And they keep appearing even after you reboot the PC/laptop.

The solution:
Delete the file XML file named Recovery.xcu found in the locations shown below. Take note that Recovery.xcu contains the settings for Recovery in the Tools ->Options ->Load/Save ->General dialog.

In MS Windows
"Documents and settings"/<user>/"Application data"/Openoffice.org2/user/registry/data/org/openoffice/Office/Recovery.xcu

For OOo3 in MS Windows
"Documents and settings"/<user>/"Application data"/Openoffice.org/3/user/registry/data/org/openoffice/Office/Recovery.xcu


In Linux (I am using Ubuntu 8.10)
~/.openoffice.org2/user/registry/data/org/openoffice/Office/Recovery.xcu

-

Tuesday, June 10, 2008

Transfer phonebook from Motorola V360 to SE K810i

I just purchased a Sony Ericsson K810i to replace the Motorola V360. I've had the V360 for over two years but not its falling apart. Here I will list out the steps to transfer the phonebook from the V360 to the K810i using Ubuntu Linux 7.10 (Gutsy) via USB cable.

1. Create a folder to store the phonebook
mkdir ~/phone.v360

2. In V360,
Settings ->Connectivity ->Sync ->USB Settings ->Data/Fax Connection

3. in Linux
Applications ->Accessories ->KMobile Tools
Choose Phonebook ->All contacts from phone ->Refresh
(If there are many phone numbers, then have to wait longer)

cp ~/.kde/share/apps/kmobiletools/kmobiletools.vcf ~/phone.v360

4. In SE K810i
Plug in the USB cable
Select Phone mode
Choose Settings ->Contacts ->Options ->Advanced ->Backup to M.S.

5. in Linux copy the phonebook from the phone to the Linux
cd ~/phone.v360
cp "/media/PHONE CARD/System/PIM/PB_Backup.vcf" .

6. if there are same names in PB_Backup.vcf and kmobiletoos.vcf then remove them. Otherwise merge the two files. Of course if PB_Backup.vcf is blank the overwrite it with the kmobiletools.vcf file. I take it that the phonebook in the phone is to be backed up and then renamed to PB_Backup.vcf.original

mv PB_Backup.vcf PB_Backup.vcf.original
mv kmobiletools.vcf PB_Backup.vcf
mv PB_Backup.vcf "/media/PHONE CARD/System/PIM"

7. In SE K810i
Unmount PHONE CARD media
Unplug the USB cable.
Select Phone mode
Choose Settings ->Contacts ->New Contact ->Options ->Advanced ->Restore from M.S.

When prompted:
Delete old contacts before new contacts are added?

Choose No

The K810i now have all the phone numbers. Check it out.

Tuesday, June 3, 2008

What AWK can do for Linux.

In Linux, there are many tools to process text and other forms of data. One tool that comes to mind is the AWK. The AWK scripting processes a file line by line and can produce a summary of its finding as header or footer.

TLDP provides a guide on AWK at http://tldp.org/LDP/abs/html/awk.html

EXAMPLE 1
Here is a demonstration of the AWK to extract the directories mounted.
STEP 1. Create an AWK script file called "myscript1.awk". This should contain two lines.

BEGIN{ printf("Display the third field\n"); }
{ print $3 }

STEP 2. Run the following command to use the AWK script.

mount -t ext2,ext3 | awk -f myscript1.awk

EXAMPLE 2
Without using an AWK script file, extract data from the file /etc/passwd and display the results to screen.

STEP 1. Run the following command

awk -F: '{ print $1 ":" $3 ":" $7 }' /etc/passwd

AWK have been used for more complex reporting but the above should give an idea of how this is done.

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 (http://www.mozilla.com/en-US/thunderbird/) or other mirros like (http://mirror.oscc.org.my/mozilla/thunderbird/). I downloaded thunderbird-2.0.0.14.tar.gz 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 libstdc++.so.5 (5.1 comes with version libstdc++.so.6)
yum install compat-libstdc++-33.i386

6. Test the Thunderbird as a normal user
/opt/thunderbird/thunderbird

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 10.20.20.164.36273 > 10.20.20.232.http: S 1619435837:1619435837(0) win 5840
10:16:41.172433 IP 10.20.20.232.http > 10.20.20.164.36273: S 553643372:553643372(0) ack 1619435838 win 5792
10:16:41.172683 IP 10.20.20.164.36273 > 10.20.20.232.http: . ack 1 win 92
10:16:41.172932 IP 10.20.20.164.36273 > 10.20.20.232.http: P 1:445(444) ack 1 win 92
10:16:41.172951 IP 10.20.20.232.http > 10.20.20.164.36273: . ack 445 win 54
10:16:41.174744 IP 10.20.20.232.http > 10.20.20.164.36273: P 1:208(207) ack 445 win 54
10:16:41.174832 IP 10.20.20.232.http > 10.20.20.164.36273: F 208:208(0) ack 445 win 54
10:16:41.174996 IP 10.20.20.164.36273 > 10.20.20.232.http: . ack 208 win 108
10:16:41.177857 IP 10.20.20.164.36273 > 10.20.20.232.http: F 445:445(0) ack 209 win 108
10:16:41.177866 IP 10.20.20.232.http > 10.20.20.164.36273: . 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 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1461217 TSER=0 WS=6
0.000027 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=609213593 TSER=1461217 WS=7
0.000279 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [ACK] Seq=1 Ack=1 Win=5888 Len=0 TSV=1461217 TSER=609213593
0.000285 10.20.20.164 -> 10.20.20.232 HTTP GET / HTTP/1.1
0.000305 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [ACK] Seq=1 Ack=445 Win=6912 Len=0 TSV=609213594 TSER=1461217
0.001955 10.20.20.232 -> 10.20.20.164 HTTP HTTP/1.1 200 OK (text/html)
0.002056 10.20.20.232 -> 10.20.20.164 TCP http > 46538 [FIN, ACK] Seq=208 Ack=445 Win=6912 Len=0 TSV=609213595 TSER=1461217
0.002212 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [ACK] Seq=445 Ack=208 Win=6912 Len=0 TSV=1461218 TSER=609213595
0.002593 10.20.20.164 -> 10.20.20.232 TCP 46538 > http [FIN, ACK] Seq=445 Ack=209 Win=6912 Len=0 TSV=1461218 TSER=609213595
0.002601 10.20.20.232 -> 10.20.20.164 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
Host: 10.20.20.232
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) 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
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 10.20.20.164:49392 -> 10.20.20.232:80 [AP]
GET / HTTP/1.1..Host: 10.20.20.232..User-Agent: Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8.1.14) 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
qfjda1....

T 2008/05/21 18:26:53.774644 10.20.20.232:80 -> 10.20.20.164:49392 [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 Linux.com 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 https://www.linux-foundation.org/lsb-cert/productdir.php?by_lsb

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:
Desktop
  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

Core
  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, Booking.com and China Mobile.

On 26th Feb 08, Sun Microsystems acquired MySQL AB for USD$1 Billion. Sun Microsystems gave the world OpenOffice.org 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 http://svn.twistedmatrix.com. 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://svn.twistedmatrix.com/svn/Twisted/trunk 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/
./run

Test this with a web browser pointing to the server with port 8008.
Example URL location http://10.20.20.205:8008/calendars/

See
http://docs.sun.com/app/docs/doc/819-2433/6n4nlfjk2?a=view
http://fedoranews.org/mediawiki/index.php/Building_a_Simple_Calendar_Server_with_Fedora_and_WebDAV


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 http://www.mail-archive.com/calendarserver-users@lists.macosforge.org/msg00195/LinuxBuildAndRun-DarwinCalendarServer
Here are my steps:

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

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

3. Ensure subversion is installed. Get the svn for Calendar Server
svn checkout http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk 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 :
twistedcaldav/test/data/
And change it to point to a directory of your XATTR mounting point :

/mnt/data/dcs-data/


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
wget http://svn.eby-sarna.com/ez_setup.tar.gz
tar xzvf ez_setup.tar.gz

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

Monday, May 12, 2008

Thunderbird Troubleshooting

IMAP maximum cached connection error
The Thunderbird 2.0.0.14 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
--

OpenOffice.org Annual Conference (OOoCon 2008)

The proposal papers for OpenOffice.org 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 OpenOffice.org (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 OpenOffice.org (OOo), here is an upgrade that will reduce formatting problems in older MS Office documents.

OpenOffice.org 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 OpenOffice.org along with its build and patches, look at the file versionrc.
OpenOffice.org 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
[Version]
AllLanguages=en-US
buildid=680m17(Build:9310)
ExtensionUpdateURL=http://updateext.services.openoffice.org/ProductUpdateService/check.Update
ODFNotifyURL=http://odfnotify.services.openoffice.org/OOo2.4.1/notification.jsp?version=ODF
OOOBaseVersion=2.4
ProductBuildid=9310
ProductMajor=680
ProductMinor=17
ProductPatch=
ProductSource=OOH680
UpdateID=OpenOffice.org_2_en-US
UpdateURL=http://update24.services.openoffice.org/ProductUpdateService/check.Update?pkgfmt=deb
UpdateUserAgent=OpenOffice.org 2.4 (680m17(Build:9310); $_OS; $_ARCH; BundledLanguages=en-US)

Blog Archive