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!

Thursday, August 23, 2007

Software Freedom Day 2007

Sri Lankan FOSS community is organizing the SF Day 2007 in parallel to the global SFD event. This event will happen in three areas in the country, Colombo, Kandy and Matara. This will have awareness programs to the school, university students and to the general public. We wish to hold the event on both 14th and 15th September at these three areas.

The general idea of these event is to advocate and promote Free and Open Source software, GNU/Linux, and also to encourage people to use those, etc. I will update my blog about this event time to time.

Feel the Force - Read the Source.


Saturday, July 07, 2007

Seven/ Seven/ Seven

Humm... after a while... today is a very nice day. it's 07/07/07. Some people says it's too bad to have a day like this, ( හතේ හත ), but for me today was a very good day from the morning.

From last week onwards I started to cram for my semester exam. Well, you will be surprise to hear about my academic work, yeh, I know I'm an idiot. I'm doing this degree from year 2003. :-( I'm doing BIT. I had to finish this by year 2006, but, I'm still in my second year, last semester. I paused my academic work due to some idiotic reasons, which are unacceptable and unreasonable. But now I'm back. Have to finish this degree by next year. So even though it's bit difficult to balance the work-family-degree, I'm trying my best to be a graduate!

Humm.. while that in mind, I went to see the movie, Live Free or Die Hard 4.0. Me, Madhu, Suchetha went to the Majestic Cinema, which has a dolby digital sound system. After I reserved the tickets via the eticketing service I was expecting to enter the hall without a hassle. But case was different, even it says "You can save the time and money by reserving the tickets via Internet" in the web site, we had to stay in a cue for about 20 minutes till the ticketing people receive the list of online reservations. Then after a small "rugby battle" I managed to get my three tickets.! Then come the next joke in the Majestic cinema bar, "Beer is not allowed to take in to the theater" F**K!!!, we were supposed to drink the beer at out side and then go to the cinema. humm, by that time, the movie would have reached the end. I find it very hard to understand the importance of existence of that bar inside the cinema. People have no time to drink their beer!!! F**k the beer, we got two Red Bulls, Coke, Cream Soda, Pop corn, Chips and went in. Movie was very good. එල කිරි.

Humm after stretching the brain and ears, came home safely. Have to start the studies again now. So see you later.

Have a nice 07/07/07.

Saturday, April 21, 2007

Ubuntu 7.04


I'm upgrading my Ubuntu 'edgy eft' to 7.04 code named 'feisty fawn'. I've been using Ubuntu for an year and I'm getting more and more into the distro cos it's getting better and better in Computer Desktop world. Recognition of new hardware is excellent. And I love the neat Gnome Desktop. I'm enjoying my sunny Saturday with Ubuntu at home!!

If you are interested in Upgrading to 7.04, just issue the below mentioned command. No need to edit your /etc/apt/sources.list, Update manager will automatically replace the 'edgy' with 'feisty' and will comment the third party repos temporary. Issue the command as a normal user. Not the super user. It will ask for the 'sudo' password when needed. And mind, you need a broad band connection if you use the Internet as the upgrade medium. Follow the on-screen instructions. Please read the released notes too. ;-) Enjoy the Power of Ubuntu Desktop.

$ update-manager -d

P.S. You can only directly update to 7.04 from 6.10. Older version users have to upgrade the distro to 6.10 before you begin.


Monday, March 12, 2007

Answers to comments..

I saw several comments left for some of my posts. Some are questions. So here are some solutions to those problems.

To Milinda :

In order to pair you phone with the PC you need a passkey. normally it's '1234'. We need to install the relevant packages in our linux box to deal with the keys. Since I'm using ubuntu edgy eft with gnome (of course beryl on top ), I'll stick to the debian way of doing this.

you need to install these two packages. (bluez-pin and bluez-passkey-gnome)

# sudo apt-get install bluez-pin bluez-passkey-gnome

check your /etc/bluetooth/pin file and verify whether you have your passkey in that.

# less /etc/bluetooth/pin

# /etc/init.d/bluetooth restart

After restarting the bluetooth daemon try pairing. It should work. The PC also will show you a notification saying your phone try to connect. Click on the notification and enter the key. That's it!

Good luck.
-----------------------------------------------------------------------------------------------------------
To chaar~max :

Check your graphic card supports direct rendering.
# glxinfo |grep "direct"

if you get
direct rendering: Yes

your card is supported and you can go ahead with installing beryl.

-------------------------------------------------------------------------------------------------------------
To genesis:

I see several errors in your installation. (on reading your comment). you have to check your repositories for errors. You are having many broken dependencies. and make sure you have to correct repos for ubuntu edgy eft.

# apt-get upgrade -f

this might help to fix the broken dependencies.

after that try to follow my post again, you might get it work. You should give it a try, beryl is kicking off every thing.

