Running AIGLX and Beryl on Debian

After seeing some eye candy on Bud's desktop last Sunday, I wanted to try AIGLX and Beryl on my Debian Etch notebook. To get a preview of what this is all about, try searching for "aiglx" and/or "beryl" on YouTube or Google Video. Debian Etch now has xorg 7.1 with built in AIGLX, so there was no need to install anything. I "enabled" AIGLX by following "Prerequists", "xorg.conf" and "AIGLX" sections of this blog entry. Just that easy! Here are some important sections of my xorg.conf file. My video adapter is a Radeon Mobility 7500 on an IBM (not Lenovo) Thinkpad R50. IMPORTANT: This is not the complete xorg.conf file!

Section "Module"
  Load    "bitmap"
  Load    "dbe"
  Load    "ddc"
  Load    "dri"
  Load    "extmod"
  Load    "freetype"
  Load    "glcore"
  Load    "glx"
  Load    "int10"
  Load    "record"
  Load    "type1"
  Load    "v4l"
  Load    "vbe"

Section "Device"
  Identifier  "Radeon Mobility 7500"
  Driver      "radeon"
  Option      "RenderAccel" "true"
  Option      "backingstore" "true"
  Option      "EnablePageFlip" "true"
  Option      "AGPMode" "8"
  Option      "AGPFastWrite" "true"
  Option      "XAANoOffscreenPixmaps" "true"
  Option      "AllowGLXWithComposite" "true"

Section "Screen"
  Identifier  "Default Screen"
  Device      "Radeon Mobility 7500"
  Monitor     "Generic Monitor"
  DefaultDepth    24
  SubSection "Display"
      Depth       24
      Modes       "1280x1024" "1024x768"
  Option "AddARGBGLXVisuals" "True"
  Option "DisableGLXRootClipping" "True"

Section "DRI"
  Mode    0666

Section "Extensions"
  Option "Composite" "true"

Then I installed Beryl 0.1.2 by using the DEB packages by following this link, started KDE and ran "beryl-manager". Everything started working as expected! Then I wanted to upgrade to 0.1.3, but couldn't find any DEBs around. So I built some myself using the distro specific build files provided by the good Beryl developers. Thanks! You can get my Beryl/Emerald 0.1.3 packages for Debian Etch (without XGL support) by adding this line to your sources.list file:
deb http://www.linux.lk/~anuradha/beryl/etch/ ./
and installing "beryl" and "emerald-themes" packages. The latter is not installed automatically when installing the "beryl" package. Here are some insteresting things to try:
  • Press left/right arrow keys with ctrl and alt.
  • Press ctrl and alt and drag the mouse.
  • Open few windows and move the mouse to the top right corner (Mac users will scream at this ;-)).
