Archive for February, 2007

SCIM – Installing Wijesekara Sinhala Input in Ubuntu Edgy

Guys at the LKLUG has done a great job regarding the sinhala support for linux. Not only they designed a new open source font, they have also coded the rendering engine and an input method. To enable sinhala support just follow the guidelines in http://sinhala.linux.lk/.

However, the default input method is a phonetic based one which is really good if you have no experience in sinhala typing. But since I’m pretty much familiar with the wijesekara keyboard, I wanted to go for it. The SCIM itself doesn’t have a wijesekara input driver. First thing I had to do was installing m17n. I just apt-get the package and it worked. Then, I re logged into linux, there were plenty of languages in SCIM. So, I choose m17n-si-wijesekara. It’s fine but there were quite a lot of errors. So, I downloaded the development version of the keyboard from http://cvs.m17n.org/viewc…..b/si-wijesekera-preedit.mim. Then I copied that file to /usr/share/m17n/ and restarting the Xorg got me the nice wijesekara keyboard.

Here are some screenshots :

Chat with Nuwan

Chat with Chathu.. lol..

Tags: , , ,

My Life so far

It’s about 20 years, hell of a lot of time has passed. I was just looking back on my life, and my mind was filled by thoughts. Were those thoughts of a coder? I don’t know, but as a matter of fact, It’s how I think!

Age 0 – 5 :

Usually, people says it should be 1 – 5, but as programmers, we should always start counting from zero ;-) . lol… never mind.. It’s blackout. I can’t remember much about my very young ages.

5 – 10 :

Let me tell you, either I was playing games on dad’s network, or I was on a tree with my brothers. Yeah, I can still remember I spent half of my life climbing trees, and I finished all the outstanding games on those years, Wolf3D, Prince of Persia, etc..

10 – 15 :

This might be my first step to the real computer world, coding.. Started with writing small batch files in DOS. Then VB, VB Script, HTML, Javascript. And other than programming, I was doing few graphics, like 3D Max.

15 – Now :

I started going IOI. Learned many other programming languages including Pascal, C, C++ and also Assembler. Learned many algorithms and implementation skills got very high compared to earlier ages. Switched to linux as the primary OS. Started hacking and cracking. Started open source development. and much more other things. Meanwhile, did science days/astrology days at school. This might be the golden era of my life.

Let’s just wait for another few years, well of course only if I’m alive :P .

Another eye candy gadget to my linux box – Installing Cairo-Dock/Gnome-Dock in Ubuntu Edgy 6.10

After install all those eye candy stuff, beryl, gdesklets and everything else, it looked quite nice. Amazingly, there weren’t any memory killers or frequent crashing apps. However, there is no doubt that apple Mac OS was/is the best eye candy OS ever. I don’t have to tell you that one of the most appealing applets is the icon doc at the bottom of the screen. So, since lot of people have their eyes on this, those are ported to many platforms (rather recoded not ported).

Now, It’s time for me to go for something instead of modeling the gnome panel itself. cairo-dock, it’s my choice. Installing cairo-dock quite easy if you have all the development libraries. There is no need for me to explain all the steps there – Just follow this link : http://ubuntuforums.org/showthread.php?t=302570. He has explained it step by step. The installation/compilation will go smoothly.

However even after you compiled the application, unfortunately there will be some errors. The first one is icons. Probably, what you’ll get will be some blank icons. The SVG files inside the tar ball doesn’t show up correctly. You might be already knowing that SVG files are text files. So, what you have to do is open the icons in ‘vi’ or ‘gedit’ or whatever, then just look at the source of the image. Most probably around the bottom of the file, there will be a link to a PNG file. Actually there will be two links linking to the same file. Just change the link to a valid path for a PNG image. Then you are ready to go.Recompile the application, then just run it. Then with any luck you’ll see the icons ;-)

Ah! I forgot to tell you about changing the icons/launchers. You have to change the g_aIcons array. It’s at the beginning of the file. The first parameter is the image, then the Text displayed, and finally the command. Make the display text as short as possible, otherwise those will overlap with each other and it’ll look kinda fuzzy or more to the point ugly.

After all things you have a working cairo-dock. Then the next step is to add it to the startup. I used the gnome session control panel, but however since I’m also loading beryl at the startup, cairo-dock used to crash. So, I removed this from the startup, and changed the beryl loading script(Look at my beryl installation post). So, the final script looks like this.


#!/bin/sh
beryl-manager
sleep 7
beryl&
sleep 7
/media/sda5/Software/cairo/cairo-dock/start-cairo-dock.sh

Now try restarting the Xorg, it’ll work like a pro. Even, it works as it should be, there are few problems regarding this. I usually use Alt + F4 to quit applications. So, when I keep quiting applications, if I pressed one more additional Alt + F4, damn… the cairo-dock will get closed and also if you pressed the “Show Desktop” button the cairo-dock will get minimized.

So, what do we do now? Don’t worry I have a small(small as in very small) hack to get rid of that problem. Open cairo-dock.c in vi(or whatever). Search for “gtk_window_new”(There is only one instance. It’ll be around the line 1180-1190). Change the second parameter of the function to “GTK_WINDOW_POPUP”. So, the line should look like this :


pWindow = gtk_window_new (GTK_WINDOW_POPUP);

Then, recompile the code and restart the dock. And finally you have another cool gadget to impress the people :D .

Tags: , , ,

New ALSA Drivers(1.0.14rc2) for Intel-HDA

When I installed linux on my laptop, sound card worked satisfactorily(when compared with most of my friends’ laptops) at the first try. However, compared with windows, the sound volume is very low, and the internal mic is not working.

So, today I downloaded ALSA drivers(1.0.14rc2), compiled and installed. Wow! not only the mic is working, but also the volume level is damn good. Except just compiling and installing drivers I had to append ‘options snd-hda-intel model=laptop’ line to /etc/modprobe.d/alsa-base. Then restarting the computer solved all problems with sound.

Tags: ,

Enhance Apt-Get downloading using an external download accelerator(axel/prozilla/aget)

The Apt-Get in debian systems use their own downloading system to download packages from the internet. It supports file resuming and pipelining. However, it doesn’t support downloading using multiple threads, and it won’t allow you to external applications to download.

However, the http downloader is a separate application(/usr/lib/apt/methods/http) from apt-get, and the apt-get spawns the executable to download the files. Those two programs communicate via stdin and stdout. I have written a new downloading application which can communicate with the apt-get. So, I just copied the executable to /usr/lib/apt/methods/http. The new application spawns another program(In my case a shell script) with two arguments; the url and the local file.

So, after all my shell script calls a python script. My program doesn’t call the python script directly because when the python scripts gives some output to stdout/stderr the apt-get program crashes. So, my shell script redirects the all output to /dev/null. Then, the python script will get the url, do a HEAD request, get the file size. If the file size is less than 100K, it’ll execute wget, if not it’ll execute axel. So, the files will get downloaded and apt-get will install the software.

The apt-get update command fetches many small files from the same server. Since the original downloader uses pipelining, it’s much faster. I have to modify my code to do something about pipelining.

Files :

scripts.tar.gz

apt.tar.gz

Tags: , ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes