Sunday, May 17, 2009

Welcome to new Sri Lanka

By now we know and believe Velupillai and Other terrorist leaders are killed by our Armed Forces or they have suicide. We knew this will end soon. I like to give my sincere gratitude to our Three forces, Police, Civil security forces and Mr. President for scarifying their life for the future of Sri Lanka and for our lives.


I salute you all!!.

Monday, May 04, 2009

A disaster happened, what should we do?

As at today, the war is officially over but rescue missions are still undergoing in Sri Lanka to securely rescue Tamil civilians trapped in LTTE barbarians. This is the final few days of Prabhakaran and his followers. So I'll not talk about him or LTTE here now.

We saw hundreds of thousands of people fleeing from LTTE to safe zone controlled by SL government. All of them are residing in refuge camps. They need food, water, cloths, medicine, sanitary facilities and many other general human needs. And the great thing is people around the country were organized and collected many essentials and quickly sending them to those areas with the message "We all are a one big family, we love you". This has being the one and only humanitarian war ever happened in the world and will be on the history books for sure.

Now that we had a disaster, and we see the aftermath too. But on the other hand, we are getting lots of goods and services to this affected areas from all around the country and globe. We need a proper Disaster Management plan to handle the received donations such as food, water, cloths, medics, etc. This remembers me the Tsunami 2006. We did not had a proper disaster management plan or a system (manual or computerized) so we wasted lots of valuable goods received for afforded areas. And distribution of the donations were highly disorganized where some areas receive excessive amount of donations and another area had nothing at all. So we had that experience, no need to repeat that same process.

We need to mange the donations (all types) properly so that each and every one gets the proper benefit out of those donations without wasting them. Here it comes the need of a well structured computerized Disaster Management System. Ok... do we have to spend another million rupee on this? Absolutely not. There is this free and open source software system call "Sahana" (www.sahana.lk) developed by Sri Lankan FOSS community, where you can use for these kind of scenarios. You can download it for free, use it conjoining with any number of donating organizations and government. I know most of the organizations using this system today. But this is a reminder for those who still not aware of such system. Next question would be support on using this software, and make it work in your organization/group on the double. There is a strong community support through mailing lists, IRC. And if you want fully featured professional/commercial service you can contact Respere, the Sahana Company (http://www.respere.com/). They provide island wide commercial training, support for Sahana Disaster Management System.

So now that we have donations, and human resources to handle them and a Computer Software System to help manage those donations and also to maintain missing persons registry, where many people are missing and to be found. So I request all the donors, organizations, to be wise, and manage the peoples hardly earned donations so that each and every family member in north will receive the goods and services equally and minimize wastage.

I can see clearly now the war is gone...
I can say all the problems will fly away...
And there will be safer life for all our friends...
It's gonna be a bright, (bright) bright Sunshiny day......









Thursday, April 09, 2009

Sri Lanka or Tamil Eelam?

This post is dedicated to all "Tamil Eelam" fans...

Velupillai and his friends started an Ealam war before I born. But I couldn't stay away from it by saying "I'm not a part of this war". We all in Sri Lanka suffered from this war, and still there is a little more to suffer. I came to know by reading the history of the crisis, in late 70s Velupillai's initial idea of fighting against the majority of Sri Lankan Sinhalease was truly liberal, that he was standing against for step-mother treatments for the tamil minority (quantity wise) in Sri Lanka. Those early rulers in the country have done some thing really wrong in ruling the country and Velipillai triggered this liberation fight pointing that. But the country changed with the time, rulers changed, political views were changed. And poeple wanted to end this fight and stay together as one nation. But, Velupillai did not want to see a happy ending of it as he has nothing else to do (killing) if this war ends. So he gathered as many people as possible (mostly by force) and kept killing and disturbing the people's life for the last 30 years. And there were many helpers, money donors in Sri Lanka itself and some other countries around the world who financially supported this terrorists. Many of them were doing illegal business like drug dealing, arms dealing, robberies, kidnapping, hijacking, etc. So now think , what has happen to the liberal fight? where it has being leading to? Finally, the innocent Tamil people were aside suffering from the business work of Velupillai, but he did not give a shit. He holds the banner "We are freedom fighters", but kills hundreds of innocent Tamils who have not obey him. Now every body knows that Velupiiai is not the "leader of Tamil union", but the "executioner of Tamil union".

Separate a part from the Sri Lanka and having an Eelam is not an effective solution in the long run too. The land is too small and when the population grow the land will not be sufficient for the crowd, so a new war will start in addition to the ongoing one. And if Velupillai creates a native land for Tamils and kill all the Sinhalease in that area what about the Tamils who live in Sinhalease areas? Shall they all be killed as Velupillai does for others? Is that the solution for this problem?. NO. There is no ethnic problem in Sri Lanka, there wasn't for decades. Sri Lanka have a one BIG problem, it's this Velupillai's LTTE Terrorist problem.

Here is the map that Velupillai draw for the Tamil Eelam.

He thinks, this small land can occupy all the Tamils in this country, and make this is the heritage land of "Tamils". Why he want to cage the Tamils in to a small area while the whole Sri Lanka is wide open for all Sinhalese, Tamils and every other one? Now see for your self, look at the Sri Lanka map, which has more space to live, have access to more resources.


Any one can see that Tamils have more land now than before, and Sri Lanka is a country were many raises lives peacefully and care for each other. People in most countries are very narrow minded and raises. They don't accept the humans as a one kind. But here in Sri Lanka, people don't care of the skin color or the language a person speak. They only care about sharing and living a happy life with each and ever one together as a one country.

Velupillai brought death and fear to every one in this country by many means. Now it's time for him to end his life inside his own dream. So Eelam fans, I think it's better stop dreaming now. You will never see that Eelam within Sri Lanka, try to find a different country for that. Ask for a land from a country that really support your crazy ideas. But in Sri Lanka, there is no space for you. We (Sinhalese, Tamils, Muslims, etc) live as a one nation, under one flag, singing "Sri Lanka Matha" national anthum. No one will be able to change that.!. So Sorry Velupillai, so sorry Eelam fans all over the world. Your dream ain't gonna be a reality...

Good Bye Tamil Eelam, Go to Hell LTTE...

Peace.!






Tuesday, March 10, 2009

Instant Internet Connection Sharing

Today I came Kandy for 5 days stay due to some functions lined up to attend. My office provided me a HSPA dongle to keep my self online during the stay. Nah.. it's not about the dongle. ;-). I wanted to share the Internet connection with another computer at home. I only had a crossover cable with me, which I always carry in my backpack. So I connected the two Laptops with it and shared my primary PPP connection with the guest Laptop. Both Laptops are runnung on GNU/Linux. The simple setup I had is as below.

Host PC Settings.

I already received an IP for my ppp0 connection from my ISP. So I only had to assign an IP to my LAN card (eth0)

# ifconfig eth0 10.0.0.1 netmask 255.255.255.0

(Don't need to set the default route in the host, cos it's already set to ppp0)

Enable NAT in Farewall and IP forwarding.

# iptables -P FORWARD ACCEPT
# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

# echo 1 > /proc/sys/net/ipv4/ip_forwad

Guest Settings.

Set up the Interface.

# ifconfig eth0 10.0.0.2 netmask 255.255.255.0

Set the default route of the GUEST to HOST eth0 IP

# route add default gw 10.0.0.1

Put the name server IP which received to the HOST PC from ISP in the GUEST /etc/resolv.conf

# echo nameserver xxx.xxx.xxx.xxx > /etc/resolv.conf

That's all. I simply enabled Internet Connection Sharing in my Laptop.

Friday, January 23, 2009

Mandriva One 2009... You made me say "WOW"

Today I installed Mandriva One 2009, a distribution which comes with a Linux Kernel, GNU software and many other custom made and free software. I installed this as a virtual machine, to test it and to see how Mandriva Directory Server performs on her own man's lap. ;-). So I started to install the packages requred for it, and while they are downloading, I went an inside tour. I was amazed, and couldn't hold the "wow" came from my inside...

Mandriva One 2009 comes with a Linux 2.6.27 kernel and I installed the KDE version of it which runs KDE 4.1. There is Gnome version too. Even though I'm not a KDE fan, I wanted to see how is KDE doing it to satisfy me. I was pretty amazed, the start menu is well organized, not too many options, and looked neat. That's some thing I was looking forward to see from a KDE main menu.

There were some cool widgets Which are ready to use and I activated couple of them just to see. And the default wallpapers are very eye catching.
Mandriva One comes with OpenOffice 3.0.0, and it was loading faster than the 2.x versions. Then I quickly went through the applications installed. There is almost all the major apps you need to run a Desktop enviorenment, Internet, Multimedia, Software Installation, Systems Tools, etc. If you need further apps you can easily installed using various methods, rpm, GUI based, or urpmi, etc. And Compiz was packed with the OS, and have all the 3D desktop effects you nee.



This version of Mandriva One 2009, comes with good collection of apps for the desktop users and is in a single CD. You can download it from their official mirrors. The System Requirements need is (as in the web site)
  • Processor: Any Intel®, AMD or VIA processor
  • RAM: 512MB minimum, 1GB recommended
  • Hard disk: 2GB minimum, 6GB recommended
  • Graphics card: NVIDIA®, ATITM, Intel®, SiS, Matrox,VIA. 3D desktop functionality requires an NVIDIA GeForce (up to 8800), ATITM Radeon 7000 to HD 3870, or Intel® i845 to x4500HD
  • 3D acceleration is supported on most capable hardware. For more details, check the hardware compatibility database
  • Sound cards: All Sound Blaster, AC97 and HDA compatible cards are supported. Note: Creative Labs X-Fi cards are not currently supported
  • DVD drive required
  • SATA, IDE, SCSI, SAS: most controllers are supported in non-RAID mode, and some are supported in RAID mode
So for those who are willing to kick Windows Vista away and also for those who are interested in trying out KDE 4.1 without the messy look, I think Mandriva One 2009 is a good distro to try out. It comes as a live user version and can be installed and make secure as a regular GNU/Linux distribution.

Okay It's time for me to get back to the work I was doing... Got to start playing with the Directory Server of it...

Mandriva Team, Good Work fellas!!!

Thursday, January 22, 2009

Fedora Directory Server, NFS, SAMBA in action.

I was working on a Centralized authentication system in the past couple of days. I was comparing Mandriva Directory Server with Fedora Directory Server and testing them in various levels. I thought of make the work available online so any one else in the world can benefit from this. This will not be a step-by-step guide sort of a thing, but have methods of performing the tasks.

My setup was able to;

  • Authenticate Unix and Windows users from an LDAP server (Fedora Directory Server).
  • Map a dedicated network drive for all the users under their username using SAMBA.
  • Enable roming profiles for POSIX accounts using NFS exports.
  • Control hardware on GNU/Linux based systems using PolicyKit.
  • And some other stuff... Like mail server authentication, etc
Scenario

  • Users must authenticate using LDAP user credentials from a central server.
  • Existing/New Windows and GNU/Linux Clients should be authenticated via LDAP server.
  • Use e-mail facility.
  • Control over selected client hardware (eg:usb pen drives, digital cameras, etc).

A very rough diagram ;-)


Testing tools

Hardware

* Intel Core Duo2
* 512MB RAM
* Networking Hardware

Software

* Fedora Directory Server 8.0
* Zimbra Collaboration Suite
* Apache 2.0
* Bind

Operating Systems

* Fedora Core 9 (For Authentication Server)
* Ubuntu GNU/Linux (Clients)
* MS Windows (Clients)

Server Installation

* Installed Fedora Core 9
* Installed Fedora Directory Server 7.1
* Installed Zimbra Collaboration Suite.

Client Installation

GNU/Linux

I have to perform few steps to set up GNU/Linux clients to authenticate with the Fedora Directory Server.

* First install the meta-package for LDAP authentication.

# apt-get install ldap-auth-client

* Then edit the /etc/ldap.conf file to suite our setup. I have to put following details in the ldap.conf file.


##Host

host 192.xxx.xxx.xxx

##The distinguished name of the search base

base dc =mydomain,dc=net

##LDAP version to use

ldap_version 3

Fiter to AND with uid=%s

pam filter objectclass=Account

pam_filter objectclass=posixAccount

Group member attribute

pam_member_attribute memberuid

pam_member_attribute uniquemember

##Password hash

pam_password md5


Leave the rest of the file as it is.


NFS Server set up

I thought of keeping the user’s files in a different server for security reasons. Hens I installed the NFS server in a different computer running Ubuntu GNU/Linux . (Actually I’m running the NFS server in virtual host)

* Installed NFS Server


# apt-get install portmap nfs-kernel-server


* I created a directory /home/nfs to create user home directories.

* edit the /etc/exports and added the following lines. This is to create the network shares.


/home/ *(rw,sync)


The above lines will give permission to all users to access /home/nfs with read write permissions.

After that I have to do export the shares

# exportfs -ra

* Restart the services

# /etc/init.d/portmap restart

#/etc/init.d/nfs-kernel-server restart


After I’ve done with the server side, next thing was to set up the clients to auto mount the NFS share.

* Installed the nfs modules in clients

# apt-get install portmap nfs-common

* Then installed the automount module

# apt-get install autofs


Then I need to deny access to all others and allow only for set I want.

* Edit the /etc/hosts.deny and enter the following lines.

portmap : ALL

* Edit the /etc/hosts.allow and entered the IP address of the NFS server

portmap : 192.xxx.xxx.xxx

Tip : When ever I edit a configuration file, it’s always better to put a comment before the edition. That way you can track your changes easily.

eg: in /etc/hosts.allow I’ve put a comment

#Anuradha added these lines..

portmap : 192.xxx.xxx.xxx


After that, try to mount the NFS share manually to check whether the setup is working.

# mount 192.168.0.166:/home/nfs /media/netdisk

(This is done in the client machine, and I have created a mount point in client’s /media directory.)

* Then add the following line in /etc/fstab to mount the share automatically at the computer startup.

192.xxx.xxx.xxx:/home/nfs /media/netdisk nfs rw initr 0 0

Tip: Set the permissions on the nfs share as read, write for every one in the /home/nfs. (This is until I separate the user directories for each user)

This was okay to mount a particular share in a client computer at every bootup. But, what I want is to mount the relevant users share up on his login. So at this moment I create a small shell script to get the user ID and mount the particular share. In order to get the job done from this script, I need to have the user NFS share being created in the NFS server. eg: /home/[username] in the NFS server.