The sad part is that none of these work on my FVWM Crystal desktop. :-(



Sri Lankan Photography Group

Flickr photostreams with tags `lanka' (latest / interesting) and `sri lanka' (latest / interesting) indicate that the tropical island has always been a heaven for photographers. Now there is a Google Group to "discuss photography in Sri Lanka (locations, tips, equipment etc) and share pictures".



Canon announces EOS D400

Canon yesterday announced the successor to its popular EOS 350D consumer SLR, commonly knows as the `Digital Rebel XT'. It is likely to compete with Nikon's recently announced D80. However, Canon's pricing of the new camera at 800$ is more attractive when compared to 1000$ of the Nikon D80. See Canon EOS article on Wikipedia for more details on the EOS series.




Last year, we organized a successful week of FOSS activities, and we decided to make it an annual event. This year, we named the whole week to be `FOSSSL 2006', as opposed to FOSSSL being one of the events during the 2005 FOSS Week. The events of the week were FossCode, FOSSSchool, ApacheCon, FOSSEnterprise and Geekout. FOSSCode was organized in a similar manner to Google Summer of Code. I was mentoring Mahangu's project for Taprobane. Five more students took part implementing various projects. FOSSSchool, held at the University of Moratuwa, was for introducing FOSS to students. Morning session was for schools and the evening session for university students. I did an introductory session in each. Interestingly, I had to make the one in the evening more `serious' as the students already had a good understanding of what FOSS is. Ken Coar had already arrived, but as a bomb off targetting a Pakistani diplomat, we suggested him to stay at the hotel. However, all the other speakers turned up as planned. The ApacheCon was the first of its kind in Asia. The participation was over expectations. A `Hackerthon' also was held along the conference. The last confernce-like event was the FOSSEnterprice held at WatersEdge. The sessions were moderated, 15 minutes each, and a panel discussion followed each 3 sessions. I followed James Clark on FOSS evaluation, and Bud was the other panelist in our group moderated by Ken Coar. On Friday evening, we left Colombo for the Geekout. I will post seperately on that. :-)



Jeep Outdoor Quest

The 4x4 Club of Sri Lanka and Dimo Lanka jointly organized a unique outdoor sports event at Waters Edge on the 16th. This was different from the "usual" 4x4 events as it included three stages - cycling, rowing and driving. 2006-07-jeep-event-021.jpg Me, my brother and Anuradha Weeraman were at Waters Edge by around 8:30. The climate was very sunny and bright. Soon it became very hot, but Waters Edge is much closer to the nature than the rest of the city with lots of greens and water, and the effect of the bright sun was not that bad. Also, it was much easier to take sharp photographs with lower shutter speeds. I had borrowed a Fuji FinePix S5100 from a friend, as my Canon was no longer working. Its 10x optical zoom proved to be very useful. The first stage of this outdoor triathlon was to to cycle round the lake. The course was somewhat "off-road", but not difficult. Lanka Sportreizen had provided mountain bikes and other cycling gear. 2006-07-jeep-event-030.jpg The second stage turned out to be diffult for competitors who were new to rowing. Some teams already had rowing experience while some others quickly got the hang of it. But there were still a few teams who found it extremely diffult to get the steering right, including one team whose canoe went all over the lake... :-) An organization in Kitulgala had provided the boats (can someone please update me of the exact name?). Lifeguards were also on the alert, but no incident happened for them to take action. 2006-07-jeep-event-024.jpg We were mostly interested in the third stage. Two Jeep Wranglers were provided by Dimo. Both were equiped with automatic transmission (yuk) and powerful 4l straight-6 petrol engines. The co-driver of each team was supposed to hold a 2 letre jar of water and each mililetre spilt reculted in reduced points. Therefore drivers had to be very mild in maneuvering. Obviously Dimo didn't want their new Wranglers to be harshly handled... :-) 2006-07-jeep-event-003.jpg The course was nicely laid out, but not very difficult nor challenging when compared to usual 4x4-only events. Most notably, the presence of mud was limited to one shallow crossing. I'm sure it should have been loads of fun for the participants, but after some time, it became a bit boring to watch. So we started checking out various Jeep models parked for observation including Commanders, Charokees and Grand Charokees in addition to another Wrangler. The event was good in general and unique, and we had a good time. Photos are in my flickr gallery as usual.



4x4 at Nuwara Eliya

