Friday, March 20, 2009

Development on KDE4 with Solid

After using KDE 4.2 it really looks like there are lots of positive opportunities for Kubuntu. This use the QT 4.4.3 library. Below is how my desktop looks at the moment.


For developers, the first thing to do is to understand about Solid. This is a library introduced since 2006 to discover hardware independent of hardware architecture. There is an increase awareness on mobility features. Can you imagine how much effort is being taken? Just look at the seriousness of the Start menu development. A brief description of KDE Solid can be found at the URL http://solid.kde.org/

The C++ tutorial on Solid can be found at http://techbase.kde.org/Development/Tutorials/Solid_Tutorials/ for the eager developers.

The KDE Goals seems to indicate a radical approach. This will break lots of stuff. Many older application and library will need to be rewritten and lots of people will be kept waiting. However, this barrier needs to be taken, else revolutionary changes can't take place. Supporting Solid is the Phonon library, that is expected to provide an independant multimedia framework to be used in gstreamer, xine and DirectX/DirectSound. Even the user interface will undergo a systematic development with the introduction of the Human Interface Guideline (HIG).

Look forward to KDE4!

Using CentOS 5 testing repositories

CentOS does make a good Linux distro. Still users will want stuff that is still in the pipeline or testing.

One good example is that CentOS 5.2 comes with PHP 5.1. However many web developers have moved to PHP 5.2 and this is available in the testing repo. Below is one command to upgrade the existing PHP.

Step 1: Switch to root.

Step 2: Add the testing repo
# cd /etc/yum.repos.d
# wget http://dev.centos.org/centos/5/CentOS-Testing.repo

This will containg the following:
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

Step 3: Update PHP.
yum --en=c5-testing update php*

CentOS graphics

Development of CentOS is partly using the custom graphics. Below is a link to the graphics used in CentOS.

http://dev.centos.org/centos/graphics/

Thursday, March 19, 2009

Playing movies on CentOS 5

One of the attractions in a presentation is having interesting movies being played. On CentOS 5.2, you can install VLC from the Dag repository.

Step 1: Add the Dag repository.
$ vi /etc/yum.repos.d/dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
enabled=1

Step 2: Install VideoLan
$ yum install vlc

Installing for dependencies:
SDL_image i386 1.2.5-1.el5.rf dag 84 k
a52dec i386 0.7.4-8.el5.rf dag 78 k
aalib i386 1.4.0-5.el5.rf dag 167 k
arts i386 8:1.5.4-1 base 1.1 M
cppunit i386 1.12.0-3.el5.rf dag 811 k
dirac i386 1.0.2-1.el5.rf dag 2.9 M
faac i386 1.26-1.el5.rf dag 151 k
faad2 i386 2.6.1-1.el5.rf dag 329 k
ffmpeg i386 0.4.9-0.9.20070530.el5.rf dag 5.3 M
ffmpeg-libpostproc i386 0.4.9-0.9.20070530.el5.rf dag 42 k
freeglut i386 2.4.0-7.1.el5 base 142 k
fribidi i386 0.10.7-5.1 base 52 k
giflib i386 4.1.3-7.1.el5.1 base 39 k
gsm i386 1.0.12-1.el5.rf dag 63 k
imlib2 i386 1.4.0-1.el5.rf dag 947 k
lame i386 3.98.2-1.el5.rf dag 569 k
libXvMC i386 1.0.2-2.1 base 18 k
libcaca i386 0.99-0.1.beta11.el5.rf dag 236 k
libcddb i386 1.3.0-1.el5.rf dag 112 k
libcdio i386 0.77-1.el5.rf dag 514 k
libdca i386 0.0.5-1.el5.rf dag 136 k
libdvbpsi i386 0.1.5-2.el5.rf dag 66 k
libdvdcss i386 1.2.10-1.el5.rf dag 64 k
libdvdnav i386 0.1.10-3.el5.rf dag 212 k
libdvdread i386 0.9.7-1.el5.rf dag 126 k
libebml i386 0.7.8-1.el5.rf dag 297 k
libid3tag i386 0.15.1b-3.el5.rf dag 75 k
libmad i386 0.15.1b-4.el5.rf dag 82 k
libmatroska i386 0.8.1-1.el5.rf dag 701 k
libmodplug i386 0.7-1.2.el5.rf dag 299 k
libmpcdec i386 1.2.6-1.el5.rf dag 52 k
libshout i386 2.2.2-1.el5.rf dag 115 k
libsndfile i386 1.0.17-1.el5.rf dag 476 k
libupnp i386 1.6.6-1.el5.rf dag 297 k
lirc i386 0.6.6-4.el5.rf dag 241 k
mpeg2dec i386 0.4.1-2.el5.rf dag 190 k
opencv i386 1.0.0-1.el5.rf dag 4.3 M
qt4 i386 4.2.1-1 base 7.2 M
svgalib i386 1.9.25-1.el5.rf dag 809 k
taglib i386 1.5-1.el5.rf dag 978 k
twolame i386 0.3.12-1.el5.rf dag 131 k
x264 i386 0.0.0-0.4.20070529.el5.rf dag 789 k
xosd i386 2.2.14-1.el5.rf dag 60 k
xvidcore i386 1.1.3-1.el5.rf dag 531 k
zvbi i386 0.2.33-1.el5.rf dag 925 k

