Chorn Sokun's Weblog

Conquer inner fear, push it to the limit!

Archive for January 2010

I lost the title

with 2 comments

Recently, I start listen to old Khmer song then I like this song but damn I don’t remember what the title of this song, and as you know title of oldies song is tricky to guess. So I needed your help do you know what’s the title of the song?


Written by Chorn Sokun

January 17, 2010 at 4:49 pm

Posted in Entertainment

Tagged with

Build mono on Ubuntu Karmic 9.10 x64

with 8 comments

As always I would start off with CRY ME A RIVER :L, lol I told myself that I will never ever build mono from release source or /trunk again. I am lying myself :( ok here I go again this time I load Ubuntu Karmic x64 on my Toshiba M100 ~2 years old the original purpose is to just load it with multimedia app so that my wife could enjoy watching DVD, play MP3, browse the Inernet and blah blah blah … all just for entertainment :) It turn out !

Ok, here is the main story it turn out that I caught an e-mail from mono mailing list Mono 2.6 for Ubuntu its haunting me. Why don’t I just spend sometime with that instead of wasting time playing JX2 :D yeah let try.

  1. Download Mono 2.6.1 stable source
  2. Read instruction Parallel Mono Environment; ** people keep telling me to reference this instruction although I did follow the exact step, perhaps someone better shot a webcast instead of writing unworkable instruction.

Build Source

First thing first extract the source code from .tar.bz2 since I not a command savvy *yet* I use nautilus context menu to extract the source file; when all source code extracted let get into command line:

// create mono-dev-env using script written in
> ./mono-dev-env
// your command prompt now shall look like this where ~src is the location that I stored source code
[mono] ~src @


// just in case execute
[mono] ~src @ sudo apt-get build-dep libgdiplus
// ... now you are ready to build libgdiplus-2.6
[mono] ~src @ cd libgdiplus-2.6
[mono] ~src/libgdiplus-2.6 @ ./configure --prefix=/opt/mono
[mono] ~src/libgdiplus-2.6 @ make; sudo make install


[mono] ~src @ cd mono-2.6.1
[mono] ~src/mono-2.6.1  @ ./configure --prefix=/opt/mono
[mono] ~src/mono-2.6.1  @ make; sudo make install


Here come the pain :D as gtk-sharp depend on a lot of library we need to make sure those library are installed first before compile gtk-sharp-2.12.9 as of Ubuntu Karmic I need to install the following packages:

> sudo apt-get intall libpango1.0-dev libatk1.0-dev libgtk2.0-dev
// after that I can just do
[mono] ~src/gtk-sharp-2.12.9 @ ./configure  --prefix=/opt/mono
[mono] ~src/gtk-sharp-2.12.9 @ make; sudo make install


// dependency library just in case
> sudo apt-get install libgnomecanvas2-dev libgnome2-dev
// resume build task
[mono] ~/src/gnome-sharp-2.24.1 @ ./configure --prefix=/opt/mono
[mono] ~/src/gnome-sharp-2.24.1 @ make; sudo make install


[mono] ~/src/gnome-desktop-sharp-2.24.0 @ ./configure --prefix=/opt/mono
[mono] ~/src/gnome-desktop-sharp-2.24.0 @ make; sudo make install

The rest of the library seem to go just fine, I learn that execute sudo ./configure cause me a lot of troubles thanks @alex for pointing this out.


description on what this library give coming up next …


description on what this library give coming up next …


As I reached to this point ./configure started to complain me like this > configure: error: Cannot find termcap library to solve the problem I need to install

// ref:
$ sudo apt-get install libncurses5-dev

Side Note

Petit Eric <surfzoid[at]gmail[dot]com> wrote:

For those who want 2.6.1 deb, there is OBS repository for i586, the X86_64 are available here or
in sources directory you will find  libgdiplus sources and all files need to build deb from them (.dsc, …) here you will find mono2.6 idem

Written by Chorn Sokun

January 15, 2010 at 9:30 pm

Posted in Mono 2.6, OSS, Ubuntu

MR, Ambiguous controller names

leave a comment »

Reading through Phil Haack’s post implication in supporting area in ASP.NET MVC 2 remind me the time I faced the same problem using MonoRail, I believe I had post my solution in the passed but I can’t dig inside my blog entry to get it back.

So here it goes again the trick I used in to fix the problem let assume I had Admin Area & User Area and each has a HomeController I then would create controller file like this:

  • Admin [ Folder ]
    • AdminHomeController.cs
  • User [ Folder ]
    • UserHomeController.cs

Then I need to use ControllerDetails attribute to give these two controller a prefer url

// access with /admin/home/index.castle
[ControllerDetails("home", Area="admin")]
public class AdminHomeController: SmartDispatcherController { ... }

// access with /user/home/index.castle
[ControllerDetails("home", Area="user")]
public class UserHomeController: SmartDispatcherController { ... }

That work for me !


Written by Chorn Sokun

January 13, 2010 at 9:38 pm

Posted in MonoRail, Tips & Tricks