The Four Wheel Drive Club and the Nuwara-Eliya Motor Sports club organized the anual off road challenge on the 17th of April at Nuwara Eliya. We (me and my brother Sanjaya) missed the last similar event organized by the Land Rover Owners club at Waters Edge, so we were very keenly looking forward to this one. And we also made arrangements to provide a live update of photos over the Internet. We drove to have a look at the driving range in the late evening of the 16th. Some members of the club were doing final preperations. We had a brief survey of the area with the dim streatlights from across the lake, and returned to my uncle's place where were were staying. 2006-04-ne-4x4-0004.jpg We got to the rally area at around 8 next morning. A long row of "jeeps" were already lined up. The climate was sunny and bright, but the general trend was to rain in the evening. We also met Asantha, our friend in the 4x4 club, who hooked us with Lasantha, the DJ of the event, and we could share the electricity supply with him. Lasantha was very talented at his job, and was always willing to give us a helping hand throughout the event. I connected the laptop to the Internet through GPRS/IR using the IR drivers in the Linux kernel, irda utilities and GPRS Easy Connect. The connection was not very fast, but satisfactory. The Flickr plugin in KIPI used by Digikam was a very convenient way to upload images. Sanjaya Sanjaya was taking photos, and I was uploading selectively as they arrived. It was difficult to capture all the interesting things hapenning all over, so he ran from one place to the other, and back again, and so forth. 2006-04-ne-4x4-0215.jpg My Canon PowerShot A70 was faulty, so this time we had borrowed a Fuji (don't remember the exact model) from a friend. It was also not an SLR, but had a 10x zoom which was very useful. We had two memory sticks, and could swap them without keeping one of us waiting for the other. By the way Sanjaya's photograph shown here was taken on the next day, as the ones I took during the event was not very clear. :-( 2006-04-ne-4x4-0073.jpg The morning continued to be bright and sunny, and the event progressed merrily. The obstacles were of varying degrees of difficulty, and carried points accordingly. Sanjaya was worried that still photos didn't capture the dramatic effects in clearing them. For example, a Nissan Patrol, which was doing really well, was airborn for a second or so at an unexpected moment, and Sanjaya found himself too late to capture it while in the air. A video, on the other hand, whould have done justice in capturing everything that came to pass. 2006-04-ne-4x4-0158.jpg By early afternoon, the sky started getting darker, and eventually rain set it. The organizers first decided to select the "top 10" from the already finished obstacles and hold a timed event, but later that plan also had to be cancelled. We stopped uploading images and started wondering around to see closely how the competitors were showing off "freely" on the track. 2006-04-ne-4x4-0340.jpg And what a showing off it turned out to be! The attaction was a muddy hole. One after the other, competitors started attempting to clear it in different ways. Some were successful, and some weren't, and the (friendly) reaction of the audience was in compliance with the outcome of each attempt. ;-) Slippery conditions in the middle of rain added another layer of difficulty, but the sheer courage of the competitors was amazing. By late evening, we remembered that both of us didn't eat nor drink anything for the whole day and hunger and thirst started setting in. So we decided to return home at around 6 in the evening, and had a refreshing meal. After a short nap, we started to drive to Colombo at around 9. Then we had the last, and the worst, adventure of the day. Our petrol tank was far from empty, but we knew that we can't make it to Colombo with what was left. So we wanted to fuel the Jimny as soon as possible before it becomes a crisis. But the gas stations in Thalawakele, Kotagala and Hatton were all closed, and the matter was alowly becoming a crisis. By about Ginigathhena, we could travel only about 10-20 kilometers more before we start going on the reserve. So we had to make a decision. We knew that the distance from Ginigathhena to Nawalapitiya was 12km, and we would definitely make it to Gampola from there. But if we can't find petrol in Gampola, then the journey from there to Peradeniya, where Sanjaya was certain that we can find the gas station to be open, was a risky one. But we decided to take the risk. We also first tried to contact some friends in Gampola to find a bit more petrol to reduce the risk, but later decided not to wake them late in the night. And we were lucky. We could reach Peradeniya, and the gas station was open. And it was around 3 in the morning when we finally reached our lodgings in Colombo. Images Sanjaya captured during the event are available on my flickr gallery.



Look ma, it's a leopard!

I always hated visiting the zoo. It is quite depressing to see caged animals, who otherwise would be freely wondering in their favourite habitats. Once Chamindra also mentioned that he doesn't visit the zoo for the same reason, so I am not alone nor sick... ;-) And there are better alternatives to see `real' animals, if watching National Geographic or Discovery channels is not what one wants.

Last month I realized that I had greatly underestimated those jungle trips that are commonly known as `safaris' when I was a part of four safaris during a trip to Yala organized by Virtusa's Global Enterprise Business Unit.

More than fifty Virtusans and their family members joined the trip. Punctuality was remarkable, and we could start early on the 24th as planned. Except for a few who joined later at Yala, everyone traveled together in a huge Fuso bus whose phenomenal pulling power came at the expense of one liter of Diesel every couple of kilometers.

We had the lunch at Tissamaharama Rest House. The weather was quite good for photography, and the camera in my Nokia 6020 phone proved to be quite handy.

2006-03-virtusa-yala-trip-029-02.jpg Yala Villege Hotel. Managed by John Keells Holdings, Yala Villege Hotel is very nicely maintained as an eco friendly dwelling. It was not physically seperated from the National Park, and we were advised not to wonder alone as wild animals sometimes used to come closer. The top floor of the three story restaurant had a great view of the area, the great jungle on all sides and the sea far away.

2006-03-yala-video-06.jpg The tusker. Although it feels great to talk about it later, being in the front seat of a window-less jeep when a huge tusker is coming towards you during your first safari is not a very comfortable feeling... ;-) Obviously, the driver, who was sitting by a window-less door himself, knew what he was doing. Going towards a wild animal instead of running away, something against conventional wisdom, was something I took some time to get used to.

The hunt. Crocodiles were plenty throughout the Park. Either quietly floating on the water, or motionlessly waiting with open mouth for someone to come closer. Once we saw a floating crocodile slowly moving towards some feeding deer. However, its hunt didn't work out, as there was no good place to come out of the water.

2006-03-yala-video-14.jpg The single elephant. Saturday's morning safari ended with another interesting encounter. This time we saw this huge single elephant on the road. Our driver did the right `safari' thing, to stop and turn off the engine. The elephant slowly moved towards us, closer, closer and closer, until it was standing right in front of our Defender. However, after some serious though, it decided to move into the jungle rather than continue to walk by us.