The script looks like this.

#!/bin/bash
#Get logged in user and mount the NFS share.
logname > /tmp/users.txt
mount 192.168.0.116:/home/`cat /tmp/users.txt` /media/netdisk

I have to make this script run after the user login.

But this way the user’s profile will not be in a roaming mode. I wanted to test this as Ill. So made the /home directory of the user available from the NFS server.

* Create a directory for each and every user in the NFS server by the user’s user ID.

eg: # mkdir /home/user1

(I have give the mode as 777 for the time being…)

In the client machine, I have to configure the autofs.

* Add the following line to the /etc/auto.master

/home /etc/auto.home

* Then create a file /etc/auto.home and put the following line there.

* soft, initr, rsize=8192,wsize=8192,nosuid,noexec 192.168.0.116:/home &

* I added the following line in the /etc/auto.misc too.

/home -fstype=nfs 192.xxx.xxx.xxx:/home

* Finally you have to edit the /etc/fstab and make the /home directory hard mounted.

192.168.0.116:/home /home nfs rw,intr 0 0

When reboot and log in as test user “foo” with passwd “foo123”. The login was successful with one error.

“$HOME/.dmrc… some thing

To resolve this error, I setup a directory in the NFS server and named it same as the LDAP user ID and gave the permission as follows.


chown -R [usr_name] /home/[user_dir]

chmod -R 770 /home/[user_dir]

Then it set the home partition and also set the permission “world non-writeable”.

Authenticating Windows Clients.

* Use pGina plug-in to handle the ldap authentication.
* In pGina configuration select the ldapauto.dll plugin to configure the authentication.


Server 192.xxx.xxx.xxx
mode : Search

* Put the total dn and dc entry to the search base
* in pGina configuration you have to put your profile


H:\\192.xxx.xxx.xxx\home\samba\%username%

(this way it’ll seek the profile that comes under UID each login)

I Have to attach the /etc/samba/smb.conf file, that is the file which handles the sharing thing. But It's too long and will not be suitable for this post.)

Note: All unix users who wish to authenticate as NT users have to have samba user credentials too)

Blocking USB storage mounting.

In GNU/Linux

* Use Polkit-Gnome

Define policy kit in the client machine as below.

Under “Storage” section find “Mount file systems from removable drives”.

Then edit it;

Anyone : No

Console : No

Active Console : Admin Authentication

Then using Webmin, I can log in to LDAP server and manage LDAP users and groups. I can give sudo poIr to some user by adding that user to an admin group (GID 123). After I add the user to the admin group that user have sudo power and can mount USB pen drives. And keep in mind that the user gets admin power of that particular system too.

Tip: In Ubuntu Systems it's always a good idea to create the super user and secure it with a password. Else any one can activate the super user account and your system will be in risk.

sudo passwd root

In Windows

* Windows Local Security Policy.

Map a Samaba Share as a Network Drive for Windows.

* Installed samba in a GNU/Linux (ubuntu) server (In this case in the same machine which runs the NFS)
* Add a samba user to validate access

smbpasswd -a ‘username’ (here you enter a valid LDAP user name)

* Create directories under the same name, as in NFS and make them shared.

# mkdir /home/servername/share/user1


I created a small shell script to automate the user creation in NFS. (just for fun) But thought some one might get use of it.


#!/bin/bash
echo "Enter the new user name: "
read name
echo "Creating account for $name..."
sleep 2
echo "Creating NFS Share..."
`mkdir /home/$name`
`chown -R $name:2000 /home/$name`
`chmod -R 770 /home/$name`
echo "/home/$name --done"
sleep 2
echo "Creating Samba Share..."
`mkdir /home/virtual/$name`
`chown -R $name:2000 /home/virtual/$name`
`chmod -R 770 /home/virtual/$name`
`smbpasswd -a $name`
echo "NFS Share and Samba Share is ready for user $name"


The above script will get the input of the user name from the keyboard and create the NFS and SAMBA shares for that user. I only had to give the userID which I created in the LDAP as it is.

Please accept my apologies in not arranging this as a step-by-step how to. In GENERAL, I don't follow a structure when I work (In some CRITICAL cases, yes I do follow the steps...). I try to combine the work pieces from here and there and build a system in my way of doing it.

Cheers!

Friday, October 31, 2008

SMS Alerts on root logins

Last week I met Anuradha at Kandy and we talked about various stuff. At one time, Anuradha mentioned about this sms alerting method and how we can use that tools in our working environment. So I thought of trying it out (not in an operational server but in a testing server).

There are several ways to get an alert on your mobile phone when there has being a root login in your server. This is not for a critical server set up. There are other better alert systems for those kind of systems. But, for a small business server, home network this is a very cheep and cool solution.

Assumption:

Your server is a GNU/Linux (I used debian/Ubuntu distribution)