------------------------------------------------------------------------------------------------------------

I'm sorry I will not be able to answer all your questions but I will try to do my best.

Cheers!

Saturday, March 10, 2007

Bluetooth Remote Control (BT MOUSE)

I felt sleepy while reading a book and wanted to try some thing funky. I wanted to try out the remote control feature in my new mobile phone. After 15 minuets of work I manged to get that feature working with my Ubuntu GNU/Linux notebook. And of course, I wanted to share this experience with my pals around the globe. So here I go...

My Phone : Sony Ericsson K510i
My Notebook : Compaq Presario V3000
My OS : Ubuntu edgy-eft (2.6.17-11-386)

You also can try this with your phones if your phone has the bluetooth remote control feature.

Prerequisites
  • Bluetooth enabled PC and a Phone
  • Bluez-utils
A simple editing of the /etc/default/bluetooth is all you need!

#vim /etc/default/bluetooth

Find and change HIDD_ENABLED = 1 (initially it is set to 0)

This will let you use your phone as a mouse. And some key board strikes also worked but have to check on that later. But mouse features are working perfectly.

#hcitool scan
This is to get your phone's MAC address

#hidd --connect your:phone:MAC:address

You will see the notification on your phone "enable remote control?"
press "yes" and you are ready to go.

End your connection after you're done.

#hidd --unplug your:phone:MAC:address

Use your phone's joystick to move your mouse pointer and default OK button on the phone to use as click function, other buttons also working for some key board shortcuts and i was really impressed when some of my beryl features also working well with the remote control. You will be able to conduct your Open Office Impress Presentations very effectively with this feature.

Hope you find this post useful. Have fun...

Monday, March 05, 2007

FOSS-ed On Wheel 2007 in Kandy.


FOSS-ed on wheels is another community service conducted by the Sri Lankan FOSS community. Google, Intel, ICTA, Lanka Software Foundation, The Linux Center, LKLUG (which I'm also is a member in) has backed up the event. This time the organizers was Computer Society, University of Peradeniya. The only different in this event from the other FOSS events is that, We get into a bus and travel across the country to reach people. If any one wish to have an event on your Village, school, University, organize it, inform us bit early, we will do the best to come down to your place.

I joined the event from Kandy on the Saturday the 3rd March 2007, (Day 01). Me, Suchetha, Raj, Mifan, Gayal, Lohitha, Bud, Kanchana, Lasantha, Dr. Nimal and few others (sorry I don't remember the names) were suppose to speak about FOSS and FOSS related topics. And of course many other were there who support in various areas. Crowd was up to the expected level and we had a combination of many categories such as Schools, Universities and general public. I'm happy to say that this was my first speech for FOSS. I was a speaker for Windows and some other proprietary software back at a time.

FOSS-ed on wheels is one of the awareness programs to the public, to educate them that, there are better Free and Open Source Software alternatives to the proprietary software. Which most of Sri Lankans are not aware of. I will come up with a separate blog post regarding that matter. Any way, we did a nice seminar and we are happy. :D
After the event (2nd day evening) on the way back to Colombo we went to Mifan's place at Peradeniya University. It's not that Pera Uni is Mifan's house, his father is a professor in physics, so they are in a quartos in the Uni. Mifan's mom treat us with snacks and a nice tea. Thank You. And you know, guys got crazy on the way back and started singing, shouting,etc in the bus.

After a successful event, we returned home with lot's of fun and of course, with a nice plaque gifted to us by the Computer Society, UoP. Thanks guys.

Monday, December 18, 2006

Ubuntu Edgy and Beryl 1.3

Last Thursday, afternoon, I got a buzz in my IM from Anuradha. And he said “Anu shall we do a small thing? will take only 10 minits”. I was bit free in the office at that time and I've started off with him. he's telling me to edit the /etc/X11/xorg.conf and I'm following the exact steps he's typing in the IM. After a couple of minits (and ofcourse emailing the xorg.conf after edting by Anuradha) I've managed to Install (from Anuradha's repository) and run Beryl window manager with Emerald Themes on my Debain Gnu/Linux (etch) system. And I got pretty impressed with it.

Since I have an Ubuntu Edgy Eft installation on my notebook, I thought of Installing Beryl on Ubuntu too. Wow, very nice and smoothly I've install the Beryl Window Manager and Emerald Themes. I googled to find an ubuntu repository to get the Beryl binaries.

Steps I've followed are below in this post, and it's pretty easy to install Beryl on Ubuntu Edgy. Since Edgy comes with an AiGLX inbuilt xorg, you don't need to edit the /etc/X11/xorg.conf.

My graphic card is Intel Mobile Integrated graphic controller, and the driver is i810.

Take a terminal.

# sudo su -
# vim /etc/apt/sources.list

and put the following line in your list

deb http://ubuntu.beryl-project.org/ edgy main

and you have to get the GPG Key.

# wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -

# apt-get update

# apt-get install beryl

This will install the Beryl Window Manager, but you need the Emerald Theme Manager to make decorate it. ;-)

