Upgrading JavaHL on Ubuntu

October 31, 2012 1 comment

Subclipse Eclipse plugin requires JAVAHL 1.7 or later. You may have encountered this error : Incompatible JavaHL library loaded.  1.7.x or later required, and now want to install the upgraded version. Luckily, there is ppa, created by Dominic Stadler that you can add in your repositories. Add sudo if you are not logged in as root.

now, delete your previously installed livsvn –

apt-get purge libsvn-java

Use the following command to add this in the repository:

add-apt-repository ppa:dominik-stadler/subversion-1.7

After that, update your repository and install

apt-get update

apt-get install libsvn-java

Cheers :). You may also need to add following line in your eclipse.ini after -vmargs line. Normally, it should be in /usr/lib/jni location, but if it’s not then you can use find / -name libsvnjavahl-1.so to find the exact location.

-Djava.library.path=/usr/lib/jni 

Advertisements

Installing NS-3 in Ubuntu 12.04

September 11, 2012 47 comments

I like to write things down for myself. I am not working with NS-3 these days but if you have more questions, please  refer to the detailed installation guide from the NS website.

If you are reading this post, then I presume you already know what NS-3 is. I have followed the following steps to install and configure NS3 in Ubuntu 12.04.

Open a terminal and run the following commands to install the list of required packages (you may not need all the packages):

sudo apt-get install gcc g++ python              
sudo apt-get install gcc g++ python python-dev
sudo apt-get install mercurial
sudo apt-get install bzr
sudo apt-get install gdb valgrind
sudo apt-get install gsl-bin libgsl0-dev libgsl0ldbl
sudo apt-get install flex bison libfl-dev
sudo apt-get install g++-3.4 gcc-3.4
sudo apt-get install tcpdump
sudo apt-get install sqlite sqlite3 libsqlite3-dev
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install libgtk2.0-0 libgtk2.0-dev
sudo apt-get install vtun lxc
sudo apt-get install uncrustify
sudo apt-get install doxygen graphviz imagemagick sudo apt-get install texlive texlive-extra-utils texlive-latex-extra
sudo apt-get install python-sphinx dia
sudo apt-get install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev
sudo apt-get install libboost-signals-dev libboost-filesystem-dev
sudo apt-get install openmpi*
 

You can either download and build development version or get a tarball directly and untar it.  I would recommend you to choose the second option initially.

Option 1: Using Mercurial

cd
mkdir repos
cd repos
hg clone http://code.nsnam.org/ns-3-allinone

Option 2: Downloading NS-3 using a tarball

cd
mkdir tarballs
cd tarballs wget
http://www.nsnam.org/release/ns-allinone-3.13.tar.bz2
tar xjf ns-allinone-3.13.tar.bz2
 

To build your NS-3, run the following command:

./build.py

Configuration with Waf:

./waf distclean
./waf configure    // (or use this > ./waf configure –enable-examples –enable-tests)
./waf build

Now, test your installation using:

./test.py   // or use this ( if you want to test core modules only) > ./test.py -c core
 

Get ready to run your  program. You need waf (a python based framework designed for configuring, compiling and installing applications). Use the following command to run your program:

./waf – -run filename

Your program must be in /scratch directory, because when you run waf they are build at the same time. For example, I am copying a myfirst.cc from a example directory to scratch directory to run the program. Go to your ns directory and run the command to copy, configure and run:

 
cp examples/tutorial/first.cc scratch/myfirst.cc
./waf
./waf –run scratch/myfirst

If you do everything correctly, you should be able to see the following in your command line.

Waf: Entering directory ‘/home/user/repos/ns-3-allinone/ns-3-dev/build’
Waf: Leaving directory ‘/home/userrepos/ns-3-allinone/ns-3-dev/build’
’build’ finished successfully (1.175s)
Sent 1024 bytes to 10.1.1.2
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.1.2

If you have something to visualize run the command : ./waf –run scratch/your_program –visualize, and to plot your output use: ./waf –run scratch/your_program | gnuplot

Cheers 🙂

 
 
 

Xorg and Gnome Installation in FreeBSD 9