Step 3: Start VLC
In the Desktop Panel, choose the menu Applications ->Sound and Video ->VLC Media Player



Wow ! a total of 46 packages needed to be installed on my fresh CentOS 5.2 installation. Only problem was the package zvbi that failed to be downloaded. So, I manually installed that and restarted the vlc installation.

If this don't work, then the VLC can be manually downloaded and installed from http://download.videolan.org/pub/videolan/vlc

Caveat, you need to install all dependencies manually.

Sunday, March 15, 2009

The programming IDE called Eclipse

Programming on Linux can be done by editing file at the text editors, then going to the prompt to compile and execute. There are Integrated Development Environment (IDE) that can help reduce the pain programming. Eclipse is one such example, supporting a diverse number of programming language.

Installation guide.
Step 1: From the desktop panel choose Kmenu ->Applications ->Add/Remove Software. Enter the root password. Choose the Sources, then ensure that the universe repository is selected.

Step 2: Install Eclipse and the plugins
sudo apt-get install eclipse

recomended packages:
ant-doc libbsf-java liboro-java libxalan2-java jython libjdepend-java
libgnumail-java libxml-commons-resolver1.1-java libcommons-net-java javacc
dh-make libgcj9-dbg gcj-4.2 junit-doc libbcel-java-doc classpath-doc
libgcj8-dbg libgcj-doc tomcat5.5 libmail-box-perl

The following NEW packages will be installed:
ant ant-gcj ant-optional ant-optional-gcj antlr debhelper ecj ecj-gcj
eclipse eclipse-gcj eclipse-jdt eclipse-jdt-gcj eclipse-pde eclipse-pde-gcj
eclipse-platform eclipse-platform-gcj eclipse-rcp eclipse-rcp-gcj
eclipse-source fastjar gappletviewer-4.3 gcj-4.2-base gcj-4.3 gij-4.2
gij-4.3 gjdoc html2text intltool-debian java-gcj-compat java-gcj-compat-dev
java-gcj-compat-headless junit junit4 libantlr-java libantlr-java-gcj
libbcel-java libcommons-collections-java libcommons-dbcp-java
libcommons-el-java libcommons-launcher-java libcommons-modeler-java
libcommons-pool-java libecj-java libecj-java-gcj libgcj8-1 libgcj8-1-awt
libgcj8-jar libgcj9-0-awt libgcj9-dev libgcj9-src libjsch-java
liblucene-java liblucene-java-doc libmail-sendmail-perl libmozjs0d
libmx4j-java libswt3.2-gtk-gcj libswt3.2-gtk-java libswt3.2-gtk-jni
libsys-hostname-long-perl libtomcat5.5-java libxul-common libxul0d
po-debconf

Step 3: Getting started
Choose the Menu Help to choose
  • Eclipse Help
  • Tips and tricks
  • Cheat Sheets

Step 4: Updating software capabilities of Eclpise.
In the Menubar choose Help ->Software Updates ->Find and Install.
Choose "Search for new features to install".

To start using Eclipse for Java, there is a guide at

https://eclipse-tutorial.dev.java.net/eclipse-tutorial/part1.html

Happy programming!

Gwenview plugins and KDE 4.2

Since KDE 4.2 adopts many new features, Gwenview (the graphics viewer) may not have all the correct versions of library and applications to use.

Gwenview uses KDE4 but the kipi-plugins on 8.10 needs a newer libexiv and kipi-plugins. This results in the default Gwenview not having any plugins. Only KDE 4.2 systems (default 8.10 doesnt have this) will be effected.

To install the plugins, add to the repository the followng PPA site. Choose from the panel, Kmenu ->Applications ->Add/Remove Software. Edit the sources ->Third party with the following:

deb http://ppa.launchpad.net/digikam-experimental/ppa/ubuntu intrepid main

This should update itself. If it does not do any updates, then at the command line, run command apt-get update, and install the new kipi-plugins.

sudo apt-get install digikam kipi-plugins kdeprint

The following are installed:
digikam kipi-plugins libkdcraw7 libkexiv2-7 liblensfun-data liblensfun0 libmarble4 libqt4-sql-sqlite marble-data

Suggested packages:
digikam-doc gallery vorbis-tools

Recommended packages:
kdeprint

See
http://www.digikam.org/drupal/node/421

Thursday, March 12, 2009

UK declares Government Action Plan for OSS

UK Cabinet office website have declared the intent to adopt OSS. This is more towards leveling the playing field for OSS.

In its "Background" it mentions that 50% of its webserver use Apache. Looking up the cabinet office site, it uses Minstrel-httpd as its web server. The website uses MS ASP.NET. Well, the cabinet will need to lead the way by example by adopting more visible OSS solutions.

OSCC MAMPU have already under taken a rather unique approach for the Malaysian government since the year 2004. Among the OSS initiatives include making the government agencies aware, programmes to increase the human capital development and changing the management mind set. There were agency management who continue to seem unaware of the Malaysian Public Sector OSS Master Plan. However, the winds are changing and local government body have started their own campaigns on OSS.

But is UK they ready to accept OSS is not just the software, but whole change in the way the human capital will use systems? Are they ready to have users participating and contributing to the OSS community? The OSS business model will be different and will involve the international community along side the small businesses (including individuals). Unless the UK government adapt speedily, all the grand plans will be a long long struggle for many years to come.

I look forward to more OSS successes from UK.

Friday, March 6, 2009

No resume image, doing normal boot

During boot up of the Kubuntu 8.10, the progress bar froze at about 1/4 way. Changing to the CLI, it was hanging at the line:

No resume image, doing normal boot

One possibility is that the update of the kernel may have damaged the initramfs on the swap. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system.

Solution, delete then recreate the swap before updating the initramfs. I identified the SWAP file as /dev/sda5 on the system.

Step 1: Enter into rescue mode
Reboot into rescue mode. In the main menu, choose the option to boot into root user.

Step 2: Delete then recreate the swap file
# swapoff /dev/sda5
# mkswap /dev/sda5

Step 3: Update the initramfs
# update-initramfs -u

Step 4: Restart machine
# reboot

It is booting without the frozen progress bar. But another problem causing the slow boot up. Its during the network configuration. Well, its faster now.

Thursday, March 5, 2009