# apt-get install emerald-themes

This will install a set of thmes. BTW if you find any error on installing these with apt-get, then use

# aptitude install beryl emerald-themes

This will install all the recommended packages.

Then restart the xserver, just to refresh. ;-)

Then at the run command box, type,

beryl-manager

that's it!


Here I have 2 screen shots of the effets, you will enjoy the cool features on this once you have installed it!


















Tuesday, December 05, 2006

NOTICE

This is just a quick notice to all the viewers of my blog. I've got few mails from some freinds through the anonymous-comment@blogger.com ;-) . Thanks for the comments and questions you've asked, BUT I can't reply to some of those who hasn't provided me an email address. So in future, if you want to query about a post, or/and if you wish me to reply you, please add your email with your comment.

Cheers!

Thursday, November 02, 2006

Perfect Mistake

I have heard many of my friends who had erased their Hard Disks by mistake, when installing Linux on to Windows installed computer, etc. But I haven't heard of a friend of mine who have formatted his/her Windows partition when he/she supposed to format a pen drive. But my friends listen; I did that mistake just two days ago. Ye..h I know what you thinking. You think I'm a chronic careless boy. 5% correct. Yes I'm careless, sometimes.

My friend at office, Henry gave his USB Pen drive and asked me to format it. This story have 4 steps and two paragraph.
  1. Hooked in the pen drive to my notebook.
  2. Took a root shell (got the great power)
  3. Entered the command mkdosfs -v /dev/sda1
  4. Confirmed (are u sure? y)
After successfully completing the format, I opened the Pen drive to verify. Humm... data is still in the drive. Good, then what I have formatted? Quickly did a #ls /media/sda1 . No data. Thank you very much.

I did this in my new notebook which has a SATA HD. And at that particular time I was bit busy with some other work too. My Win partition was labeled as sda1. Pen drive was sdb1. One letter mistake. Story Ends.

Next day morning I got out of the bed and ran to the Wash room to start my day. Bath room is the place where I get many great ideas. So same as usual, I got this idea of Quit Dual Booting Win / Linux in my notebook. If I have a Mac Book running Mac OSX (I've seen Windows running on Macs too) Will I use dual boot? Will I install any other OS? No. No. I'll use Mac OS in Mac Book and if I want to use other OS, I'll simply get another PC running that particular OS. So why can't I apply that with my notebook. Do you think I'm still in the wash room? No I came out. (he hee). So I didn't install Windows again in my notebook. Kept my flavor of Linux. Since I'm having two more PCs at home running windows + One Desktop and another Laptop (my good old Toshiba Satellite A50p) at office doing dual boot I'll not miss Windows.

Conclusion:
  1. Some BIG mistakes we do will lead us to a great ACHIEVEMENT.
  2. With great power there must also come -- great responsibility!
  3. Bath room is the best place for you to plan your future. (as far as you are alone in there)
See you in a while.

Wednesday, October 25, 2006

My Phone - GPRS - Bluetooth - Notebook - Internet

I have a Sony Ericsson Z600 mobile phone. I bought it 3 years ago. I had the GPRS enabled in my Mobitel Connection and used my Phone as a GPRS modem, to browse the Internet via my old notebook (provided from the office) using IR port. I did it in Windows, no worries. But after I installed Linux I couldn't configure my IR port and unable to connect to Internet via GPRS. But with my new notebook, Compaq Presario V3000 (Intel Core Duo) I had bluetooth inbuilt. After installing Ubuntu Dapper I gave it a try to connect via bluetooth. Bingo. Succeeded. After lot of Googling, I should say. So for the sake of people who need to connect to the Internet using their notebooks and Bluetooth phones, I thought of blogging my experience on that. You may find many good how to s related to this scenario though.

This is more adoptable for Ubuntu Dapper, but general configurations are same for other Distros too.



Prerequisites

  • Latest 2.6 Kernel.
  • bluez-utils.
  • ppp.
  • openbox.
  • Bluetooth & GPRS enabled phone that can be used as a modem.
  • Bluetooth enabled PC/notebook. (those who don't have an inbuilt bluetooth port can use a bluetooth doungle instead.)
Install software.

$ apt-get update (just to update the packages in the source list)
$ apt-get install bluez-utils
$ apt-get install openbox
$ apt-get install ppp
Take a Terminal and become root (or sudo). I prefer to keep the root privileges rather than sudo. Turn on both phone's and PC's bluetooth service.

Discover the bluetooth phone from your notebook

$ sudo su -
$ hcitool scan

This is my phone's MAC address. You may copy the MAC address because you gonna need it few more times in this process.

00:0F:D9:BC:EA:C0 Dassa.Z600

Now pair your phone with notebook

$ hcitool cc 00:0F:D9:BC:EA:C0
$ hcitool auth 00:0F:D9:BC:EA:C0

You should put your phone's MAC address here.

Now you have to configure your device{modem (rfcomm)}

Get your channel number for your phone's dial up service

$ sdptool browse 00:0F:D9:BC:EA:C0
Check for “Service Name : Dial-up Networking”. And check and remember the Channel number. Mine it was “Channel : 1”

Now edit the /etc/bluetooth/rfcomm.conf
$ vim /etc/bluetooth/rfcomm.conf

Mine it was like this, you should replace your MAC and Channel No.

# RFCOMM configuration file.
# example:
# rfcomm0 {
# bind yes;
# # Bluetooth address of the device
# device 11:22:33:44:55:66;
# # RFCOMM channel for the connection
# channel 1;
# # Description of the connection
# comment "Example Bluetooth device";
#anuradha edited this.

rfcomm0 {
bind yes;
# Bluetooth address of the device
device 00:0F:D9:BC:EA:C0;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "Bluetooth Dialup";

Save and close frcomm.conf file.

Please note; I always keep the original file and work on a copy of that. Since I'm also a new linux guy, probability of going things wrong is very high.

Now create a peer file. This will create the peer to peer connection with the Notebook and phone.

$ vim /etc/ppp/peers/BluetoothDialup

connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
/dev/rfcomm0 115200
defaultroute
crtscts
lcp-echo-failure 0
#=======
/dev/rfcomm0 115200
connect '/usr/sbin/chat -v -f /etc/ppp/chat-gprs'
crtscts
modem -detach
noccp
defaultroute
usepeerdns
noauth
ipcp-accept-remote
ipcp-accept-local
noipdefault

This is how my peer file looks like.

Now you need to create a chat script for the connection.

My /etc/chatscripts/BluetoothDialup file look like this.

TIMEOUT 40
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
OK 'AT+CGDCONT=2,"IP","wap"'
OK ATD*99***1 #
CONNECT ""

Note: You have to replace the “wap” with your APN, and ADT number with your service provider's dialing number.

There is another thing to specify here, if you are using a PIN (pass key) to pair bluetooth devices you need to create a file containing the pin. I use a pin and I created that file as below.

$ vim /etc/bluetooth/pin

1111

This is a sample, you have to put your pin number here.
save and close.

Check whether you have a user that have the privileges to use the modem, else create a user that have the privilege.

$ adduser username dialout

Now get connected. Brows the Internet.

$ cd /etc/chatscripts
$ pon BluetoothDialup

Note: Some times you might get an error related to proxy server, if that problem showed up, go to edit – Preferences, under General tab go to Connection Settings... Select Auto Detect Proxy Settings for this Connection. Then give it a try.

After surfing, you have to close the connection.

$ poff BlutoothDialup

It's always good to close the peer connections too.
$ /etc/init.d/bluez-utils stop

Good Luck!

For me this setup was suitable. But what I have experienced is, sometimes one person's settings will not 100% suite for another one. I used several howtos to get my work done. This is the set of settings which worked for me. Can't say this will work for you too.

Monday, October 23, 2006

Hello... How are you?

After a little bit busy but enjoyable two weeks in AIT, Thailand I returned home on 2nd October. Well... I should say something about AIT. Asian Institute of Technology, is one of leading Institution / campus which mostly provide Master and Ph.Ds. If any one of you wish to follow a master's degree in Engineering or any other field, and if you wish to follow it in a South Asian country, I like to suggest Asian Institute of Technology without a doubt. Even though I'm a GNU/Linux Lover I went through the course without a problem. I played around a lot with Windows Server 2003 two years ago. Actually Win Server 2003 was in beta those days. I have created Intranet/s, Domain Controllers, Web Servers, etc, with Windows. But after I got my self into GNU/Linux I changed my Web Sever OS from Win Serv 2003 to Linux. I'm not going to stick in to one OS or Platform, but I will use Linux and Open Source Solutions at my work as much as possible. Because Linux created a new chapter in my life, and I like the freedom which comes with it.

Humm,.. after my last post again I was silent for a while. Actually I was off line for the last two weeks. I got married. Shocked? don't be. it's a normal step in our life cycle. I also have completed that step. I have realized about human life cycle, a long time ago. Birth, spending the life and death. We say “SPENDING” the life, why we say spending? Think for your self. You spend it, you never get it back. The time you passed is past, we can't drag it back. So we should live this moment joyfully, and harmless to others, and helpful to others and to the society. And not to forget to love your love ones. Life has no UNDO s like computer applications, But life have REDO s. You can repeat the good things you did through out your life.

See you all in a while...