What you need :

  • A Mobile Phone with USB cable.
  • smstools package.
  • Your time.
Let's start.

Install smstools.

# apt-get install smstools

Plug in the phone with the USB cable. And get the device name.

# dmesg |grep usb

eg: You should see some thing like /dev/ttyACM0 or similar. If your phone is not detected then you have to troubleshoot that. ;-)

Now you can edit the configuration file and set up the device and baudrate.

# vim /etc/smsd.conf

#init =
device = /dev/ttyACM0
incoming = yes
#pin =
baudrate = 460800

Most of the time you don't have give modem init commands, cos modern phones have their own init commands.

Start the smstools

# /etc/init.d/smstools start

The location where your messages handled is;

$ /var/spool/sms/

There you have several directories.

checked - Messages cued for various checking, and ready to send after checking.
failed - Messages which being failed to send, and the reason for the failure is stated inside the sms
incoming - This is the place where the system stores incoming messages.
outgoing - This is where the message to be sent is stored as a text file.
sent - Messages which sent successfully.

To test your configuration, create a simple text file and put it in the outgoing directory. It should be sent in seconds to the mobile phone number specified in the text file.

Format of the message.

From : Foo
To : 9471XXXXXXX
This is the message, Testing...

If the number specified in the file gets the sms, you are ready to do the real thing. :-) Else you can always manually edit the /etc/smsd.conf or run dpkg-reconfigure smstools and set the values.

Now you want to be alerted via a sms when some one loged in as root to your server locally or remotely.

What I did was very simple. I created the text file in somewhere (/home/user/alert.txt).


From: Server1
To: xxxxxxxxx
A Root Login Detected.


Edit the bashrc file (expecting your default shell is bin/bash) and put the line showed below to get my job done.

# vim /root/.bashrc

And put the following at the end of the file.

cp /home/user/alert.txt /var/spool/sms/outgoing/


Done.!

What it does is each time some one loged in as root, the text file which I created will be copied to the smstool's outgoing directory and cued. smsd will send it to the phone number I specified in the text file. And a copy of the sent message will stored in the sent directory too. If you want you can clean it later (manually or by using cron with a rm /var/spool/sms/sent/alert.txt).

You have to keep a phone attached to the server and the phone should have credit to send out going messages!!:D

Hope this help.!




Wednesday, October 01, 2008

Word Children's & Elder's Day

Children are the future of the world. We must protect them and guide them to make the world a better place for every species. We must teach them good habits and develop a good mind set on them. If we don't guide them on the right track, future of this world is not going to be a very nice one.!

Elders are those who have made this world what it is now... (I'm NOT referring to the elders who made this world a living hell). They have sacrificed their lives to make ours a better one. So we have to protect our elder generation with love and care.


Thursday, July 03, 2008

My Blog in Sinhala

I started to blog in Sinhala. "Sinhala" is my first language. I thought it would be nice if I keep a separate blog for Sinhala postings. And there in that blog, I will talk about the life, imotions, etc. Less or no technical stuff. And I will write this blog as usual, in English.

My Sinhala Blog is : htpp://anuradha-life.blogspot.com

Cheers!

Thursday, May 22, 2008

Synaptic Scrolling Problem

- GSynaptics couldn't initialize. You have to set 'SHMConfig' 'true' in xorg.conf or XF86Config to use GSynaptics -


Is any one there who got this error message when trying to configure your touchpad using gsynaptics? "Yeh I had that message"... I installed Debian lenny by saying "See you later" for my neat, one year and three months old Ubuntu installation. after completing the installation my touchpad's scrolling feature was not working. I googled for a solutoin and found several tips and tricks to overcome this, but didn't help, so had to read up a bit about it and found a way to get it working.

Even though it says "set 'SHMConfig' 'true', it did not work. Then I add the server layout and second InputDevice to the xorg.conf.

Here's what I did to over come the issue.

added this section to the xorg.conf

# vim /etc/X11/xorg.conf


Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
EndSection


Then I add the following lines to the bottom of xorg.conf to specify the server layout. I did not have any of the parameters for server layout, so I added all the sections to it.


Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
EndSection


After doing this I restarted the Xserver (Alt+CTRL+Backspace). Scroll works fine! but I still get that error message when I try to run gsynaptics. :-) But for now I'm not going to worry about the gsynaptic, but will have a look at it later.

Tuesday, May 06, 2008

Ceylon Tea Musium

Last weekend I had an opportunity to visit the World's one and only Tea Museum, Ceylon Tea Museum. The museum is located in Hantana, 3KM drive from the beautiful “world's heritage city” Kandy. The museum building itself is an abundant tea factory (built in 1925) for more than a decade.

The museum has 4 floors. Ground floor occupies with heavy machinery like tea rollers, power generators, and other large mechanical equipments which being used in the very first tea factories in Sri Lanka. The first tea roller which were used in year 1889 and many other machineries are displayed in the ground floor. And most of the engines and rollers used over a century ago have being restored to working condition.