I know it’s hard for most of you who are new to FreeBSD 9, and still struggling to get the graphical user interface. Don’t worry, just follow the following steps carefully to get what you desire for. Make sure, you are logged in as a root user.

  • Add dbus, hald, and gnome to /etc/rc.conf file. Just append the following lines at the end of your  file.

gnome_enable=”YES”
dbus_enable=”YES”
hald_enable=”YES”

  • Type sysinstall and press enter.
  • Select Configure>Packages>CD/DVD
  • Select Gnome and select all packages
  • Select X11, and select all packages
  • Press Install Button
  • Reboot and see the magic !

 

 

Categories: FreeBSD Tags: , ,

How to use a guest OS installed on Windows 7 – VirtualBox to another VirtualBox – Ubuntu

If you bumped into this post somehow, that means you really really want to use a guest operating system installed on your host operating system (i.e. Windows 7) using VirtualBox to another installed VirtualBox on different host operating system (i.e Ubuntu).

The process involves the following steps:

  1. Run VirtualBox in windows 7
  2. Select File Menu, and click Export Appliances
  3. Choose your desired guest operating system that you want to use.
  4. click next to create a ovf  (Open Virtualization Format) of your guest os.
  5. Now, copy your guestos.ovf file to Ubuntu and run VirtualBox.
  6. Select File Menu, and click Import Appliances
  7. Select guestos.ovf file and click next.
  8. Boom ! You got it !

Cheers !

Install VirtualBox in Ubuntu 12.04

September 10, 2012 1 comment

Installing VirtualBox in Ubuntu 12.04 is very easy, and what you need to do is to run the following commands in your terminal.

Open your terminal, login as  root, and run the command below to update your system:

apt-get update

After that, run the following commands to add VirtualBox repository’s key and VirtualBox repository in Ubuntu:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add –
sh -c ‘echo “deb http://download.virtualbox.org/virtualbox/debian precise contrib” >> /etc/apt/sources.list’

Now, you are ready to install VirtualBox in your system using the following command:

apt-get install virtualbox-4.1

Enjoy your installed VirtualBox to load and run Guest Operating System  in it’s own virtual environment.

Trip-to-Kaptai – We danced, we sang, and we explored together

Writing down my favorite things has always been difficult for me. If you ask me, what is your favorite movie? I wouldn’t be able to point out that is truly my favorite. I have traveled a lot in my life, both in Asia and Europe. Not surprisingly, I wouldn’t be able to identify one trip that I could consider as the best one in my life. Despite the fact that I am bad at pinning down my favorite things, I finally dare to write up something about Study-Tour-to-Kaptai.

 I was not especially excited about this study tour. I chose to attend this tour because I believe, being there would give me an opportunity to explore Kaptai in a different way with my colleagues and students. Also, it would allow me to get a chance to know each other very well.

On Friday, January 14, at 12:00 am, finally the blissful journey began with the introductory speech from our eminent Akhter Sir.

Listen to me ladies and gentlemen – we are ready to leave

The Train

The ecstasy began when the train started to leave everything behind with its monotonous poo-jhik-jhik sound. I along with other faculties were listening to students cacophony while standing in front of their compartment. The song that gained my attraction was “Why this Kolaveri di” (sung by some of my students) which in fact forced me to believe that this song is worthy to listen. Thanks to those singers who made the journey melodious by singing the so-called flop song of the year.

Riaz sir, with a strange look, “does this song really exist?”

The Game

Very few people in this crazy world get a chance to teach their boss/seniors. Surprisingly, I am the lucky one. Correct, you just read my mind.  I got a chance to teach 29 (card game) to our Akhter sir. Guess what, he grabbed it pretty quickly and became one of my finest students by beating our opponent for three consecutive rounds. And, the game continued…

Midnight Round

No, seriously, it’s a midnight round not mid-noon.  We were going to pay a courtesy visit to our students.  The effrontery of Mousum was the most interesting part. His aberrant attitude duped most of the teachers and students to pay money.

Mousum at his best.

A tour without dance and songs wouldn’t be considered as a complete tour. Not surprisingly, Akhter sir took the initiative and changed the ambience by forcing students to dance with us. As a result we came to see some good dancers – Adib, Faysal, Adhity and Sajib. Albeit I wanted to dance, but I couldn’t dare because of their “Chammak Challo” type songs (doesn’t go with my image).