France Adoption of OpenOffice.org, Firefox, Thunderbird and OSS

In Europe, movements towards open source software (OSS) have long been a silent battle. France is one of those that started to look into the benefits of OSS in the early 2000.

The French Gendarmerie Nationale (national police) is composed of the police forces and the military police with over 100,000 employees distributed across the country. In 2001, the decision to explore OSS implementation started and by 2005 OpenOffice.org (OOo) was implemented. Other OSS implementation like Firefox (web browser) and Thunderbird (email & calendaring client) soon followed. Since they have managed to developed their employees with OSS skills, their next plan is for the migration to Linux desktops.

See:
French Gendarmerie goes for Ubuntu

The French Ministry of Agriculture have migrated over 500 servers to Mandriva Linux since 2005. This is mainly to replace its MS Windows NT servers. A total of 15,000 employees is under this Ministry. Plans are underway to have an additional 400 servers on Linux.

See:
French Ministry of Agriculture

The French Parliment moves towards OpenOffice.org in 2007. Following that Ubuntu Linux will be used as the desktop operating system. This will be over 1,000 PCs running Ubuntu Linux. Which translate to even more opportunities to use the hundreds of OSS available to through the Ubuntu software repository.

See:
French Parliment

Monday, March 2, 2009

Ubuntu list of games

Linux is mainly used for servers and office work. For those who seek entertainment in the form of games, here are some linux programs available for the KDE desktop:


knetwalk - wire puzzle game for KDE 4
kpat - solitaire card games for KDE 4
kolf - miniature golf game for KDE 4
kmahjongg - Mahjongg solitaire game for KDE 4
kjumpingcube - simple tactical game for KDE 4
kgoldrunner - Lode Runner arcade game for KDE 4
katomic - atomix puzzle game for KDE 4
kblackbox - Black Box puzzle game for KDE 4
kiriki - Yahtzee dice game for KDE 4
ksame - SameGame puzzle game for KDE 4
kdiamond - three-in-a-row game for KDE 4
kdiamond - three-in-a-row game for KDE 4
ksquares - Dots and Boxes game for KDE 4
kbreakout - Breakout arcade game for KDE 4
kbounce - Jezzball arcade game for KDE 4
kfourinline - Connect Four game for KDE
kreversi - reversi board game for KDE 4
klines - color lines game for KDE 4
ksudoku - Sudoku puzzle game and solver for KDE 4
kapman - pac-man clone for KDE 4
kblocks - a falling blocks game for KDE
konquest - simple turn-based strategy game for KDE 4
kmines - minesweeper game for KDE 4
kbattleship - battleship board game for KDE 4

Happy trying out the games.

Sunday, March 1, 2009

MYSQL GUI Tools for Linux

I was looking for tools to administer MySQL 5 server and noticed today the http://www.sun.com is not available. Cant figure out why so I didnt get a chance to test the MySQL Workbench.

I am trying this on a Kubuntu 7.10 with kernel 2.6.27-11 and the database as MySQL 5.0.67.

KMySQLAdmin
This is a pretty simple tool to use. It connects well.

Installation:
Install from synaptics or at the command line type
sudo apt-get install kmysqladmin

At the command line type kmysqladmin

mysql-admin
This comes with the MySQL database and is simple to use.

Installation:
Install from synaptics or at the command line type
sudo apt-get install mysql-admin

This will provide two applications.
  1. MySQL Administrator
  2. MySQL Query
To run, choose the KMenu ->Application ->Development ->MySQL Administrator


This really is really useful to manage MySQL servers.

Saturday, February 28, 2009

Drawing Entity Relationship Diagram (ERD)

Linux provides a number of resources to draw ERD for database designing. One such application is known as GNU Ferret that also generates the SQL syntax in the form of SQL92, MySQL, Postgresql and GerwinML. GNU Ferret is written in Tcl/Tk language and is formerly known as GerWin.