The leopard. Seeing a leopard was considered by most to be the ultimate `thing' of a safari at Yala. This turned out to be statistically rare, as we saw leopards only during my third safari.

While slowly traveling on one by road, one of our group suddenly bursted: `it's there, it's there'. And there it was, a big and beautiful leopard, less than five meters away. Unfortunately, it stayed there only for few seconds although we turned off the engine and kept quiet.

After wondering few more kilometers watchfully, we saw a big group of jeeps moving slowly with people looking towards something. This time it was another leopard, which slowly moved to an open area and didn't want to leave any time soon. Although it was too far for my not-so-good camera to take a good picture, we did have a good view of the beautiful creature moving here and there and finally settling down comfortably on the top of a short hill.

2006-03-virtusa-yala-trip-06-020.jpg The desert rally. Being an off-roading fan, notably the Dakar Rally, I greatly enjoyed the last part of Saturday evening safari. We got late after watching the leopard, and not leaving the Park by 6:45 risked a penalty of our Driver's safari license being temporally suspended. During the next 45 minutes, our Land Rover roared through the bumpy and dusty main road through the Yala National Park. There were so many other jeeps doing the same, and it eventually became a `desert rally'. Finally we managed to leave the Park just a little later than the timeout without a penalty.

Elephant family, friendly deer and dancing peacock. The last safari on Sunday morning was quite eventful, too. Although we didn't see a leopard or a bear, there was a big elephant family that crossed the road few meters away, a group of deer who didn't run away when we passed them by very closely, and a peacock dancing with fully expanded feathers.

2006-03-virtusa-yala-trip-04-090.jpg The beach. The beach in the Park is massive and very scenic. This area had been severely damaged by the Indian Ocean Tsunami. The forest had recovered very fast. Except for few fallen trees here and there, it was difficult to find traces of destruction. In fact, it is well known that none of wild animals at Yala had been killed by this massive natural disaster. A sixth sense seem to exist, although it is lost to humans once they started `leaving' mother nature.

A selected set of photos I captured during the trip can be found here.



Is Sinhala Unicode Incomplete?

"The SLSI 1134 is incorrect & incomplete and it should be corrected immediately.", claims Mr Donald Gaminitillake, who is trying to ignite a campaign against Sinhala Unicode standard through www.akuru.org (history of the site), and frequent newspaper articles.

We of the Sinhala GNU/Linux project think otherwise. And we are not alone. Language Technology Research Center of the University of Colombo School of Computing, research groups from the University of Moratuwa and Arthur C Clarke Center for Modern Technology, Microsoft, Microimage, Science Land also think that the standard is correct. A full list would be quite long.

GNU/Linux was the first platform to implement Sinhala Unicode rendering. We dind't find any issues about encoding or displaying those characters Mr Donald claims are impossible - yansaya, rakaaransaya, reepaya, joint letters and all that. Then Microsoft also released a "Sinhala Enabling Kit for Windows". Most vendors today support Sinhala Unicode. None of them, who actually got their hands dirty by writing actual code to implement the standard, see any missing "letters" in the standard.

Implemenation is proof for most poeple. But for some not-so-obvious "reason" Mr Donald continues to say that certain characters are missing!

Our first encounter with Mr Donald hapenned when I wrote an open letter to him which became a lengthy debate (more, more and a seperate archive) on our project mailing list. Harshula, our standards expert, tried to explain to Mr Donald how the basic Unicode code-page and cartesian products of various "sets" create the complete Sinhala character set. However Mr Donald never tried to cooperate with us in "understanding" it, and the discussion led to nowhere.

However, Mr Donald selectively quoted some parts of the discussion on his site... ;-)

Recently, Niranjan Meegammana, creator of kaputa.com, started a Google Group to communicate in Sinhala - using Unicode. This group has now grown to a very interesting community of a unique, intellectual and polite culture. Although the group members use diverse technologies to write and read Sinhala Unicode, we find the standard quite functional and interoperable. And we use yansaya, rakaaransaya and other "special characters" every day.

Most of us on this group have a great passion for language and literature, and therefore the discussions are very interesting and intellectually rich.

This Google group was meant to communicate in Sinhala Unicode to popularize it, and to act as a test bed for implementations. Mr Donald recently joined the group, not to communicate in Sinhala Unicode, but to start another debate. He continues to repeat the same old story and conveniently ignores some of our questions.

Here is a couple of Mr Donald's claims and what I think of them.

Donald G: SLS1134 doesn't contain all the Sinhala characters

Wrong. Here is why:

Most of Western languages contain simple alphabets. Even with the upper and lower case variants, and some "odd" characters with bubbles and hats, the number of character don't exceed 50-100.

However, Asian languages are different. Most characters have different "forms", either phonetically (e.g.: Sinhala, Tamil and Hindi), or by the location of the word (e.g.: Arabic). Therefore, it's impractical to allocate characters for each variant.

Think of atoms and molecules. There is a limited number of atoms, and molecule names can be formed by putting together the names of atoms. I have never heard of a "Chemists' Revolution" demanding a symbol for each molecule....;-)

Unicode is very similar to chemistry in that sense. Each language is assigned a "code page", typically containing 128 "code points". They form the basis to build more complex character variants, i.e., actual characters seen by the eye, sometimes referred to as "glyphs".

In Western languages, "characters" and "glyphs" and "code points" are the same thing: because they don't need variants. For example, english character, or glyph, "A" maps to code point 65 - one to one.

For complex languages, only basic characters are represented by code points. Variants are produced by sequences of code points. For example, character "da" (as in "dambana") is directly mapped to code point 0DAF, whereas "du" (as in "dumriya"), which is a variant of "da", is produced by the sequence of two code points 0DAF ("da") and 0DDF ("papilla"). More complex characters (glyphs) are formed by longer sequences.

Most modern operating systems have rendering engines that can display proper glyphs from these sequences of code points (e.g.: Pango, QT, ICU on GNU/Linux, Uniscribe on Windows). Therefore, each glyph not having an individual code point is not a problem.

In Unicode, some characters are directly mapped to code points, while others are produced by sequences of two or more code points.

Deciding which characters should be basic code points, and which characters should be produced by combining code points is a different question, and is obviously dependant on the language, and likely to be subjective. Input from several Sinhala scholars and experts have been taken into account to decide that repaya, rakaaransaya and yansaya should not be basic code points, but should be produced by using sequences of code points, as they are linguistically alternatives forms. In other words, they are there as sequences of code points, not as single code points. Nevertheless, they are there, so the claim is wrong.

If Mr Donald's claim is "yansaya, rakaaransaya and reepaya should be individual code points", that would be more valid. However, somebody has to eventually decide what's basic and what's not, and it has already been done. Technically, this is not an issue at all.

Donald G: Unicode can't produce a matrix of 1600+ characters needed by OCR etc

Wrong. Here is why:

I am not an expert on OCR, but if Mr Donald claims that OCR requires a matrix of 1600+ characters, that's exactly what Sinhala Unicode is. Only it doesn't list all the 1600+ characters, but defines the basic code points (not characters) and the way to generate all the other characters by using sequences of them.

Even a primary school kid can understand something like this: "ka and paapilla produces ku, and this rule applies to all the consonents." It would rediculous if the document describing the standard includes a 1600+ table listing each variant (ka + papilla = ku, kha + papilla = khu...la+paapilla=lu and so on)... ;-)

Showing the basic code points and claiming "not all the characters are here" for the first time is fine. Second time is still fine, IMHO. But 100+th time is definitely a joke... ;-)

Donald G: SLS 1134 doesn't consider Tamil

There is no need.

Character representation in SLS 1134 almost identical (if not identical) to Sinhala subset in Unicode. As the only country that has a major Sinhala speaking population, it's SLSI's responsibility to contribute to Sinhala in Unicode, and SLSI does this through SLS 1134. Developers eventually use Unicode. To my knowledge, none of the FOSS packages found in a typical GNU/Linux system refer to SLS 1134. In other words, SLS 1134 more of an intermitent standard.

India has a much bigger Tamil speaking population, and the Unicode code page for Tamil has already been worked out. Therefore, there is absolutely no need to create a seperate standard for Sri Lanka. Sinhala Unicode is not a Sri Lankan standard either.

Donald G: Sinhala Unicode doesn't have yansaya on the keyboard

Wrong. here is why:

Unicode is about representing characters. How they are typed using the keyboard is completely upto the keyboard driver. There are different keyboard drivers, some are classic Wijesekara, some modified Wijesekara, and some are transliterated (somewhat "singlish"). Some driver authors include yansaya etc on the keyboard itself whereas others provide ZWJ as an alternative to type them.

Whatever the keyboard is, yansaya, rakaaransaya and repaya can be typed, and eventually represented and displayed in the same code point sequences.

Other claims

There are so many other claims on akuru.org. For example, Mr Donald from time to time challenges that certain words can't be "written" in Sinhala Unicode (latest being the name of the President). When we send him screenshots to show that it's possible (with and without joint characters), he claims that they are fake!!!

Hidden agenda?

There is a saying that it's easy to wake up a sleeping person, but it's very difficult to wake up someone who pretends to sleep.

Mr Donald has applied for a patent for his "system". Although he doesn't seem to have implemented it, he has promissed to deliver results if given an "opportunity" (as far as I know, nobody is holding him). And as Sinhala Unicode is becoming mainstream, his "pending" patent is going to be worthless, unless... oh, well!

Update: 2006-03-21 08:00

There are "valid" articles on akuru.org. Some are about the history of characters, and some are good articles by others authors. For example, articles written by Mr Aelien Silva, one of my favourite writers and linguists who has created so many good Sinhala technical words (e.g.: "manu", "thekala"), brings out very good points about technology localization. In fact, I have often quoted Mr Aelien Silva on the Sinhala Unicode list and elsewhere (need to enable Sinhala Unicode to read it, instructions are here for GNU/Linux and here for Windows, not sure how to do it on Mac... :-( ). However, I belive that hosting such articles is just an attempt to make akuru.org more authentic, which would otherwise be totally useless.



Sinhala Unicode on GNU/Linux

Update: in almost all GNU/Linux distributions released in the last two years, most if not all of the following settings are already done. You have only to install the font and an input method. Please check this page for more details.

Here are the steps to get Sinhala working on GNU/Linux. If you are running Debian or Ubuntu, there is an easier way. Most of the steps will have to be skipped on modern distributions, as Sinhala is mostly `enabled' in them.