When you go to the second floor you will be able to see the whithering process and some other equipments used for drying, and categorizing the tea for various qualities. And there is a section which contains the equipments used by Mr. James Taylor, the father of the tea manufacturing in Sri Lanka. In 1867, Mr. Taylor planted the first tea to be grown commercially in Sri Lanka.


The third floor occupies with more drying racks and two shops where you can buy quality Ceylon tea. And I didn't forget to visit the top floor for a nice warm tea. (for those who don't know, my favourite drink after water is "Tea", I never say no to a cup of tea at any time of the day). While the tea is getting ready, I enjoyed the view from the top floor window. And there was a telescope which we can nicely see the hills belong to Hunnasgiriya region.


I think this museum is a place where every one should visit. A place with a value of informational, and historical, which tells the story of the tasty tea manufacturing in Sri Lanka.

Some facts at a glance;

Location : 3 KM from Kandy town, towards the Hantana road.
Ticket Prices : Students : Rs. 10/= Adults: Rs 25/= (As at 03 -05 -2008)
A friendly staff, with a person who explains every thing through out the tour inside the museum.

P.S:
My camera was broken that day so could not get good pictures of the factory, but I got some photos from my phone, which are poor in quality. Sorry about that.

Saturday, March 29, 2008

ගනූ/ලිනක්ස් සිංහළෙන්

අද දිනයේ මීගමුව පිහිටි A.G. School of Management Studies හි පැවති ගනූ/ලිනක්ස් වැඩමුලුව අතරදී මා, අනුරාධ, ඩනිෂ්ක, යජිත්, රවිත්, කුංචන (සාකච්ඡාව අතරමැද නිදා ගත්තේය) ගනූ/ලිනක්ස් මෙහෙයුම් පද්ධතියට සිංහළ සහාය මුසු කිරීම පිළිබඳ සාකච්ඡා කළෙමු. මම මෙතෙක් කළක් සිංහළ ලිනක්ස් පිළිබඳ අවධානයක් යොමු නොකිරීම පිළිබඳ කණගාටුචක් ඇති වූ අතර අද සිට හෝ ඒ හා සම්බන්ධ ව්‍යාපෘතියකට සම්බන්ධව කටයුතු කිරීමට අසහස් කළෙමි.

අද දින මෙම ස්ථානයේ පැවති වැඩමුලුව සඳහා සිසුන් 50 කට ආසන්න ප්‍රමාණයක් පැමිණි අතර ඔවුන් සියලු දෙනාම ලිනක්ස් මෙහෙයුම් පද්ධතිය පිළිබඳ දැඩි උනන්දුවක් හා කැමැත්තක් දැක්වූහ. මෙම මොහොතේ (රාත්‍රී 11.55) මම, කුංචන, යජිත්, චනුක, ඩනිෂ්ක A.G. School of Management Studies ආයතනයේ පරිඝණකාගාරයේ අවදියෙන් සිටින අතර අනුරාධ මුලින් අප හා සිටින බව කීවද හවස් යාමයේදී පැන යන ලදී. :-)

හෙට දින මෙම වැඩමුලුවේ දෙවෙනි සහ අවසන් දිනයයි. තව ස්වල්ප වේලාවකින් මා නිදා ගත යුතු වේ. දැනට නවතිමි.

Saturday, March 15, 2008

Workshop on Unix (GNU/LInux) Shell

We (LKLUG) organized a workshop on Unix Shell, to provide some hands on training about the Unix Shell. We used GNU/Linux, a Unix like Operating system as our platform. Today is the first day of the workshop where we covered basics of the shell.
  • Introduction to Shell by Anuradha R.

  • Basic Filters by Bud

  • Advanced Shell usage by Sapumal

We conducted this workshop in the Lanka Software Foundation's Lab at UCSC. We expected 20 participants but there were around 25! Since we planed this as a geek's event we didn't mind standing positions and shared seats. :-) Right now Sapumal is conducting his session, the last session for the day and tomorrow we'll cover up some more advanced stuff in Shell Scripting.
Anuradha's Session.

Bud's Session.


Sapumal's Session.

Sunday, January 27, 2008

Insert a copy right label to a set of photos.

Most of us have photo galleries in the Internet. And we upload hundreds of thousands of photos to the Internet. I started to use this nice image manipulation tool named "Imagemagick" to insert a label (a copy right label or some thing) to a set of photos at a one go. since I felt it's very easy to do it by saving it as a script so I can just run it any time I want. Imagemagick is a very famous tool and it has various set of tools to manipulate images. You can check the man page for all the commands and syntaxes, or from web too. Since couple of people asked about this from me I thought of sharing it among all. Imagemagick is available for Mac, Unix and Windows platform too. But I'll stick to my favourite GNU/Linux way of doing it.

First check whether imagemagick is already installed in your system

In Debian based systems issue this command and see the result

#dpkg -l | grep imagemagick