Installation:
Use synaptic to install ferret or at the Ubuntu Linux command line type

sudo apt-get install ferret

Ferret
Start the program from KMenu ->Application ->Development ->Ferret.

The first tab provides the project name and location to save the project.

The ER Diagram tab allows the design of the ERD itself in very simple form.

The Table Diagram tab shows the tables that will represent the ERD.

The Output tab generates the SQL statements for databases such as MySQL, Prostgresql and any SQL92 form.


Conclusion:
A simple application that works! You can join at http://www.gnuferret.org/

Thursday, February 26, 2009

Backup first step - mounting remote disk

This will be a series on back up of files to remote data.

Firstly, the disk needs to be mounted and here we will use the sshfs utilities. This allows us to use backup tools to use remote directory as a normal directory.

Install the tools
$ sudo apt-get install sshfs

Create the disk and mount
$ mkdir /mnt/nicholas
$ sshfs nicholas@servername.com:/home/nicholas /mnt/nicholas

$ mount
nicholas@servername.com:/home/nicholas on /mnt/nicholas type fuse.sshfs (rw,nosuid,nodev,max_read=65536,user=oscc)


Remove the mount
$ fusermount -u /mnt/nicholas

Tuesday, February 24, 2009

Thunderbird mail storage.

Thunderbird under the hood I can find some interesting files. I could identify a few of them;

On a Kubuntu 8.10 system the Thunderbird profile and email box is stored in $HOME/.mozilla-thunderbird/someprofile.default

For example:
$HOME/.mozilla-thunderbird/izvwsxcs.default/

The default profile can be set in the file $HOME/.mozilla-thunderbird/profiles.ini

Here is an example:
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=6wpi8gaz.default

[Profile1]
Name=Nicholas
IsRelative=1
Path=izvwsxcs.default
Default=1

In example above, my profile is izvwsxcs.default. In that folder, you can find that the emails are stored in the email box oscc.org.my
$HOME/.mozilla-thunderbird/izvwsxcs.default/ImapMail/mail.oscc.org.my

Emails are stored into two files (in above folder).
The email contents: A file with no extension
The email header: A mail summary file (.msf) extension

Friday, February 20, 2009

Recording desktop session

In preparation for a presentation for an OSS Seminar at CIAST this 25 Feb, a demo of the desktop is required. KUbuntu comes with several desktop recording packages.
  • istanbul
  • ffmpeg
  • KRecordmyDesktop
KRecordmyDesktop
KRecordmyDesktop is a KDE application to record desktop session. Command to install is

sudo apt-get install krecordmydesktop recordmydesktop

Then run the program from a terminal (CLI).

$ krecordmydesktop

At the panel, right click the KrecordmyDesktop and start recording. This will save the session as an .ogg file. Most Linux movie players can use the .ogg file.

I found that the KRecordmyDesktop did not have any delay to start/end recording. This resulted in having to use the recordmydesktop program directly.

The recordmydesktop
This is a program that can record a desktop and save it on the fly OR when the recording ends. Frontends to this is the KRecordmyDesktop and grecorgmydesktop.

Recording can be done at the command line which saves to the file out.ogv by default;

recordmydesktop --no-sound -delay 3 -o filename

The default control keys during a record session:

1. Pause / Resume recording - Ctrl+Alt+p
2. Stop recording - Ctrl+alt+s

More details can be found at recordmydesktop.

Viewing in AVI
To convert the .ogg to .avi install ffmpeg or mencoder. The tools are run at a terminal to convert the .ogg file.

The ffmpeg

Step 1: Install the program. Include the dependency files of libavdevice52 libimlib2.

sudo apt-get install ffmpeg

Step 2: Start the converter. The -target, -r and -s is optional.

ffmpeg -i kdesession.ogg -target vcd -s vga -r 52 kdesession3.avi

The mencoder
Alternative encoder is mencoder (used with mplayer).

Step 1: Install mencoder.

sudo apt-get install mencoder

Step 2: Convert the .ogg file to .avi with no sound effects.

mencoder kdesession.ogg -ovc lavc -nosound -o kdesession3.avi

There are lots of configuration options in ffmpeg and mencoder from the help files.

Photos not working in OOOP-Accessories 2.3

The OpenOffice.org (OOo) 2.4 and 3 comes with a limited number of graphics for the gallery. Users can collect their own graphics (photos, cliparts and etc.) or install the add-ons such as OOOP-Accessories for OOo. Since OOo 2.4 I have kept the OOOP-Accessories 2.3.1.2.oxt file and it works with OOo 3.0.1 very well.

However, on the Kubuntu Linux all the options to use the Photos have been wrongly linked. After installation, the user need to open a prompt (command line terminal) and create a link to the correct location of the graphics. I have recorded this online sometime ago, but have not gone to find it back.

The instruction here is for installation for the local user.

Step 1: Enter into the OOo gallery directory.

cd ~/.openoffice.org/3/user/gallery

Step 2: Find the installed OOOP-Accessories directory.

find . -name "Photos" -type d
Output
../uno_packages/cache/uno_packages/TzY7IS_/OOOP-accessories-2.3.1.2.oxt/gallery/Photos

Step 3: Use the directory in previous step, to create a link to the Photos directory.

ln -s ../uno_packages/cache/uno_packages/TzY7IS_/OOOP-accessories-2.3.1.2.oxt/gallery/Photos


The gallery photos can be accessed via any of the OpenOffice.org Writer, Calc or Impress.

Monday, February 9, 2009

Killing programmes in KDE

I just came across my first program freezing in KDE 4.2 and realised that that there are many KDE users who will encounter such cases familiar to MS Window users.

The common command line method to KILL the programme or process is the same as any other Linux/Unix system. How about for those who are more keen to use the GUI to control such programmes or processes? In Linux they can be Killed (terminated), reduced its priority or paused to allow other processes to gain back CPU and memory resources.

There are two main programmes involved here;
  1. xkill
  2. ksysguard

To terminate a programme (Window Client)
Step 1: Start Xkill.
Any where on the Desktop press Ctrl+Alt+Esc

Step 2: Select the programme to terminate.
An 'X' appears as the mouse cursor. Use this to select the programme to terminate.

List processes and terminate a programme/process
Step 1: Start the process view in ksysguard
Any where on the Desktop press Ctrl+Esc

Step 2: Select the programme to terminate.
Scroll down the list of processes and right click its name. Choose Kill Process.

So, those MS Window's user will have to get used to something other than Ctrl+Alt+Del to terminate a programme.

Thursday, January 29, 2009

KDE 4.2 with Dual Monitor

I just upgraded to KDE4.2 today on Kubuntu Interpid. One of the first items I am testing is the ability to use the display on my laptop and the monitor/projector at the same time. This is known as multihead and previously the Xinerama was used to have two different screens with one X server (the engine behind the graphics display on Linux).


The KDE 4.2 Plasma control (top right corner of the screen) Zoom Out function allowed the laptop screen to have a different background and widget from the monitor/projector. This really made an impressive environment for customisation.

This is great for presentation as the OpenOffice.org 3 have full capability to show the slides on one screen while previewing on another screen. The KDE4.2 provided the variable KDE_MULTIHEAD=false that allowed the same display for both the displays. Initially I changed this environment variable to true, but nothing happened.

The Intel site http://intellinuxgraphics.org/dualhead.html gave some good tips to get what I was looking for. The steps below allowed the multihead function to work when the VGA cable is plugged at the Login screen. To revert back to the dual head (where both laptop and monitor/projector displayed the same output), return to the Login screen and unplug the VGA cable. The X server should be restarted.

Step 1: Backup the /etc/X11/xorg.conf

Step 2: Replace the xorg.conf with the following

Section "Device"
Identifier "Configured Video Device"
Driver "intel"
Option "FramebufferCompression" "off"
Option "monitor-LVDS" "internal"
Option "monitor-VGA" "external"
EndSection

Section "Monitor"
Identifier "internal"
EndSection

Section "Monitor"
Identifier "external"
Option "RightOf" "internal"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "internal"
Device "Configured Video Device"
SubSection "Display"
Virtual 2560 1024
EndSubSection
EndSection

Section "ServerFlags"
Option "AIGLX" "false"
EndSection

Step 3: Reset the X server
Logout and restart the X by pressing Alt+e
Login again and you should have the new setting applied.

Wednesday, January 21, 2009

Install Java6 on Kubuntu Linux

After having a stable KDE 4.1.9, I decided to test the Java compiler installation from Sun.

How to select the default Java
More than one Java can be installed at a time on Linux. The default Java can be set by user. If you have Java installed, then choose the correct version:

  • Check the current Java or JRE
    java -version
  • Check the installed Java JDK
    update-java-alternatives --list
  • Select default Sun's Java or JRE
    sudo update-java-alternatives -s java-6-sun
  • Example output of installed Java
    java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
    java-6-sun 63 /usr/lib/jvm/java-6-sun

Installing java
Step 1. Be connected to the Internet. Check the Java version and details prior to installation then install Sun Java Development Kit.

apt-cache show sun-java6-jdk
sudo apt-get install sun-java6-jdk sun-java6-doc sun-java6-demo

Step 2. The JDK documentation installation requires the file from Sun Website. Download the Java Doc files from http://java.sun.com/javase/downloads/
Select Java SE 6 Documentation and download to /tmp.

Step 3. Select default Sun's Java or JRE
sudo update-java-alternatives -s java-6-sun

Step 4. Apply the Java compiler path in ~/.bash_profile
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$PATH:$JAVA_HOME/bin

Step 5. Install Eclipse 3.2 IDE
sudo apt-get install eclipse eclipse-jdt

Compiling Java
Create the first Java program, compile then execute.

Step 1: Below is the traditional Hello World example for the Java program called Hello.java

class Hello {
public static void main( String args[]){
System.out.println( "Hello World");
}
}

Step 2. Compile.

javac Hello.java

Step 3. Execute.

Java Hello

Wednesday, January 14, 2009

KDE 4.2 beta is great, wireless not

After the KDE 4.2 upgrade things seem very promising. Here is my Desktop with the Desktop applet, clock, sticky note, crystal monitor 8, Dolphin file browser and the panel (bottom of screen).



The KMenu with widget style "cleanlooks" and windows decoration as "Oxygen" looked strange with the black borders. Commonly accessed applications works very well, including the OOo3.0.1.




After upgrade the networking broke (most annoying was the wireless). Following are replacements apps;

1. KWlan
The KWlan which comes from standard ubuntu repositories provided a nice applet to replace the the default network manager. But the installation removed the initial KNetwork Manager which stopped the Network Manager. Wireless was still not working properly as I did not see the WPA option, only WEP connection was available. Checked the iwl3945 but it gave a blank output;

sudo modinfo iwl3945

You need to restart networking with the following command;

sudo /etc/init.d/networking start

2. wcid
Wicd is an alternative tool which is not dependant on KDE. With installation instructions from wicd, it brought back networking to normal state. Future Kubuntu may include wicd.

Step 1: Add the wicd repository.
Open Adept (add/remove software) and add the third party repository

deb http://apt.wicd.net intrepid extras

Step 2: Add the wicd key.

wget -q http://apt.wicd.net/wicd.gpg -O- | sudo apt-key add -

Step 3: Install wicd.

sudo apt-get update
sudo apt-get install wicd

Step 4: Configure the wired/wireless. Type

wicd

