Dec 23, 2008

සින්හලෙන් බ්ලොග්..

මම කලින්  හිතුවේ යුනිකෝඩ් එක්ක හරඹ කරලා සින්හලෙන් බ්ලොග් එකක් ලියන එක ටිකක් විතර අමාරු වැඩක් කියලා. ඒත් දැන් UCSC එකේ මෙන්න මේ වැඩේ නිසා දැන් සින්හලෙන් බ්ලොග් එකක් ලියන එක එච්චර අමාරු නෑ.

UCSC එකේ මේ උත්සාහය නම් ඉතාම සාර්ථකයි.  :-)

Dec 22, 2008

How to increase the java stack size

Some times you might end up with a stack overflow Error. This is caused by the creation of larger data structures under the threads of execution. Sometimes the program logic may require a larger data structure for the functionality of it. But there can be growing data structures due to an error in the logic. In both these cases, if you go with the default stack size, then the probability of hitting an stack overflow error is high.

If your program really needs an extended stack, (not becuase of an error in the logic) then following option will increase the stack size.
java -Xss1024k MyProgram

The above command will increase the stack size of java upto 1024 KB.

The default java stack size is 400k, with a minimum value of 1000 bytes.It is possible to specify the amount using the MB as well. Use 'm' instead of 'k'  as given below.
java -Xss1m MyProgram

Dec 18, 2008

How to Switch back to Mozilla Firefox 2 in Ubuntu 8.10

With the increased frequency of crashes of FireFox 3 in Linux, I thought of switching back to good old FF 2. Ubuntu 8.10 is shipped with FF 3, and luckily there is a method to keep FF 3 and install FF 2 in the same machine without any conflicts.

I am listing down the steps I followed and the original source that I referred can be found here.

First you need to modify the source list, so that it refers to the package sources of Ubuntu Gusty. Before changing that do not forget to keep a copy of the current sources list. Following command will make a copy of the current sources list and save it as sources.list.backup
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

Now start modifying the content of the original sources.list.
sudo gedit /etc/apt/sources.list

Now replace the content of this file with the following list
deb http://archive.canonical.com/ubuntu hardy partner
deb http://br.archive.ubuntu.com/ubuntu/ hardy main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted
deb http://br.archive.ubuntu.com/ubuntu/ hardy-updates universe main multiverse restricted
deb http://packages.medibuntu.org/ hardy free non-free

Now get a update and install FireFox 2
sudo apt-get update
sudo apt-get install firefox-2

Once the above commands are successfully completed FF2 will be installed and it will be ready to install. But changing the package sources to an older version will make the system unstable. So replace the modified sources list with the original one.
sudo mv /etc/apt/sources.list.backup /etc/apt/sources.list

Now get a update for the package sources.
sudo apt-get update

Now the FF 2 is installed without any conflicts with FF 3.

screenshot

Dec 9, 2008

SMPlayer - A Cool media Player for Linux

Recently I got to know about the SMPlayer, which is an extended version of MPlayer. It has distributions for almost all the operating systems.It is feature rich and it has a descent look compared to the other media players available for linux.

smplayer

You can easily install SMPlayer using "apt". Following is the set of instructions to install it on Ubuntu.

  • Just add one of the following lines to your /etc/apt/sources.list, according to your version of Ubuntu:

  • 8.04 (hardy):
    deb http://ppa.launchpad.net/rvm/ubuntu hardy main

    8.10 (intrepid):
    deb http://ppa.launchpad.net/rvm/ubuntu intrepid main


  • Try "sudo apt-get install smplayer"



Enjoy...!!!!

Dec 8, 2008

Have you experienced difficulties in playing videos on Ubuntu 8.10 ?

Sometimes you might have noticed that when a video is played on Ubuntu 8.10, it is playing with some frames missing and it starts flickering.
Recently this happened to me, I tried different players and tried reinstalling codecs and the VGA driver. But it did not solve the problem. After searching in the web, I found this thread and of course it had the solution I was looking for.

http://forum.notebookreview.com/showthread.php?t=322923

This happens because of Compiz, and you should disable it if you value watching movies over the visual effects. ;-)