Also, this guide assumes reasonable experience in using the GNU/Linux environment. If you think you are a newbie, please get a Guru involved... ;-)

Sinhala/Sri Lanka Locale for Glibc

This is a file `si_LK' in /usr/share/i18n/locales/. If it's not there, download it here.

If there is a /usr/share/i18n/SUPPORTED file in your system, make sure that there is an entry `si_LK UTF-8' in an alphabatically suitable place.

If you are using a recent version of glibc locales (e.g.: locales package on Debian Etch / Sid), si_LK is included and there is no need to download it. Hopefully, other distros will begin to ship it, too.

Aliases for Glibc Locale (Optional)

Add these lines to /etc/locale.alias so that you can refer to si_LK.UTF-8 locale as si, si_LK or sinhala. If this file is not there, skipping this step is harmless.

sinhala  si_LK.UTF-8
si       si_LK.UTF-8
si_LK    si_LK.UTF-8

Generating the Glibc Locale (Debian based systems)

Non-Debian users should skip this step.

Run `dpkg-reconfigure locales'. Select si_LK.UTF-8 locale and other UTF-8 locales (e.g.: en_US.UTF-8, en_GB.UTF-8). Make sure to select a UTF-8 locale (not necessarily si_LK) as the default locale.

Generating the Glibc Locale (non-Debian systems)

Debian users should skip this step.

Generate the si_LK.UTF-8 locale by running:

localedef -i si_LK -f UTF-8 -A /etc/locale.alias si_LK

X-window Locale

Most of the X window programs used on GNU/Linux (GNOME, GTK, QT and KDE apps) are using Glibc locale, and there is no need to add a full fledged locale to X. However, if X Window system doesn't know about si_LK, X programs will complain of it as an unknown locale. A common practice is just to alias such locales to en_US.UTF-8 to avoid this.

If you are running xorg 6.9.0 (or later) or a recent version of XFree86, this is already done, please jump to the next step.

Otherwise, locate the files locale.dir and compose.dir in /usr/X11R6/lib/X11/locale/ and add suitable lines. Notice that you need to add two lines in each file, one without a colon:

en_US.UTF-8/XLC_LOCALE       si_LK.UTF-8
and one with a colon.
en_US.UTF-8/XLC_LOCALE:      si_LK.UTF-8

Lines in compose.dir are similar, except `XLC_LOCALE' is replaced with `Compose'.

Sinhala Unicode Fonts

It's good to see more and more new Unicode Sinhala fonts are being released. Unfortunately, the FreeFont project includes sinhala characters that don't have correct rendering tables, and sometimes this font takes precedance over other correct unicode fonts, making wrong rendering of kombuwa and other specially handled glyphs. A quick workaround would be to remove freefont package (sometimes called ttf-freefont) if it's installed.

Downloading the LK-LUG Unicode font and copying it to .fonts/ directory in your home directory is sufficient for most cases. Copy it to /usr/local/share/fonts/ to make it available globally.

I have written a more detailed description about fonts in X Windows here.

Sinhala Rendering in KDE/QT

If you are using a version of QT later than 3.3.4, Sinhala should be working fine. There was one bug in old version of of QT, which is now fixed, both in QT 3 and 4 series.

Sinhala Rendering in GNOME/GTK

If your Pango version is later than 1.8.1, Sinhala should be working fine. 1.8.0 also supports Sinhala with a bug, and Harshula's fix went into 1.8.1.

Touching letters are also now supported.


Firefox renderes Sinhala properly only if it's compiled with Pango. 1.0.x needs a patch, but Pango comes standard in 1.5.x series. If you are using Firefox in RedHat / Fedora, it comes with the Pango patch, and there is nothing extra to be done.

The easiest is to upgrade Firefox to 1.5 (hoping that it's compiled with Pango support) and set the environment variable MOZ_ENABLE_PANGO to 1.

Sinhala Input

Earlier, we used seperate input method modules for GTK and QT, but now they are obsoleted by SCIM and M17N input methods. Here are the steps to install them.

  • Install SCIM
  • Install SKIM if you use KDE
  • Get SCIM transliterated input method for Sinhala and install it
  • If you like to use Sinhala input method modules from M17N project, install SCIM-M17N bridge, and M17N input method modules.

Running skim in KDE or scim in GNOME should create an icon on system tray that can be used to select the language. After that, you can use ctrl+space to switch between normal ASCII (English) input and SCIM input.

SCIM 1.4.4 doesn't have a Sinhala catagory, so Sinhala input methods are listed under `Other'. It's fixed now and a seperate menu for Sinhala should be available in the next version.



Running Debain on Desktop

Warning: I might change this article depending on feedback. This warning will be removed when I finish with such edits. After hearing some recent reports from users who tried to run Debian GNU/Linux on their desktops, I thought it will be useful to list some guidelines to avoid some common pitfalls. Debian is great to run on the desktop and with the recent udev/sysfs stuff, hardware detection works great, and apt has always been an excellent, if not the the best, package management tool... :-) Which version? Use Debian `testing' (`Etch' at the time of writing this post). Period. Debian `stable' (`Sarge') doesn't get new versions of software, but only bug and security fixes, which is a great for servers; not for desktops. Debian `unstable' (`Sid') get latest versions of software before `testing', but it breaks dependencies from time to time, which is also not desiarable for a general desktop. How many CDs? If you have a good Internet connection, getting the small `netinst' CD is good enough. Otherwise, first 2-4 CDs are all what you need. If you'll ever need more, then you won't be reading this guide... ;-) You can use jigdo to download the official weekly builds, or less preferably download the ISOs (CD/DVD) here. There were problems with some of the `unofficial' CD/DVD builds, so I recommend getting the official builds. Linux kernel 2.6 If you want all the bells and whistles of the latest Linux kernel, instead of just hitting ENTER when booting the installatoin CD, type `linux26'. Partitions For a desktop, it's sufficient to have three partitions. One swap partition (about 512 MB - 1 GB), one root (/) partition for the installation (2-10 GB, depends on the amount of software you plan to install), and one home partition (/home) for personal files (size of this partition depends on your needs, if you are going to have a lot of audio/video files, this will fill up soon). By having a seperate /home partition, it's possible to play around with the installation in the root (/) without loosing the personal files. If you are planning to have databases and other servers, they will consume space in /var, which is in the root (/) in the above settings. Consider increasing the size of the root partition, or creating a seperate /var partition if this is the case. Personally, I use a single root partition (not a seperate /home), because once you install Debian, there is absolutely no need to install again, as you can keep on upgrading... :-) This installation I am using right now has survived three laptop migrations!!! Filesystem Use a journalling filesystem. I personally prefer reiserfs, as it has good indexing capabilities, and excellent when there are lots of small files. If you have a much larger files instead, consider xfs or jfs. Ext3 is also not a bad choice. What to install? With Debian, it is best to finish the basic install as soon as possible. Therefore, don't select anything extra (x windows or gnome etc), and don't add any additional CDs. Just use the first CD and get over with the installation. Now what? Once installation is over, login as root, and add any additional CDROMs with apt-cdrom tool.

# apt-cdrom add
Repeat this for all the CDs available. Consult /etc/apt/sources.list if you want to verify. Now add X windows, and KDE and/or GNOME desktop(s). Again, if you prefer any other desktop (fvwm or windomaker), you won't be reading this guide... ;-)
# apt-get install x-window-system-core
# apt-get install kde
# apt-get install gnome-desktop-environment
You can play around with /etc/X11/xorg.conf to tweak your X window settings (or alternatively, try the `dexconf' tool). Use the `startx' command to start X windows. Once you are happy with the X window settings (resolution, depth and refresh frequency etc), install a graphical login manager (e.g.: kdm).
# apt-get install kdm
# /etc/init.d/kdm start
One last bit of advice: always login as a normal user, not as root. Open a terminal and run `su -' to become root if necessary. This will reduce possibilities of you harming the system, ensuring long life of the installation. I am hoping to write another howto on installing multimedia stuff and Java. Disclaimer: I am sorry if this makes you forget what `installing' is, because it's very unlikely that you will do another installation ever again... ;-) By the way, happy Debianning!



