Wednesday, September 30, 2009

Using Preload to boot startup and general performance for Fedora

Preload is a daemon that analyses what you do and fetches the binaries you're mostly likely to use to boost starup and general performance. To make a very superficial comparison, it is similar to Windows Superfetch

Note 1: To install preload on Fedora 11
# yum install preload

Note 2: To tweak the preload configuration, you can tweak the
# /etc/preload.conf
(the default value should work well for all most users)

Note 3: To view the log file of the preload daemon
# less /var/log/preload.log

Note 4: If you wish to take a look on what Preload is caching for you, you go to
# /var/lib/preload/preload.state

Note 5: To ensure that the preload daemon is startup everytime
# chkconfig --level 35 preload on

Monday, September 28, 2009

OpenMPI, CentOS Linking Error - :cannot open shared object file: No such file or directory

I was installing OpenMPI on CentOS 5.x. After installation, I  tried to  use pirun, I encountered this error :cannot open shared object file: No such file or directory

The reason for the error is that the the loader is not able to find the because /usr/local/lib is not in its PATH

To resolve the issues, you have to do the following
# vim /etc/
(Add the /usr/local/lib into the file)
# ldconfig

Sunday, September 27, 2009

Gnome evine - Document Viewer

Evine is a simple document viewer that support a number of format such as PDF, Postscript, DjVu, DVI, tiff. he goal of evince is to replace the multiple document viewers that exist on the GNOME Desktop with a single simple application.

Evine comes by default when you install GNOME for most Linux Distribution. If evine is not installed by default, just do a
# apt-get install evine (for debian variants) OR
# yum install evine (RH variants)

Saturday, September 26, 2009

rsync with the soft-links

Simple entry for today.
I was trying to rsync 1 server to another server. To ensure that the symlinks are copy across as symlinks, do the following:

# rsync -rvl /opt/intel server2:/opt/intel
(Make sure the "-l" is included)

Friday, September 25, 2009

Installing MPI4py on CentOS

MPI for Python (mpi4py) provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.

Step 1: Install Python and dependencies
# yum install python python-devel python-lib

Step 2: Build OpenMPI with Intel Compiler
See Blog Entry Building OpenMPI with Intel Compiler (Ver 2)

Step 3:
Get and install MPI4py
# wget

Step 4:
Build the MPI4py

# cd /usr/local
# tar -zxf mpi4py-X.X.X.tar.gz
# cd mpi4py-X.X.X

Step 5: Setup of MPI
# python build

# python install

Step 6: Testing
Issuing at the command line:
$ mpiexec -n 5 python demo/
(will launch a five-process run of the Python interpreter and run the test scripts)

Important Notes
For more information on the installation of MPI4py, see the official MPI4py User Guide

Thursday, September 24, 2009

Scientific Software for Python - Numpy, scipy, pyMPI

NumPy is the fundamental package needed for scientific computing with Python. It contains among other things:

SciPy  is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization.

pyMPI is a project integrating the Message Passing Interface (MPI) into the Python interpreter.

Tuesday, September 22, 2009

Installing xrdp on Fedora 11

What is xrdp? According to the xrdp project website, xrdp is an open source remote desktop protocol(rdp) server. Xrdp uses Xvnc or X11rdp to manage the X session and will display X window desktop to the user via Remote Desktop Protocol.

To install manually, you may want to look at my blog entry Supporting Windows Terminal Clients from LINUX with xrdp

However if you are using Fedora 11, it is a breeze,

Step 1: Install xrdp
# yum install xrdp

Step 2: Create soft link to startup xrdp automatically in case of reboot
# ln -s ../init.d/xrdp s99xrdp
# service xrdp restart

Step 3: Configure the firewall via System > Administration > Firewall
Allow port 3389 (TCP) in as shown below 

Step 4: Use Remote Desktop Protocol to connect to the Linux Box

Monday, September 21, 2009

Installing Nvidia Drivers on Linux Mint

Nvidia Drivers requires you to exist the X-Windows environment completely before you can install the drivers properly. Instead of booting into console mode, you can do the following:

Step 1: Down the Nvidia drivers from

Step 2: CTRL+ALT+F1 to take you into a non-X terminal

Step 3: Stop /etc/init.d/gdm (GNOME)
# /etc/init.d/gdm stop

Step 4: Install Nvidia Drivers
# ./
(Install Nvidia drivers that match your graphics card and follow the installation wizard)

Step 5: Start /etc/init.d/gdm
# /etc/init.d/gdm start

Sunday, September 20, 2009

Speeding up boot time by Optimising Physical Memory and Swap

If you have a lot of physical memory, you may want to reduce your swappiness to increase performance. The performance is boosted as the kernel can cache data in memory for faster access and reduce the amount of data being swapped in and out of the swap space.