Faysal and Adib dancing – Chammak Challo 🙂

Scenic Drives

The next day, after having our breakfast from the renowned Hotel Zaman of Chittagong, the scenic drive to Kaptai started. I would recommend you to go for a drive there – at least once in your lifetime to see the real green Bangladesh. Special thanks to Anondo Sir (KB) for showing us the Karnafuly Paper Mills where the papers get produced. It was so much fun to see the papers producing, which I had read in my childhood. After that, the scenic drives continued till we reached the next spot (Zoom Restaurant). A recommendation again, you should spend your entire day there because after visiting the place, just one word came from my mind, that is “Masallah”.

Zoom Restaurant and Karnafuly Paper Mills

Picnic Spot

Finally, the most awaited picnic spot has come, and we paid a courtesy visit to the regional Navy Headquarter. Visit to the Navy headquarter was special to me, because they showed us the natural beauty of Kaptai by their boat, which in fact fulfilled one of my dreams – a journey by bus, train and boat altogether at the same day.

Picnic Spot

The cultural show began and we saw some tremendous performances from our students. The part that I would remember for my entire life, was Sayef’s pathetic attempt of mind reading of teachers (specially my one). A fantastic poem from our lovely poet KB sir cheered us for the next event. The picnic ended with a DJ from one and only DJ FISA.

The next day, I woke up very early again. We were waiting for the train to stop at Kamlapur. As you can imagine, I was really tired—but I had to go to office for work!

Study tour to Kaptai was truly a special one for me — not because of the places or even because of the journey, but because of the precious time I spent with my wonderful colleagues and students.

Thanks for reading !!

Lyrics of Baka Nodi/Paban Das — বাঁকা নদী/পবন দাস

Special Thanks to Ferdous Alam (my friend) for this lyrics. যদি কেও কোন ভুল থাকে, তবে অবশ্যই জানাবেন ।।

♪♪ বাঁকা নদী/পবন দাস

এক ব্যাটা মাথা কাটা
বল্‌ শালা মালসা চাটা
কামাই নাই রাস্তা হাঁটা
দাদুর খাটা ভাদর দড়’এ

এক ব্যাটা মাথা কাটা
বল শালা মালসা চাটা
কামাই নাই রাস্তা ঘাটা
দাদুর ঘাঁটা ভাদর দড়’এ

তার বিল গাবানো স্বভাব বটে
তার বিল গাবানো স্বভাব বটে
ঢিল পেয়ে ডুব মারে ঘাটে
তার বিল গাবানো স্বভাব বটে
ঢিল পেয়ে ডুব মারে ঘাটে
নীল করে সে ষাঁড়ের পিঠে
কিল মারে বাবা শিবের ঘাড়ে

কি মজা দেখলাম রে
এসে এই বাঁকা নদীর ধারে(২)

আর এক কথা সুধাই যখন
মেয়ে দীর্ঘ নিঃশ্বাস ছাড়ে তখন
আর এক কথা সুধাই যখন
মেয়ে দীর্ঘ নিঃশ্বাস দীর্ঘ নিঃশ্বাস ছাড়ে তখন
নদীর জল শুখায় তখন(২)
ঢুকায় রাখে পুত আমারে

কি মজা দেখলাম রে
এসে এই বাঁকা নদীর ধারে(২)

জলে’তে জ্বলছে আগুন
তার রা তে দগ্ধ বেগুন
আকাশে উড়ছে সুদূর
ময়না নামে কো ভাগাড়ে
হরিনারায়ণ তলিয়ে গেল(২)
গলিয়ে মাথা বেড়িয়ে এলো
এলো সে এলোমেলো বাঁকা নদীর মাঝবা খানে

কি মজা কি মজা দেখলাম রে
এসে এই বাঁকা নদীর ধারে
কি মজা দেখলাম রে
এসে এই বাঁকা নদীর ধারে
কি মজা দেখলাম রে
এসে এই এসে এই এসে এই বাঁকা নদীর ধারে
এসে এই এসে এই বাঁকা নদীর ধারে।