If you don't have the package, install it using your favourite method. I used the apt.

#apt-get install imagemagick
I have collect all the steps and create the script below and run it inside the directory where the photos are located. Actually I reduced the image size to suite for upload, and reduce the quality a bit too. Then inserted the label to all the photos and finally open the photos in gthumb image viewer. First of all it copies all the photos in to a directory to preserve the originals. So you always have the original photos you've taken.


echo "Resize, Convert, prepare photos to publish for web.";
echo "==================================================";
ls *JPG;
mkdir temp
cp *JPG temp
cd temp
for PICME in `ls *JPG`; do convert $PICME -resize 800x600 -quality 80% $PICME; done
echo "Photos resized to 800 x 600";
for PICME in `ls *JPG`; do convert -pointsize 12 -fill Black -draw 'text 20 20 "Copyright 2007. M.D.D.Anuradha Mallikarachchi. All rights reserved."' $PICME $PICME; done
echo "Label inseted."
gthumb *

You can see the inserted label, at the top right of the photo. and it's very convenient for me, when I have to insert a label for set of photos at a one go.

Oh don't forget to make the script executable (chmod +x script) and put it in /usr/local/bin.

Hope this will be useful to some one. :-)

Thursday, December 27, 2007

Minister Dr. Marvin Silva (Bad Marvin) got served!

Today I saw a very interesting news about Mervin Silva's latest thuggery incident. He's being treated very nicely by the staff of Sri Lanka Rupavahini Corporation, with an ink bath and smashing stones and bottles. Well done guys and ladies at Rupavahini. This is what happen when you mess with the wrong people in the wrong territory.

He has entered to the SLRC and threaten to a News Director regarding not publishing a peach he gave in a function, in the news. In the mean time one of his guards had hit the news director and the war started.! The guard is being arrested and minister and rest of his crew being held up in the Rupavahini premises and on the way they go out, all the people have hit them with bottles and stones. His head is damaged and now he is in accident ward.

This guy should be kicked out from politics, father shows his colours in one side and son also follows the father and show the power to innocent people from another side. This is unacceptable. Politics should have a disipline, which is not happening here. And Foolish ministers like this should be banned from politics and should quarantine.

Good work SLRC staff and this is a good lesson to other organisations too, if Mervin comes to your door step and threat you, call the police and don't forget to treat the fucker like SLRC guys!.

I don't think Mervin is going to learn a lesson from this, he will continue to act same way, but Dear Hon President Mahinda, please take necessary actions against this idiot.!

Say NO to Marvin

Some pics at http://www.lankadissent.com/sinhala/news/04_27_12.htm
Video at http://www.youtube.com/watch?v=cvY8hBb44c8

Sunday, December 16, 2007

A Small Idea for Mobile Service Providing Companies.

Time to time I hear new inventions, added features to mobile phones from the mobile communication world. And I'm very happy about the current level of mobile telecommunication capabilities we have in Sri Lanka. I had this idea for a long time and didn't have a time to blog about it. One day when I was with few friends of mine, one of the friends mother said "I was in a deep sleep when my son calls me, and it's a big disturbance to me when people call me while I'm resting". That's the day I got this idea right up in my head.

People who use an Internet Messengers even gmail with chat are already known to this feature and it's not a new thing in that context. I'm talking about setting a status in the IM. For those who don't know this feature yet, here it is. We can type some text and set a message as our status in the IM so all in my contact list can see my status (Available, busy, don't disturb, meeting, etc). Just take a look at the image below, this is a screen shot from my Internet Messenger (Pidgin). I'm sorry about making it horrible to see by erasing the names of my buddy list, it's due to privacy issues. Just take a look at the circled areas. :-)
You can see "Away", "I'm Awake" (My status) and a red sign means "Do not disturb". I can get an idea of the current status of my buddy before I call/text him/her. And that is a small but great feature.


But what I think is, how can we take the benefits of that feature if we implement it in Mobile telecommunication world? Even in other telecommunication fields? Lets see some advantages and disadvantages in my knowledge scope, any one free to come up with more ideas for this.

Advantages
  • If the person is in a meeting, he/she can set the status to "meeting". When caller dials his/her number and hit send/call button he/she can see the receiver's status as "meeting". So he can hangup the call. And a miss call alert will send to the receiver. When the caller is unaware that you are in a meeting, he/she will keep on ringing and it's a big disturb to you even your phone is in silence mode.


  • When you are driving (actually before you start driving) you can set your status to "Driving", so callers can see you are driving and can hangup if the call is not urgent. It's better not to have strong conversations while you drive, cos that may drive your attention away from the road.

  • When you want to rest and do not want to be disturbed, but in the mean time, you do not want to switch off your phone either, you can set the status "sleeping" or "do not disturb" so caller can hangup right after he/she sees the your status message.

  • When you want to show the callers that you are busy with your studies/office work, while you are truly busy with your girlfriend/boyfriend and do not want to be disturbed, you can set a customized status, "Studying", "Busy" so callers can get a picture of your current situation. (Kidding but true)
