How to change locale in Ubuntu Karmic

On two different occasions, I need to change the system locale for Ubuntu Karmic installation on a remote server, without access to the graphical user interface. It actually is very easy to handle, provided you know where to look.  Here is the method that I have used, and it works!

  1. First, determine the proper locale name to use.  All valid locales are listed in directory /usr/share/i18n/locales.  For my case, I want my system to support both en_US and zh_CN locales.
  2. Add desired locale names to file /var/lib/locales/supported.d/local.  My file reads: “en_US.utf-8 UTF-8″ and “zh_CN.utf-8 UTF-8″.
  3. Generate the proper locale files using command “locale-gen –purge”.
  4. Change the default locale setting using command ‘update-locale’.  To use “zh_CN” as the default setting, run ‘update-locale LANG=zh_CN.UTF-8′ from the shell.
  5. Reboot the system and the new setting will become effective.
  6. Run ‘locale’ to check if the change is correct.

An AIX lpp/bff packaging reference

In the coming assignment, I will be working on creating AIX lpp installation package for a commercial software piece.  Someone has passed me this reference on how-to.  I will have a write up when I am done with the task.

Constructing a python runtime sandbox

During my Django development, I have encountered situation where applications are built in different versions of Django releases.  As Django evolves, incompatibility arises, which causes quite a headache for both maintenance and staying in cutting edge.

A Python runtime sandbox comes handy in this case.

By python sandbox, it is actually a virtual environment that is highly customizable.  Any changes made packages installed in the virtual environment will have no effect on the the behavior outside this environment.  This feature makes it possible to deploy Django applications built with different Django versions on the same platform, provided that fast-cgi type technology is used.

To construct a Python virtual environment or sandbox, one needs to download Ian Bicking’s virtualenv tool.  Fortunately, virtualenv is a registered package in PyPI registrar.  One can easy install the latest virtualenv using “easy_install” from the setuptools as follows:

easy_install virtualenv

Assume we have a user foobar and we want to create an isolated Python environment in /home/foobar/opt directory, we can accomplish the task using the following command:

virtualenv /home/foobar/opt

Using the python instance reference /home/foobar/opt/bin/python, we can install any packages in any versions without affecting the system-wide python behavior.

This post is written using Microsoft Live Writer

I have heard good comments from people over the internet about the blogging tool from Microsoft. Well, I am going to give it a try here.

Here is the test for lists:

  • I am a programmer;
  • I am a UNIX programmer; and
  • I am a UNIX kernel programmer.

Now comes the test for the embedded picture.

IMG_0544

I guess this should be enough for a quick test.