Alternatively, if you have very little memory (For example: 256MB or below), you may want to increase swappiness to boost performance.

To change the swappiness, You have to edit the /etc/sysctl.conf. /etc/sysctl.conf is a file tocontain sysctl which configure kernel parameters at runtime.

# vim /etc/sysctl.conf

At the bottom of the file /etc/sysctl.conf, add the following parameters

Reboot and you will notice the difference. You may want to use conky to monitor the memory/swap usages

Saturday, September 19, 2009

Speeding up boot time by running boot processes in parallel for Linux Mint

If you are using Linux Mint and have multi-core computer at home and wishes to speed up boot time by running processes in parallel, you can tweaked Grub to take advantage of parallelism.

Step 1: Edit /etc/init.d/rc and change CONCURRENCY from none to shell
# vim /etc/init.d/rc

You should notice a performance improvement in your boot-time.

Friday, September 18, 2009

The netbook distro - Moblin 2.0 beta

Moblin is an open source project focused on building a Linux-based platform optimized for the next generation of mobile devices including Netbooks, Mobile Internet Devices, and In-vehicle infotainment systems.

Moblin is Intel's initiative to develop a linux-based OS for mobile devices like netbook. According to the Moblin website, Moblin v2.0 boast the following feastures:

  • New, visually rich user experience
  • The myzone, acting as the 'home screen' panel
  • Aggregation of your social networking content
  • A web browser optimized for the Moblin 2.0 netbook user interface
  • A 'Zoomable' media player
  • A user interface for connection management

Currently, it is v2.0 beta and according to the website tested moblin on the following netbook
  • Acer Aspire*One,
  • Asus eeePC* 901, 1000H,
  • Dell Mini 9, MSI Wind,
  • Lenovo S10,
  • Samsung NC10,
  • HP Mini 1010 and 1120NR (wired networking only for now).

For more information, do go to Moblin Website

Thursday, September 17, 2009

Remove the timeout during boot time

When you boot, there is a small count down before continuing with the boot process. This was originally introduced to ensure that older hardware load modules in time for the kernel to boot. Nowsaday, it is used for users to select their kernel modules, to dual boot etc.

However, if you have a modern machine and you wish to boot fast, you can edit
# /boot/grub/menu.lst

timeout 0                                    
(Change timeout from 5 to 0)

You just save 5 seconds from your boot time

Tuesday, September 15, 2009

Using dhcpcd to fix dhcp client settings

dhcpcd is an useful tool to help you fix dhcp client settings without the need to use the X windows network configuration tools.

To install dhcpcd, just install
# apt-get install dhcpcd

Some application of dhcpcd.
Note 1: Don't let the DHCP program modified your /etc/resolv.conf
# dhcpcd -R eth1

Note 2: Getting your preferred IP Address from the dhcp server. This is especially useful in a small network like home network
# dhcpcd -k (release the dhcp release)
# dhcpcd -s eth1

Note 3: Preventing DHCP from installing default route
# dhcpcd -k (release the dhcp release)
# dhcpcd -G eth1

For more usages, you can visit the online man page for dhcpcd

Monday, September 14, 2009

Installing Adobe Air on 32-bit Linux Mint

To install Adobe AIR on 32-bit Linux Mint, you can do the following:

Step 1: Use dpkg to enumerate adobe application
# dpkg -l | grep adobe

Step 2: Install Dependency for Adobe Flash
# apt-get install libnspr4-dev libnss3-dev libcurl3

Step 3: Download the Adobe Flash from
# dpkg -i install_flash_player_10_linux.deb

Step 4: Download the Adobe AIR from
# chmod 755 AdobeAIRInstaller.bin
# ./AdobeAIRInstaller.bin

Sunday, September 13, 2009

Internet Barometer - Real-time statistics on Internet attacks

Interoute's Internet Barometer shows the real-time statistics on Internet attacks worldwide and provides source of information on the those attacks.

Interoute's Internet Barometer not only shows the countries that have been attacked but the attacking countries as well. However, information on the attacking countries are those attacking Europe at this point in time.

In addition, you can install the barometer widget which let's you have real-time information on threat status and global and local attacks. Adobe Air will be installed on your Linux Mint box to run the widget.

Saturday, September 12, 2009

Using id commands to display user and group information

Learned a simple but effective commands today to display user and group information. That is "id"

# id your_userid

Friday, September 11, 2009

Setting Quota on CentOS Linux

Setting up Disk Quota on CentOS 5.x or Linux is rather straightforward. I'm assuming you are setting on a partition /dev/sdb1

