A few years ago Galia Shy (Mahacitta) designed a method for easily inserting Pali/Sanskrit special characters in Ubuntu. Since then Ubuntu has changed a few things, and the old instructions do not work. I have revised the instructions to work with a fresh install of Ubuntu 12.10. (It may work with 12.04, but I haven’t tested it).
You can download the file and instructions from here.
Let me know if this works for you. Needless to say, no guarantees!