List can go on... but let me stop from here.

Disadvantages and how to over come those.
  • People are used to dial the number in the key pad and keep the phone on the ear right after hitting the send button, so the chances of seeing a status which display on the screen is very low.
    How to over come this? How about sending a beep signal once caller get connected to the receiver's phone which has a status set. The signal can be send from the receiver's phone to the caller. And yes, advertise about this feature nicely using some celebrities :-)

  • People will not use this feature if they have to walk deep in menus.
    If this feature is embed in to the SIM card, Service providers should find a short way to enter in to "set your status" feature. I have seen there are so many value added features uniquely set for each service providers.

  • Any one who find your number can call you and will see your status. So if some one want to spy on you also have a chance to get an idea of what you are doing now.
    It's bit complicated when it comes to security and privacy. So it's bit difficult to come to a compromise situation here. But the service provider always can provide this as an optional feature so any one who like to use it can use, others just don't have to use it. So both service provider and customer are safe!. Customers can't say "ABC Phone company have violated my privacy". Cos it's a feature that user can turn on or off.
There will be more disadvantages too. It's up to the people who are interested in implementing this idea as a feature in their service to find solutions to all the problems that arise.

This feature can be implemented either in the phone or in the SIM card. At present I'm not capable of actually implementing it. But I'm sure mobile phone companies, telecommunication service providers can do this for sure.!

I have a very important thing to say.If one phone company implement this feature in their phone models, they should not patent on this feature, also service providers. This feature should be globally available. Like we all used it in our Internet Messengers. And it should be freely available to customers/users.

So I hope my post will be useful to those who are interested in this field. And I'm sure one day we all will see this feature and many more attractive and very useful features in our hand held communication devices.

Cheers!

Thursday, October 18, 2007

Welcome Gibbon

Today Ubuntu released the version 7.10, code named "Gusty Gibbon". After Suchetha's wake up call for upgrading from 7.04 to 7.10, I upgraded to the development version of 7.10 few week ago. I will not explain the whole set of new developments and added features here, you can see the full release note in the Ubuntu web site. But I see some improvements in this version and hope to explore the Gibbon to see whether it is really gutsy.

Ubuntu users, happy upgrading to you all.

Tuesday, October 02, 2007

Share your photos with F-Spot

Last week, I was looking for a simple and fast tool to organize and upload photos to my flickr and picasa galleries. After going through the photo management software tools available for GNU/Linux, I found this nice, "free and easy", software called F-Spot. This is a product from Novel Inc and more details can be found in F-Spot web site.

Some basic but main features.
  • Import photos directly from the camera, disk or from a directory.
  • Organize photos according to your selection criteria.
  • View as a slide show, full screen.
  • Upload your photo set directly to Flickr, Picasa, etc.
  • Resize your photos on upload by selecting all at once.
  • And many more feature for you to explore. :-)
I found this tool very useful, cos it was a headache uploading photos to Picasa or flickr from the web interface. And F-Spot can save the time on Resizing, optimizing photos manually for upload. This is just a one tool available for the job, you will find some other tools that does this even better. But... it's choice! :-)

Saturday, September 15, 2007

Software Freedom Day 2007 - The Day

Finally the day came. I was organizing the event at Matara. After a very successful event at University of Ruhuna, came down to Colombo, excel world where there is an event going on right now!!!. Time right now is 9.36pm.

Even though we all were very tired after Matara event, after came to Exell World all the hard feelings went off... I sang a song in the open Karaoke evening too. Since the event is happening right now... I will blog more later... Right now I need to stick with the event!

Enjoy the freedom.! Use FOSS.!

Saturday, August 25, 2007

You may already know, may be not till now.

Please register your self in my private club! Amazing benefits to members!!




Your email :


Password :




In many web sites (specially in public forums) you may have request to enter the email and password (as I've asked above). Many of you (Non IT and IT professionals) give your email and your password, which is the one you use to log in to your email. Am I correct? If your answer is "yes", I'm very sorry to say that the owner of the particular forum or the web site might have access to your email account (cos you have provided the user ID and Password) .

I did a small research regarding this matter using 20 users. (just the people in my office) And I found that 19 out of 20 Internet users were doing this mistake. It's obvious that one tend to enter the email and it's password by the way that it's being asked. So I thought of posting this for the sake of others who still does this mistake. :-)

Social Engineering is a very beautiful art. One can use it for good, one can use it for bad. The above trick is used by some people to get other's personal information. And you will become a victim by being unaware and careless. Your email will be accessible to the out sider, and will be used to spam others, and will do various other bad things "as you do it".

So never ever enter your email password (you may type the email address) in any other web site except your mail box login page. Your email password should be used only with your mail account, any thing other than that, give a different phase as the password. Be aware. Don't be a Cyber victim!