Step 1: At the /etc/fstab, add "usrquota, grpquota" to the partition you wish to put quota on
/dev/sdb1 /home ext3 defaults,usrquota,grpquota 1 1

Step 2: Initialise aquota.user
# touch /dev/sdb1/aquota.user
# chmod 600 /dev/sdb1/aquota.user

Step 3: Remount the partition
# mount -o remount /dev/sdb1
# less /etc/mtab
(It should show
the list of file system having quota entry in Step 1)

Step 4: Do a Quotacheck commands and turn the quota on
#quotacheck -avugm /dev/sdb1
(The quotacheck command will do a scan and will take a while)
# quotaon -av
# quotatstats
(Check for statistics and possible error encountered)

Step 5: To edit a quota
# edquota -u user_id
(Edit the soft and hard limit respecitvely) or alternatively
# setquota -u user_id 100 200 0 0 -a /dev/sdb1
(where 100 and 200 are the block soft and hard limit respectively)

To quota summary report, do a repquota
# repoquota -a

Further Notes:
For more details readings,

Thursday, September 10, 2009

MagCloud - Publish your own magazine in the Cloud

MagCloud enables you to publish your own magazines. All you have to do is upload a PDF and MagCloud take care of the rest: printing, mailing, subscription management, and more.

Interesting application on using the Cloud from Hewlett Packard

Tuesday, September 8, 2009

Subversion Error - svn: Could not use external editor to fetch log messages

When I was installing Subversion on CentOS 5.3 x86_64 and when I tried to do a "svn commit". The error was

"svn: Could not use external editor to fetch log message; consider putting the $SVN_EDITOR environment variable or using the --message......."
"svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set..............."

To solve the issue
You have to input the environment variables in your .bash_profile in your home directory
# vim .bash_profile
export SVN_EDITOR=/usr/bin/vim
# source .bash_profile

Sunday, September 6, 2009

Xinetd daemon on CentOS

In the older version of CentOS or Fedora, xinetd daemon was usually installed by default. However, it seems ( I may be wrong) that from CentOS 5, this is not the case. So if you noticed your xinetd daemon is NOT present in your /etc/inet.d but the xinetd.d directory are present. Just run the usual

# yum install xinetd

And it is ready for your use.

Saturday, September 5, 2009

Using Gedit Plugins on Linux Mint

Although Gedit comes default for many distribution desktop. It is really more than just a pretty text editors. In fact there are quite a pool of useful plugins to use.

Step 1: First Things First. Install Gedit Plugins
# apt-get install gedit-plugins

Step 2: Accessing the Plugins
  • After launching the Gedit Application, goto
    Edit > gedit Preference > Plugins
  • Browse the Plugins and check the ones you want to use. Some of the interesting and useful plugins are the colour picker, the session savers etc

Step 3: Need more information and external Plugins

Friday, September 4, 2009

Rosetta - High resolution protein prediction and design application

The Rosetta software focuses on the prediction and design of protein structures, protein folding mechanisms, and protein-protein interactions. Rosetta codes consistently exhibit repeated success in the Critical Assessment of Techniques for Protein Structure Prediction (CASP) competition as well as the CAPRI competition. Rosetta codes also address aspects of protein design, docking and structure. The software is the foundation for the Human Proteome Folding Project on the World Community Grid.

The Rosetta software is currently licensed for free to users at academic and nonprofit institutions. Over 2000 academic users in more than 32 countries use Rosetta. Commercial entities can use Rosetta by paying a license fee. Revenue from licensing is reinvested in supporting continued software development.

Thursday, September 3, 2009

Scons - Open Source Construction Tool

SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.

It has support for Windows and Linux. In particular, for the RHEL distribution, it has the rpm. However, it will need python > 1.5.2. But the user guide recommend Python 2.5 and above

Wednesday, September 2, 2009

Manually Changing FAT permission on USB

FAT32 does not support file permission and ownerships. In order to support permission and ownership, you have to use umask for permission and uid/gid for user and group permission. Basically umask=000 will results in rwxrwxrwx.

# mkdir -p /media/usb
# mount -t vfat -o umask=000,uid=youruserid,gid=users /dev/sdb1 /media/usb

The results will be
drwxrwxr-x 3 youruserid users 12288 1970-01-01 07:30 usb

If you want to mount the usb and only allows yourself and users in the group to view it, you can use umask=007

# mount -t vfat -o umask=007,uid=youruserid,gid=users /dev/sdb1 /media/usb

Notes on umask:

To calculate permissions which will result from specific UMASK values, subtract the UMASK from 666 for files and from 777 for directories.

If you want all files created with permissions of 666, set your UMASK to 000. Alternatively, if you want all files created with permissions of 000, set your UMASK to 666.