Select wired/wireless name and choose the small triangle to expand the menu. Enter the requied fields and choose "Connect". This shows a blinking colour for data tx/rx. Simple and nice!

Saturday, January 10, 2009

Improved KDE 4.2

Following the KDE progress to KDE 4.2 indicates that lots of the problems/bugs I am facing in Intrepid's KDE 4.1 can be resolved. Primary reason to use the KDE 4.2 beta 2 is to resolve an issue of OOo3 from PPA that works on GNOME but crashes in KDE 4.1.

Common error line running OOo3.0.1 was

QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setWorldTransform: Painter not active


Installation is is based on Kubuntu News (http://www.kubuntu.org/news/kde-4.2-beta-2)
I do not have koffice-data-kde4, installed so skipped that step.

Step 1: Start Adept Installer.
In the Sources, enable the Recomended Updates
deb http://ppa.launchpad.net/kubuntu-experimental/ubuntu intrepid main

Step 2: Install the KDE

Step 3: Apply the KDE 4.2
Now log out and press Alt + E to restart X. When you log in you will have KDE 4.2 Beta 2
Reference:

Sunday, January 4, 2009

Remove OpenOffice.org from Kubuntu

The initial OpenOffice.org 3.0 gives a continuous error as shown below.

QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::setWorldTransform: Painter not active

Here, I explain how to remove the OpenOffice.org installed via the Kubuntu mainstream.

Step 1: Completely remove any instance of OOo.
sudo apt-get remove openoffice.org* ooobasis*

Saturday, January 3, 2009

Surviving an OSS migration in 2009

Over the past couple of years, numerous efforts have be undertaken to seek benefits of adopting open source software (OSS) from individuals, corporate to governments. There have been successful adoption and others who have had to rake out more cash to revert back to proprietary software. Based on such events, here are my predictions to survive an OSS migration in 2009.

  1. Lay out an OSS migration plan for all to see. This does not have to be in great detail but sufficient enough to know who will be affected.
  2. Keep information flowing on the progress of the implementation to management and those below. Don't you just want people to get involved? what is better than awareness!
  3. Recognise the OSS participation of individuals and groups. This means the management understands that their business secrets are protected as they know who is contributing what. Morale will increase as people strive to improve systems out of their own interest. Remind everyone of their targets, some may get too preoccupied in OSS and forget their business objectives.
  4. Be prepared to change how the business is carried out. This means knowing a different way of doing things to achieve equal or greater results.
  5. Maintain budget on ICT. Yes, OSS will reduce cost if proper expense on the migration is provided. You will see the savings! Get quotes for similiar systems and file them for comparison of the actual implementation. How elese would you know the exact savings?

OSS will be around for a long time. Proprietary systems will seek ways to leverage on OSS instead of fighting them. You will survive.

3COM officeconnect

The 3com ADSL router, 3CRWDR100A-72 although have been discontinued, is very reliable. The 4 ethernet ports and support up to 34 wireless devices is more than sufficient. I tried to upgrade the firmware to version 2007. Only Wine was needed as the download was a ZIP in exe format. Found that I cant connect/dial into the ADSL provider after the upgrade.

I am down grading firmware to version 2.06 (Sep 21 2005) and now it works. Downloaded the firmware from http://www.3com.com website. The administration page is slightly changed. Here is the nmap finger print.

PORT STATE SERVICE VERSION
80/tcp open tcpwrapped
MAC Address: 00:12:A9:06:58:72 (3com Europe)
Device type: WAP
Running: 3Com embedded, Philips embedded, Sinus embedded, SMC embedded
OS details: Wireless broadband router (3Com OfficeConnect, Philips SNB6500, Sinus 154, SMC SMCWEBT-G, or SMC SMCWBR14-G2)

The wireless anthena is not detachable but it have separate grounding. For security, the remote web access is disabled by default (port 8080). Instructions for the router can be found at portforward.

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)

Blog Archive