FOSS-ed Conference - Day 1

The first day of the FOSS-ed conference went really well. The focus of the event is to bring awareness to Free and Open Source Software to the general public. In addition to a keynote from Manju Hathotuwa, there was a series of presentations on various aspects of FOSS usage. Unfortunately, I couldn't listen to Bud and Mifan on distros and desktops. Suchetha did a really good one on web development tools. In the late morning, I did a short presentation on "Dispelling FOSS Myths". The time was too short to talk about legal aspects in detail, so I covered a few "myths" lightly, including "FOSS is not user friendly", "I have to give all my code away", "FOSS should not cost" etc. In the evening, I moderated a panel on "Challenges to wider adoption of FOSS in Sri Lanka". Reshan represented the ICTA, and Dinesh Fernandopulle of DFCC, Sanjiva, Chamindra and Bud were the other panelists. Most of the questions were along the lines of support and the government's role in wider adoption of FOSS in Sri Lanka. One good thing that Reshan mentioned was that the ICTA and the government are going to mandate the use of open standards, while giving implementors the freedom to choose specific technologies. Although a little bias towards FOSS would have made things even better, I still consider this as a very progressive step for the country in gaining "independance" in terms of software.



Dialog Self Service Sucks

The customer care call center of Dialog GSM has always been excellent. The staff is well trained, polite and efficient. However, it turned out that their self service, activated by dialing 687, sucks.

Recently, I wanted to change a number in my frequently dialed numbers list (the "family and friends" call list). Everything went well, but I felt very uncomfortable as the system did not give me a chance to verify the new number. I was "told" that it was changed immediately after I entered it.

I felt the need to verify that the new number is correct, so I went to the main menu again and tried to list the new set of numbers. It looked like the last digit of the new number was missing. Oops... I had done a mistake by starting the numeber with a "0777", instead of a "077".

Every other system I have come across either allowes the user to verify before changing an important piece of information (e.g.: password dialog boxes) OR allows reverting a mistake either through the system itself or some other means. Unfortunately, it wasn't the case here.

I called the customer care call center immediately, and explained that I made a mistake, and asked if anything can be done to correct it. I also mentioned that this happened few minutes ago and that I made no other calls, to show that this is not an attempt to exploit the "friends and family" feature. The executive was very polite as usual, but apparently this was a call beyond her authority. I asked her if I could speak to her lead - hoping to reach someone who is authoritative to make a decision - but while she was trying to transfer the call, the line got disconnected.

I called them again, and told the customer care executive (a different person) that I need to talk to her lead. She said that her lead may not be in a position to make the decision, but gave me the names of two people in another department. I managed to reach one of them, but he said nothing can be done, but also told me to try and contact the Billing Manager.

I made another call to try and contact the Billing Manager, but the phone was never pick up.

I gave up. Not only was I charged Rs 100 for the "change", but I couldn't "correct" it until the next billing cycle.

On a positive note, this is the ONLY bad experience I have ever had with Dialog GSM. Unfortunately, as all my attempts to give them constructive critisism failed, I was forced to blog the incident.

Update: Dialog GSM is investigating into the insident, and hopefully will improve the system in question. Very nice of them to take customer feedback seriously.