Jul 12, 2013

CDP device discovery in python

Today, I wrote a small python script to discover Ubiquiti Nanostation devices on the network using pacpy and dpkt. Since it is listening CDP packets, I guess it can also discover other kinds of devices, though not tested.

Jul 11, 2013

Limiting the active users/sessions in freeRADIUS

Here is how to limit the number of concurrent users/sessions in freeRADIUS. Let's say, you want to reject auth requests if there are already more than 50 active accounting sessions.

  1. Add the following policy in your policy.conf
  2. maximum_active_users = 50
    
    check_active_users {
        if ("%{sql: SELECT COUNT (*) FROM  radacct WHERE acctstoptime IS NULL}" >= "%{config:policy.maximum_active_users}") {
            update reply {
                 Reply-Message := "Too many users logged into the system. Please try again later."
            }
            reject
        }
    }
     
  3. Add check_active_users policy in your sites-enabled/default auth section.

  4. Test it using radclient.

  5. root @ ~ $ echo "User-Name=t1,User-Password=1234"  | radclient -x -d /etc/freeradius/ 192.168.100.108 auth testing123
    Sending Access-Request of id 124 to 192.168.100.108 port 1812
            User-Name = "t1"
            User-Password = "1234"
    rad_recv: Access-Reject packet from host 192.168.100.108 port 1812, id=124, length=84
            Reply-Message = "Too many users logged into the system. Please try again later."
    

Jun 20, 2013

Simple Data Compression Algorithms in Common Lisp

Common Lisp implementation of some data compression algorithms — Run-Length, Huffman, and Shannon–Fano Encodings — that I have written during my graduate course "Data Compression".

Internet connection sharing using iptables

Scenario ― I have several virtualbox GUEST machines, using an internal network on my PC. Now, I wanted to share host machine's internet connection to guest machines. I searched on the web how to do it using iptables. Most of the solutions seem too complex. Here is a working simple solution (found on centos documentation)

On Host Machine — type these commands in Terminal.

thura @ ~ $ sudo iptables -A FORWARD -i vboxnet0 -j ACCEPT
thura @ ~ $ sudo iptables -A FORWARD -o eth1 -j ACCEPT
thura @ ~ $ sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

That's it. Now you can access the external network of host machine from guest machines. To access Internet, you may need to edit /etc/resolve.conf in your guest machine.
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8

Jun 19, 2013

if_nametoindex, if_indextoname functions for python using ctypes


I needed to use if_nametoindex, if_indextoname functions for one of my packet capturing programs. So, here is my python wrapper for those functions using ctypes.


PS: You will need this only for python2.x. Those functions are available in socket module starting since python 3.3.

Jun 13, 2013

Using Prolink Wireless Nano USB Adapter on Ubuntu

Recently, I purchased a prolink nano usb wireless adapter WN2001. However, when I tried to plug it into my ubuntu box, I am getting "hardware disabled errors".

trhura @ ~ $ sudo rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

This can be fixed by reloading the wireless module with swenc option.

trhura @ ~ $ sudo rmmod -f rtl8192cu; sudo modprobe rtl8192cu swenc=1 debug=5

Apr 6, 2012

Python Module for Myanmar Language Processing

I am writing a crawler, to crawl Burmese phrases from the Web, in python currently. Since non-unicode encodings — such as wininnwa and zawgyi — are also used commonly in Myanmar websites, I needed to convert those texts into unicode.

So, I ported Thanlwinsoft's Myanmar converter, written in javascript, to python. Since, converting those encodings is a common task in Myanmar language processing, I am releasing it here.

I have also written a python script, which can be used to convert those encodings from command line.

Please note that I haven't tested it throughly, and this is an alpha release. So, don't use it without backing up first.

Install


For debian/ubuntu users, you can just grab the deb package and install. For other platforms, download the archive and run this command in extracted folder.

python setup.py install

Usage


Using myanmar python module

   >>> import myanmar.converter as converter
   >>> converter.get_available_encodings ()
   ['zawgyi', 'wwin_burmese', 'wininnwa', 'unicode']   
   >>> print converter.convert (u'ydkifoGefy½dk*&rfrif;', 'wininnwa', 'unicode')
   ပိုင်​သွန်​ပ​ရို​ဂ​ရမ်​မင်း

Using myanmar-converter script

trhura @ ~ $ myanmar-converter -h
Usage: myanmar-converter [OPTIONS...] [FILE...]

Convert between Myanmar legacy encodings and unicode.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -l, --list            List supported encodings.
  -f ENCODING, --from=ENCODING
                        Convert characters from ENCODING
  -t ENCODING, --to=ENCODING
                        Convert characters to ENCODING
  -o FILE, --output=FILE
                        Write output to FILE

trhura @ ~ $ echo 'wmrDe,frStokH;ðyykH' |  \
 myanmar-converter -f 'wwin_burmese' -t 'unicode'
တာ​မီ​နယ်​မှ​အသုံးပြု​ပုံ

Mar 6, 2012

Unicode Character Boundary Segmentation for Burmese


        Character boundary segmentation for Burmese is still not working properly in all platforms supporting Myanmar unicode (Windows , OS X, ICU, Pango). Although the default character segmentation specification, described in Unicode Standard Annex #29, works well for most Burmese text, there are, however, still some cases, where it needs to be tailored be work properly for Burmese.

         Normally, Burmese (user-perceived) characters are a combination for consonants + marks (medials, vowel, tones). However, this simple rule doesn't work when final (devowelized) consonants are involved. Final consonants are consonants with their inherent vowel killed. There are three ways final consonants appear in Burmese –
  1. Followed by U103A (ASAT SIGN) (က်)
  2. Stacked together with succeeding consonants (က္က)
  3. As Kinzi (င်္)
         Two separate rules for segmentation of those final consonants need to be considered.

1. When followed by ASAT — (က်, မ်, င်, ည် …)

         They are segmented as separate characters in all platforms currently supporting Myanmar unicode (ICU, Windows8, pango). For example, မောင် is segmented into two separate characters – မော and င်. Although they seem visually separate, မောင် is considered as one character in Burmese. Let's say — we want to display “ဒိန်ချဉ်ဆိုင်” vertically, as in a signboard. This will be displayed as:
ဒိ
န်
ချ
ဉ်
ဆို
င်,
where it should be displayed as:
ဒိန်
ချဉ်
ဆိုင်

2. Kinzi and Stacked Consonants — (အင်္ဂါ, အက္ခရာ…)
 
        The default unicode algorithm segments each consonant + mark combination as a character. However, since two consonants are conjoined in kinzis and stacked consonants, “one consonant, one character” rule makes it confusing for selecting text and cursor movement. Currently, pango and ICU segment those conjoined consonants as two separate characters.
အင်္ဂါ = + င်္ + ဂါ
အက္ခရာ = + က ္ + + ရာ
        Windows 8 segments those conjoined characters as one character – which is the proper approach in my opinion.
အင်္ဂါ = + င်္ဂါ
အက္ခရာ = + က္ခ + ရာ
        There is another issue regarding U104E (). Myanmar symbol (U104E), unlike other symbols, is not an independent symbol. It is always written together with Nga, Asat, Visarga. So, ၎င်း should be counted as one character, rather two characters (+ င်း).

Jan 13, 2012

tic-tac-toe AI with two-ply minmax in scheme

Today, while I am reorganizing my old programming source code files, I stumbled upon this old gem —  an implementation of tic-tac-toe AI using two-ply min-max in scheme — which is my project for AI course in university.

Although it was only a half and a year ago, I have already forgot how it works. Besides at that time, I wrote it using plt-scheme, which has become racket now. So, I decided to find out whether the program still works under racket and went through this unbearable pang of downloading racket — a familiar emotion for Internet users inside Myanmar. After waiting for a few hours, I was ready to animate my old friend.



Yeah, it still works, and as far as I tested, the AI is unbeatable. Since this kind of projects are common in university AI courses, I decided to post it online to help some pour souls trying to meet his assignment deadline — that I was once.

Please, note that the evaluation function is too complex and poorly written that I even myself had a hard time understanding. So, you might want to rework that one.

To try out this program, just install racket & run.
sudo apt-get install racket
racket ttc.scm

Jan 11, 2012

nautilus-renamer 3.0 released

Highlights
The main change is that now nautilus-renamer uses PyGobject, instead of static pygtk bindings. In other words, it uses gtk3 now. The other big change is radio buttons in previous versions are replaced with buttons, so that patterns, substitutions and case can be applied simultaneously. Nautilus extension is also added by Amr Osman. Debian packages are also available now.

Download

Downloads are available here. If you want to install as a nautilus script for a single user, download source package, extract and type "make localinstall" in terminal to install. Download the deb package to install as nautilus extension. After installation, "Mass Rename" will appear in nautilus context menu, if you have selected more than 2 files.

Screenshots




Dec 19, 2011

Reading comics books & mangas in Ubuntu

Normally, comic books & manags are shared on the net in archive formats, like zip or rar, which contain (jpeg, png) images. Reading those images with an image viewer is the most irksome reading experience you can ever have. So, normally you may want to convert those images into a common document format, like pdf.

Since evince is the default and most widely used document reader in Ubuntu, there are two ways to convert those piles of images into evince-readable format.

The first one is to use our favourite ImageMagick's convert command. Go to the directory which contains those images in terminal, and run this command, which will produce a comic-book.pdf with jpg files in current directory.
convert *.jpg comic-book.pdf

If you have downloaded lots of comics books and you might find it tedious to go into each book's folder and run the above command. Rest assured, you don't need to. You can use for loop in bash to automate this.

In the above example, we have 3 series of Rurouni Kenshin mangas in current folder. After runing the command, we have 3 pdf files with corresponding names.

An alternative way is to use cbz format, which is also supported by evince reader.

7z a comic-book.cbz *.{jpg,png}
This command will produce a comic-book.cbz with jpg or png images in current directory.

for file in *;do 7z a "$file".cbz "$file"/*.png ;done
This command will read png images in each directory of current folder, and produce cbz files with corresponding names.

မြန်မာ​ပြည်​တွင်း​မှ Github ကို အသုံးပြု​ပုံ

၁။ Github ကို သွား​ပြီး အကောင့်​တစ်​ခု ပြုလုပ်​ပါ။အွန်​လိုင်း​အကောင့် ပြုလုပ်​ပုံ​များ​ကို အားလုံး​ပဲ အကျွမ်းတဝင်​ရှိ​ပြီး​သား​ဟု ယူဆ​၍ အကျယ်​တစ်​ဝင့် မ​ရှင်း​တော့​ပါ။

၂။ မိမိ​ပြုလုပ်​ထား​သော အကောင့်​နှင့် ဝင်​လိုက်​ပါ။

၃။ ဤ​စာ​မျက်နှာ​သို့ သို့ သွား​၍ ပ​ရော​ဂျက်​ရီ​ပို အသစ်​တစ်​ခု ပြုလုပ်​ပါ။

၄။ မိမိ​စက်​တွင်း git ကို မ​သွင်း​ရ​သေး​ပါ​က သွင်း​ပါ။
sudo apt-get install git-core
၅။ git အတွက် မိမိ​နာမည်​နှင့် အီး​မေးလ်​များ သတ်​မှတ်​ပါ။
git config --global user.name "Thura Hlaing"
git config --global user.email trhura@gmail.com
၆။ git တွင် github ၏ တို​ကင်​ကို Github >> Account Admin >> API Token ယူ၍ သတ်​မှတ်​ပေး​ပါ။
git config --global github.token 04cbd8b4a896947c58144923de69c3c7

၇။ မိမိ​ပ​ရော​ဂျက်​အတွက် စက်​တွင်း​တွင် ဒါ​ရိုက်​ထ​ရီ​တစ်​ခု ပြုလုပ်​လိုက်​ပါ။ ထို​နောက် ၎င်း​ဒါ​ရိုက်​ထ​ရီ​အတွင်း ဝင်​လိုက်​ပါ။
mkdir -p ~/github/test-project && cd ~/github/test-project
၈။ ပ​ရော​ဂျက်​အတွက် README ဖိုင် ဖန်တီး​လိုက်​ပါ။
echo "This is a README file for test-project" > README
၉။ လက်​ရှိ​ဒါ​ရိုက်​ထ​ရီ​တွင် ရီ​ပို​တစ်​ခု အစပြု​ရန် git ကို အောက်​ပါ​ကွန်​မန်း​သုံး​၍ ညွှန်​ကြားလိုက်​ပါ။
git init
၁၀။ ခု​န​က ပြုလုပ်​ထား​သော README ဖိုင်​ကို မိမိ​ပ​ရော​ဂျက်​ရီ​ပို​ထဲ ထည့်​ပါ။
git add README
၁​၁။ ရီ​ပို​အတွင်း မိမိ လုပ်​ထား​သည့် အပြောင်း​အလဲ​များ သိမ်း​ပါ။
git commit -m "Added README file"
၁​၂။ မိမိ​ရီ​ပို​အား သိမ်း​မည့် github လိပ်စာ ထည့်​ပေး​ပါ။ (test ကို မိမိ​နှစ်သက်​ရာ အမည်​တစ်​ခု၊ trhura ကို မိမိ​၏ github အသုံးပြု​သူ​အမည်၊ test-project.git အား မိမိ​ပ​ရော​ဂျက်​၏​အမည် အသီး​သီး​ပြောင်း​၍ ရိုက်​ပါ)
git remote add test https://trhura@github.com/trhura/test-project.git
၁၃။ မိမိ​ပ​ရော​ဂျက်​အား github ပေါ်​တင်​၍ ရ​ပါ​ပြီ။
git push -u test master

Dec 14, 2011

aptitude မိတ်​ဆက်


ကျနော် ဦး​ဘွန်​တု​ကို စ​သုံး​ကတည်းက ရီ​ပို​ဆာ​ဗာ​ထဲ​မှ ဆော့ဖ်​ဝဲ​များ သွင်း​ဖို့ ကွန်​မန်း​လိုင်း​က​ဆို​ရင် “apt-get”, ဂျီ​ယူ​အိုင်​ဆို​ရင်​တော့ “synaptic” ကို​ပဲ စွဲ​စွဲမြဲ​မြဲ သုံး​ခဲ့​ပါ​တယ်။ ရီ​ပို​ထဲ​က မဟုတ်​ပဲ တစ်​ခြား​က ကူး​ဆွဲထား​တဲ့ deb ပက်​ကေ့​တွေ သွင်း​ချင်​ရင်​တော့ ကွန်​မန်း​လိုင်း​က​ဆို​ရင် “dpkg”, ဂျီ​ယူ​အိုင်​က​ဆို​ရင် “gdebi” ကို သုံး​ပါ​တယ်။ ဦး​ဘွန်​တု ဆော့ဖ်​ဝဲ​စင်​တာ​ကို​တော့ အရမ်း​နှေး​တာ​က​တစ်​ကြောင်း၊ အချက်အလက်​တွေ စုံ​စုံလင်​လင် မ​မြင်​ရ​တာ​တစ်​ကြောင်း လုံး​ဝ မ​သုံး​ဖြစ်​ပါ။

ခုနောက်ပိုင်းမှာ ဆာ​ဗာ​တွေ​ကို sshနဲ့ ဝင်​ပြီး စီမံ​ထိန်းသိမ်း​လာ​ရ​တဲ့​အခါ ကွန်​ဆိုး(console) က​ဖြစ်​တဲ့​အတွက် ဆော့ဖ်​ဝဲ​တွေ သွင်း, ထုတ်​လုပ်​ဖို့ အရင်​က​လို “synaptic” ကို သုံး​လို့ မ​ရ​တော့​ပါ။ “apt-get” က ကိုယ့်​သွင်း​မယ့် ပက်​ကေ့​နာမည်​တွေ သိ​ရင် သွင်း​ရ လွယ်​ပေ​မဲ့ နာမည်​အတိ​အကျ မ​သိ​တဲ့ ပက်​ကေ့​တွေ အများ​ကြီး တစ်​ခု​ချင်း ရှာ​လိုက်, သွင်း​လိုက်​လုပ်​ရ​တော့​မယ်​ဆို​ရင် မ​သက်သာ​ပါ။

ဒါ​ကြောင့် အရင်​က စမ်း​ဖူး​ပေ​မဲ့ သေချာ မ​သုံး​ဖြစ်​ခဲ့​တဲ့ “aptitude” ကို ပြန်​သုံး​ဖြစ်​ပါ​တယ်။ သုံး​ရင်း​နဲ့ နည်း​နည်း အသား​ကျ​သွား​တော့ ဂျီ​ယူ​အိုင်​မှာ​တောင် “synaptic” ကို ပြန်​မ​သုံး​ချင်​တော့​ပါ။ “aptitude” ရဲ့ အဓိက အား​သာ​ချက်​တွေ​ကတော့-
  • ကွန်​မန်း​လိုင်း အခြေ​ခံ ယူ​အိုင်​ဖြစ်​တဲ့​အတွက် ဂျီ​ယူ​အိုင်​က မဟုတ်​လည်း သုံး​လို့​ရ​ပါ​တယ်။ အပေါ်​မှာ ပြော​ခဲ့​သ​လို ဆာ​ဗာ​ကို “ssh” နဲ့ ဝင်​သုံး​နေ​တဲ့​အခါ​မျိုး, “synaptic” ကို သုံး​မ​ရ​တဲ့​အခါ​မှာ အတော်​အသုံးဝင်​ပါ​တယ်။
  • ယူ​အိုင်​က ဂီး(geek)တွေ အကြိုက် ဖြစ်​ပါ​တယ်။ ကျနော်​တော့ သူ့​ယူ​အိုင်​က “synaptic”, “software-center” တို့​ထက် ပို​ပြီး သုံး​ရ ချော​ချောမွေ့​မွေ့ ရှိ​တယ်​လို့ ဂီး​ဆန်​တယ်​လို့ ခံစား​မိ​ပါ​တယ်။ :D
  • “synaptic” မှာ ဆော့ဖ်​ဝဲ​တွေ အများ​ကြီး မှတ်ထား​ပြီး သွင်း​နေ​တုန်း အကြောင်း​တစ်​ခု⁠ခု​ကြောင့် ရပ်​ပြီး ပိတ်​လိုက်​ရ​တာ​မျိုး ဖြစ်​ဖူး​မှာ​ပါ။ “synaptic” မှာ ပိတ်​ပြီး ပြန်​စ​ရင် သွင်း,ထုတ်​ဖို့ မှတ်ထား​တဲ့ ပက်​ကေ့​တွေ အကုန် ပြန်​မှတ်​ရ​ပါ​လိမ့်​မယ်။ “aptitude” ကတော့ ကိုယ် သွင်း/ထုတ်​ဖို့ မှတ်ထား​တဲ့ ပက်​ကေ့​တွေ​ကို ကရှ်(cache) ထဲ​မှာ သိမ်းထား​တာ​မို့ ပိတ်​ပြီး ပြန်ဖွင့်​လည်း မှတ်ထား​တာ​တွေ မ​ပျက်​သွား​ပါ​ဘူး။

    ကဲ... အသုံးပြု​ပုံ အခြေ​ခံ​ကို နည်း​နည်း လေ့​လာ​ကြည့်​ကြ​ရအောင်…

ဒါ​က စ​ဝင်⁠ဝင်​ချင်း မြင်​ရ​မယ့် မြင်​ကွင်း​ပါ။ အပေါ်, အောက်​သွား​ချင်​ရင် မြှား​ခ​လုပ်​တွေ​အပြင် vim, gmail တို့​က အတိုင်း j, k ကို သုံး​ပြီး သွား​နိုင်​ပါ​တယ်။ အပေါ်​ဆုံး, အောက်​ဆုံး​ကို​တော့ <Ctrl>+a, <Ctrl>+e အသီး​သီး သုံး​ပြီး သွား​နိုင်​ပါ​တယ်။ စာ​မျက်နှာ​အလိုက် အပေါ်, အောက် လှိမ့်​ဆင်း​တက်​လုပ်​ချင်​ရင် <Ctrl>+f, <Ctrl>b ကို သုံး​နိုင်​ပါ​တယ်။

ဝင်⁠ဝင်​ချင်း​မှာ သွင်း​ပြီး​သား, မ​သွင်း​ရ​သေး​တဲ့, အပ်​ဒိတ်​လုပ်​လို့​ရ​နိုင်​တဲ့ စ​သ​ဖြင့် ပက်​ကေ့​တွေ​ကို အုပ်စု​ခွဲ​ပြီး ပြ​ပေး​ထား​ပါ​တယ်။ အဲ​ဒီ​အုပ်စု​တွေ​ကို ဖြန့်​ချ​ချင်​ရင် [ ကို သုံး​ပါ။ ပြန်​လိပ်​ထား​ချင်​ရင် ] ကို သုံး​ပါ။

ပက်​ကေ့​ကို အသေး​စိတ် ကြည့်​ချင်​ရင် Enter နှိပ်​ပါ။ နောက်ပြန်​သွား​ချင်​ရင် q သုံး​ပါ။

ကိုယ်​သွင်း​ချင်​တဲ့ ပက်​ကေ့​ကို နာမည်​နဲ့ ရှာ​ချင်​ရင် / ကို သုံး​ပါ။ ရှာ​လိုက်​လို့ ရ​လာ​တဲ့ ပက်​ကေ့​တွေ​ကို သူ​က “synaptic” လို သီး​သန့်​ခွဲ မ​ပြ​ပေး​ပါ။ တစ်​ခု​ချင်း အရှေ့, နောက် n, N ကို သုံး​ပြီး ကြည့်​ရ​ပါ​တယ်။

ကိုယ်​ရှာ​တဲ့ ပက်​ကေ့​ကို တွေ့​ရင် သွင်း​ဖို့​ဆို​ရင် +, ထုတ်​ဖို့​ဆို​ရင် - ကို သုံး​ပြီး မှတ်​နိုင်​ပါ​တယ်။ သွင်း​ချင်, ထုတ်​ချင်​တာ​တွေ အကုန် မှတ်​ပြီး​ရင် g ကို​နှိပ်​ပြီး သွင်း, ထုတ်​နိုင်​ပါ​တယ်။

အပ်​ဒိတ်​လုပ်​ဖို့, မှတ်ထား​တာ​တွေ မေ့​ပစ်​ဖို့ အစ​ရှိ​တဲ့ အခြား​ဖန်​ရှင်​တွေ​ကို သုံး​ချင်​ရင်​တော့ <Ctrl>+t ကို​နှိပ် မီ​နူး​ကို ခေါ်​သုံး​နိုင်​ပါ​တယ်။

မီ​နူး​မှာ မြင်​ရ​တဲ့​အတိုင်း “aptitude” က ထွက်​တော့​မယ်​ဆို​ရင်​တော့ q နှိပ် ထွက်​နိုင်​ပါ​တယ်။ “aptitude” အသုံးပြု​ပုံ​နဲ့ ပတ်သက်​ပြီး ပြော​ချင်​တာ​ကတော့ ဒီ​လောက်​ပါ​ပဲ။ ပို​ပြီး အသေး​စိတ် သိ​ချင်​ရင်​တော့ ? နှိပ်​ပြီး အသုံးပြု​ပုံ အသေး​စိတ်​ကို ကြည့်​နိုင်​ပါ​တယ်။

“aptitude” က ကွန်​မန်း​လိုင်း အက်​ပလီ​ကေး​ရှင်း​ပီပီ စ​သုံး​ကာ​စ​မှာ သုံး​ရ​ခက်, သင်​ရ​ခက်​ပေ​မဲ့ လင်း​နက်စ်​ဆာ​ဗာ​များ​ကို စီမံ​ထိန်းသိမ်း​နေ​ရ​တဲ့​သူ​များ, လင်း​နက်စ်​ဂီး​လောင်း​များ လေ့​လာ​ထား​သင့်​တဲ့ အက်​ပလီ​ကေး​ရှင်း​တစ်​ခု​ဖြစ်​ကြောင်း ပြော​ကြား​ရင်း ဒီ​ပိုစ့်​လေး​ကို ဒီ​မှာ​ပဲ ရပ်နား​ခွင့်​ပြု​ပါ​ခင်ဗျာ။

Dec 7, 2011

Repair GRUB without using LiveCD

  1. Search root disk.
    grub> search -f /vmlinuz -s root

  2. Set root disk.
    grub> root ($root)

  3. Use these commands to find out root disk's information.
    grub> ls -l ($root)

  4. Set linux kernel. There are three ways to do it.

    1. Change the red number with your root disk number. If your root disk is (hd0, msdos1), then use /dev/sda1.
      grub> linux /vmlinuz root=/dev/sda1
    2. Change red text with your disk label, which can get by using ls -l ($root).
      grub> linux /vmlinuz root=LABEL=LABEL
    3. Change red text with your disk uuid, which can also get by using ls ($root).
      grub> linux /vmlinuz root=UUID=UUID
  5. Set ramdisk.
    grub> initrd /initrd.img

  6. Now, you can boot your system.
    grub> boot

  7. When you are logged in, type this command from terminal to fix your grub menu.
    $ sudo update-grub

Setting up Huawei c8600 mobile phone as modem on Ubuntu

Although I have tested only on ubuntu 10.10 with Huawei C8600, it might also work for Huawei C8500 and other Ubuntu versions.

1) Connect your Huawei c8600 mobile phone to your computer.

2) Open Terminal. Make sure your device is detected. Type "lsusb".



3) Load Modem with VendorID (12d1 for Huawei) and ProductID you get above. Type "sudo modprobe usbserial vendor=0x12d1 product=0xYourProductIDHere".




4) It takes a while for the network manager to detect your newly acquired modem. Sit back and relax. After several seconds, you should see CDMA Mobile Broadband Connection in your connections. Select and click on it.




6) Configure the wizard dialogs according to your provider settings. For MPT EVDO CMDA Broadband Internet, follow these steps.





7) That's it. ;)

ဦး​ဘွန်​တု​၌ မြန်မာ​လို​ကေး သတ်​မှတ်​အသုံးပြု​ပုံ

လိုကေး(Locale) ဆိုတာ  အကြမ်းဖျင်းအားဖြင့် ကွန်ပျူတာ စီမံစနစ် (OS) ကို မိမိရဲ့ ဒေသသုံး ဘာသာစကားနဲ့ စာရေးထုံးတွေအကြောင်း ပြောပြတာလို့ ဆိုနိုင်ပါတယ်။ လိုကေးထဲမှာ သက်ဆိုင်ရာ ဒေသဘာသာစကားရဲ့ စာလုံးစဉ်ပုံ၊ နာမည်, လိပ်စာ, ဖုန်း, အချိန်,နေ့စွဲ, နံပါတ် တွေကို ရေးသားပုံ၊ ဒေသတွင်း အသုံးပြုသော ငွေကြေးစနစ် အစရှိတာတွေကို ရေးမှတ်ထားပါတယ်။

ဦးဘွန်တုအတွက် မြန်မာလိုကေးကို မကြာသေးမီက ဆုံးပါးသွားတဲ့ သန်လွင်ဆောဖ့်မှ ကိတ် (Keith) က ​ရေးသားထားပြီးဖြစ်လို့ အင်္ဂလိပ်လိုကေးမှ မြန်မာလိုကေးကို အောက်မှာ ဖော်ပြထားသည့်အတိုင်း လွယ်ကူစွာ ပြောင်းလဲအသုံးပြုနိုင်ပါတယ်။

ပထမဆုံး မိမိရဲ့ ကွန်ပျူတာတွင်း လက်ရှိလိုကေးကို "locale" ဆိုတဲ့ ကွန်မန်းကို အသုံးပြုပြီး စစ်လိုက်ပါ။



ထွက်လာတဲ့ စာသားတွေကို အကြမ်းဖျင်းရှင်းရရင် LANG နဲ့ LANGUAUGE က လက်ရှိလိုကေးနဲ့ ဘာသာစကားကိုပြောတာပါ။ ကျန်တဲ့ LC_* တွေက နာမည်၊ လိပ်စာ၊ ဖုန်းနံပါတ် အစရှိတာတွေကို  အသုံးပြုရေးသားမဲ့ ရေးထုံးတွေကိုပြောတာပါ။ လိုကေးအမည်တွေမှာ ရှေ့ဆုံး စာလုံးနှစ်လုံးက ဘာသာစကားကိုနဲ့ နောက်နှစ်လုံးက အရပ်ဒေသကို အသီးသီး ရည်ညွှန်းပါတယ်။ နောက်ဆုံးပိုင်းကတော့ လိုကေးမှာ အသုံးပြုထားတဲ့ encoding ကို ပြောတာပါ။ ဥပမာ - “en_US.utf8” က utf-8 encoding ကို အသုံးပြုရေးသားထားတဲ့ အမေရိကန်နိုင်ငံသုံး အင်္ဂလိပ်ဘာသာလိုကေးလို့ ဆိုလိုတာပါ။

လိုကေးဖိုင်တွေက ဖိုင်ဆိုက် ၅၀မီဂါဘိုက်လောက် ရှိတတ်တာမို့ ဟာဒ်ဒစ်နေရာ သက်သာစေဖို့ ဦးဘွန်တုထဲမှာ နေရာဒေသ နိုင်ငံအသီးသီးအတွက် ဆိုင်ရာ လိုကေးအားလုံး မထည့်ထားပါ။ မိမိ အလိုရှိရာ ဒေသဘာသာစကားအတွက် လိုကေးကို “locale-gen” ဆိုတဲ့ ကွန်မန်းကို အသုံးပြုပြီး ဖန်တီးနိုင်ပါတယ်။



မြန်မာစာလိုကေးအမည်ကို my_MM(.utf-8) လို့ သုံးပါတယ်။ my က မြန်မာ(ဗမာ)ဘာသာစကားကို ရည်ညွှန်းတာဖြစ်ပြီး MM က မြန်မာနိုင်ငံကို ရည်ညွှန်းတာပါ။ နောက်က encoding က မထည့်လည်း ရပါတယ်။

ဒါဆို မြန်မာစာလိုကေးကို ဖန်တီးပြီးပြီဖြစ်တဲ့အတွက် System >> Administration >> Language Support >> Text ကနေ Burmese ကို ရွေးချယ်သတ်မှတ်ပြီး မြန်မာစာလိုကေးကို အသုံးပြုနိုင်ပါပြီ။ ဒါမှမဟုတ် logout ပြန်ထွက်ပြီး GDM  Login Screen ဘယ်ဘက်အောက်ခြေနားက ဘာသာစကားမှာ ဗမာ(Burmese) ကို ရွေးပြီးလည်း အသုံးပြုနိုင်ပါတယ်။

အောက်က မြန်မာလိုကေးပြောင်းပြီး နေ့စွဲရက်စွဲတွေ မြန်မာလိုပြောင်းလဲ မြင်ရပုံပါ။



လိုကေးကို မြန်မာပြောင်းထားပြီးရင် မြန်မာဘာသာပြန်ပြီးသားရှိတဲ့ အက်ပလီကေးရှင်းတစ်ချို့ကိုလည်း  မြန်မာလို အသုံးပြုနိုင်ပါလိမ့်မယ်။


Mar 8, 2011

Simple Burmese OCR

As my graduation project, I am working on a simple Burmese OCR (only alphabets & digits) using ANN. I have already finished the demo program. Here are some screenshots for the curious.





















Feb 7, 2011

ဦး​ဘွန်​တု​မှ ယူ​နီ​ကုတ်​မှတ်စု​များ

မှတ်ချက်။   ။ ဦး​ဘွန်း​တု​လို့ ဆို​ထား​ပေ​မဲ့ အခြား လင်း​နက်-distros တွေ​အတွက်​လဲ အကျုံး​ဝင်​ပါ​လိမ့်​မယ်။ ဦး​ဘွန်​တု-သီး​သန့်​မဟုတ်​ပေ​မဲ့ တစ်​ချို့​အချက်အလက်​တွေ​က GNOME-သီး​သန့်​ပါ။ ကျွန်တော် GNOME မှာ​ပဲ စမ်း​ထား​ပါ​တယ်။ အခြား Desktop Enviroment တွေ​အတွက် (ဥပမာ။ KDE) အကျုံး​ဝင်​ချင်​မှ ဝင်​ပါ​လိမ့်​မယ်။

၁။ ယူ​နီ​ကုတ်​ပြောင်း⁠ပြောင်း​ချင်း မြင်သာ​တဲ့ အကျိုး​က မြန်မာ​စာစီ​စနစ် (sorting) ကို သုံး​လို့ ရ​လာ​တာ​ပါ။ အရင်​တုန်း​က ကျွန်တော် ဇော်ဂျီ​ကို သုံး​စဥ်​တုန်း​က ဖိုင်​မန်နေဂျာ(file manager)တွေ​မှာ မြန်မာ ဖိုင်​နာမည်​တွေ​ကို နာမည်​အလိုက် စီ​လို့ မ​ရ​ပါ​ဘူး။ ကျွန်တော်​စက်​ထဲ​မှာ ဖိုင်​နာမည် အတော်​များ⁠များ​ကို မြန်မာ​လို​သိမ်းထား​တဲ့​အခါ နာမည်​အလိုက် စီ​ထား​တော့ ရှာ​ရ​ဖွေ​ရ ပို​လွယ်​လာ​ပါ​တယ်။ ဖိုင်​မန်နေဂျာ​တွေ​မှ မဟုတ်​ပါ။ အခြား ယူ​နီ​ကုဒ်​ကို အသုံးပြု​တဲ့ ပ​ရို​ဂ​ရမ်​အတော်တော်​များ⁠များ​မှာ မြန်မာ​စာ​တွေ​ကို အဆင်​ချော​ချော သုံး​လို့​ရ​လာ​ပါ​တယ်။ ဥပမာ -  မြန်မာ​စာ​တွေ​ကို စီ​ချင်​ရင် တစ်​ခြား​မည်​သည့်​ဆော့ဖ်​ဝဲ​မှ မ​လို​ပဲ ကွန်​မန်း​လိုင်း​က sort ကို သုံး​ပြီး စီ​နိုင်​ပါ​တယ်။





ဒီ​အတွက် လင်း​နက်​အတွက် မြန်မာ locale ဖန်တီး​ရေးသား​ပေး​ထား​တဲ့​သူ​တွေ​ကို ကျေးဇူးတင်​ကြောင်း ပြော​လို​ပါ​တယ်။

၂။ ကျွန်တော် စမ်းသပ်​မိ​သ​လောက် လက်​ရှိ ယူ​နီ​ကုတ်​ဖောင့်​တွေ​ထဲ​မှာ ပိတောက်​တစ်​ခု​ပဲ ပြည့်⁠ပြည့်​ဝ​ဝ မှန်​မှန်ကန်​ကန် render လုပ်​နိုင်​ပါ​တယ်။ ဒါ​ကြောင့် ပိတောက်​ကို​ပဲ အမြင် သိပ်​မလှ​ပေ​မဲ့ သုံး​ဖြစ်​ပါ​တယ်။

၃။ ယူ​နီ​ကုတ် ကီး​ဘုတ်​ကို ဦး​ဘွန်​တု​မှာ သုံး​ချင်​ရင် နည်း​လမ်း အတော်​များ​များ ရှိ​ပါ​တယ်။  ပထမ​တစ်​ခု​က ကို​စေ​တန်၊ ကို​ဘောက်​တူး တို့​လုပ်​ထား​တဲ့  ကီးဘုတ်ကို သုံး​တာ​ပါ။ ကွန်​မန်း​လိုင်း​က​နေ  dpkg -i --force-all zg-mm3-kb.deb ဆို​ပြီး သွင်း​ဖို့ လို​ပါ​မယ်။ နောက်​တစ်​ခု​က ကျနော် အရင်​က ရေးထား​တဲ့ ibus ကို သုံး​ပြီး ရိုက်​နည်းပါ။ ဇော်ဂျီ​ကီး​ဘုတ်​က သိပ်​အဆင်​မ​ချော​ပေ​မဲ့ ယူ​နီ​ကုတ် ကီး​ဘုတ်​က ကျနော် စမ်း​ထား​သ​လောက် အဆင်​ပြေ​ပါ​တယ်။ ဒါ​မှ​မဟုတ် ibus မှာ​ပဲ ကိုအိမောင် ရေးထား​တဲ့​နည်းကို သုံး​ပြီး​လည်း ရိုက်​နိုင်​ပါ​တယ်။ ဒါ​ကို​တော့ ကျနော်  သေချာ မ​စမ်း​ဖြစ်​သေး​ပါ။

၄။ ကျွန်တော် သုံး​ဖူး​သ​လောက် ဝင်း​ဒိုး ပ​ရို​ဂ​ရမ်​တွေ​မှာ မြန်မာ​ဖောင့်​သုံး​ချင်​ရင် သက်ဆိုင်​ရာ ပ​ရို​ဂ​ရမ်​ရဲ့ ဆက်​တင်​မှာ ဖောင့်​ကို မိမိ နှစ်​လို​သော မြန်မာ​ဖောင့် ပြောင်းလဲ​သတ်​မှတ် ပေး​ဖို့​လို​ပါ​တယ်။ (ဥပမာ — ဂျီ​တော့​မှာ ဖောင့်​မ​ပြောင်း​ထား​ရင် မြန်မာ​စာ​တွေ​ကို လေးထောင့်​အကွက်​လေး​တွေ​ပဲ မြင်​နေ​ရ​တာ​မျိုး​ပါ။) အဲ​ဒီ​လို ဖောင့်​ပြောင်း​တာ​ရဲ့ ပြဿနာ​က မြန်မာ​ဖောင့် အတော်​များ⁠များ​ရဲ့ အင်​ဂ​လိပ်စာ စာလုံး​တွေ​က မလှ​တာ​ပါ။ ကံကောင်း​တာ​က ဦး​ဘွန်း​တု ပ​ရို​ဂ​ရမ်​တွေ​မှာ အဲ​လို ဖောင့်​ကို တိုက်ရိုက်​ကြီး သတ်​မှတ်​ပေး​စရာ​မ​လို​ပါ​ဘူး။ ဦး​ဘွန်း​တု​မှာ သက်ဆိုင်​ရာ ဘာသာ​စကား(စာသား)ကို default ဖောင့်​က render မ​လုပ်​နိုင်​ဘူး​ဆို​ရင် fontconfig ဆို​တဲ့  library ကို သုံး​ပြီး အခြား သင့်တော်​ရာ ဖောင့်​ကို ရွေးချယ် render လုပ်​ပေး​ပါ​တယ်။ ဒီ​မှာ ပြဿနာ​တစ်​ခု​က ကိုယ့်​စက်​ထဲ​မှာ မြန်မာ​ဖောင့်​တစ်​ခု​ထက် ပို​ရှိ​နေ​ရင် fontconfig က ဘယ်​ဖောင့်​ကို ရွေး​မ​လဲဆို​တာ​ပါ။

မိမိ စက်​ထဲ​မှာ မြန်မာ​ဖောင့် တစ်​ခု​ထက် ပို​ရှိ​နေ​ရင် ဘယ်​ဖောင့်​ကို​ရွေး​သလဲ​ဆို​တာ​ကို အောက်​ပါ ကွန်​မန်း​ကို အသုံးပြု​ပြီး သိရှိ​နိူင်​ပါ​တယ်။
fc-match ":lany=my"



ဆို​ပါ​စို့ — စက်​ထဲ​မှာ ဇော်ဂျီ​ကော တစ်​ခြား​ယူ​နီ​ကုတ်​ဖောင့်​တွေ​ပါ ရှိ​ရင် ပုံ​မှန်​အား​ဖြင့် fontconfig က ဇော်ဂျီ​ကို ရွေး​ပါ​လိမ့်​မယ်။ (ဇော်​ဂျီ​က ယူ​နီ​ကုတ်​ဖောင့်​တွေ​ထက် code point ပို​များ⁠များ​ပါ​လို့ နေ​ပါ​လိမ့်​မယ်။) ဒါ​ကို မိမိ​ရဲ့ home ဖိုလ်​ဒါ​အောက်​မှာ ".fonts.conf" ဆို​တဲ့ ဖိုင်​ကို အောက်​မှာ​ပြ​ထား​သ​လို ပြင်​ပေး​ဖို့ လို​ပါ​မယ်။  (padauk နေရာ​မှာ အခြား​မိမိ​နှစ်​လို​ရာ ဖောင့်​နာမည်​ကို ပြောင်း​ပါ။)

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <!--- Use padauk as Default Fallback Font -->
  <match targe="pattern"> 
    <test qual="any" name="lang" compare="eq"><string>my</string></test> 
    <edit mode="assign" name="family"> 
      <string>padauk</string> 
    </edit> 
   </match> 
</fontconfig>

၅။ နောက်​ပြဿနာ တစ်​ခု​က ဖောင့်​အကြီး​အသေး​ပါ။ မြန်မာ​ဖောင့်​တွေ​ကြီး​လွန်း​တာ သေး​လွန်း​တာ ချိန်​ချင်​ရင် fontconfig ကို​ပဲ သုံး​ပြီး ပြင်​နိုင်​ပါ​တယ်။

<?xml version="1.0"?> 
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> 
<fontconfig>
  <!--- Use padauk as Default Fallback Font -->
  <match targe="pattern"> 
    <test qual="any" name="lang" compare="eq"><string>my</string></test> 
    <edit mode="assign" name="family"> 
      <string>padauk</string> 
    </edit>
    <!--- Change Font Size -->
    <edit name="pixelsize" mode="assign">
      <double>16</double>
    </edit>
   </match> 
</fontconfig>

၆။ နံပါတ် (၁) မှာ ဆို​ထား​တဲ့​အတိုင်း ကျနော်​စက်​မှာ ယူ​နီ​ကုတ်​ဖောင့်​တွေ​ထဲ​က ပိတောက်​တစ်​ခု​ပဲ အဆင်​ချော​ချော render လုပ်​နိုင်​ပါ​သေး​တယ်။ ဒါပေမဲ့ အွန်​လိုင်းပေါ်​က တစ်​ချို့ ဆိုက်​တွေ​က (ဥပမာ-MITP) မြန်မာ​သ​ရီး​ကို default လုပ်​ထား​တတ်​ပါ​တယ်။ ဒါ​ကြောင့် - မြန်မာ​သ​ရီး ဖောင့်​နဲ့ render လုပ်​ရ​မဲ့ စာသား​တွေ​ကို padauk နဲ့ ပြောင်း​ပြီး render လုပ်​ချင်​တယ် ဆို​ပါ​စို့။ " .fonts.conf" ဖိုင်​ကို အောက်​မှာ ပြ​ထား​သည့်​အတိုင်း ထပ်မံ ပြင်ဆင်​ပေး​ဖို့ လို​ပါ​လိမ့်​မယ်။

<?xml version="1.0"?> 
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> 
<fontconfig>
  <!--- Use padauk as Default Fallback Font -->
  <match targe="pattern"> 
    <test qual="any" name="lang" compare="eq"><string>my</string></test> 
    <edit mode="assign" name="family"> 
      <string>padauk</string> 
    </edit> 
  </match>
  <!-- replace myanmar3 with padauk -->
  <match targe="pattern">
    <test qual="any" name="family" compare="eq"><string>myanmar3</string></test>
    <edit mode="assign" name="family">
      <string>padauk</string>
    </edit>
  </match>
</fontconfig>
--- ဆက်​ရန် ---

How to install & use Masterpiece Uni Sans on Ubuntu

Why?
  • Being linux-native (using pango to render), it is slightly faster to render than other fonts.
  • All other unicode fonts except padauk have some (minor) rendering problems on linux. MasterPiece Uni Sans can render properly and look better than padauk.
Steps

1) Download and install the font ttf-masterpiece_0.6-0ubuntu1_all.deb.

2) Download and install the patched pango module. This module is patched, meaning it is different from the original module from Ko Tin Myo Htet (prahita). The original module will not render other unicode fonts like myanmar3, padauk correctly, making burmese text in some sites like mitp scrambled in firefox. If you have previously installed it before, you need to reinstall this file. For other distros, apply this patch, build and install from source.

3) Create a file, ".blacklist-mymr-fonts", in your home directory and put the burmese font names you don't want to render with this module (one font per line).  For example,
echo -e "Myanmar3\nPadauk\nZawgyi-One" > .blacklist-mymr-fonts

Now, you can use MasterPiece Uni Sans in all gtk+ applications. You cannot use it in openoffice, since openoffice doesn't use pango. If certain burmese fonts are not rendering properly, don't forget to put their font names in aforesaid ".blacklist-mymr-fonts".

Feb 5, 2011

လင်း​နက်စ်​ကို ဘာ​ကြောင့်​သုံး​သင့်​လဲ

လင်း​နက်စ်​နဲ့ ပတ်​သတ်​ပြီး အမြင်​မှား​တစ်​ချို့

- လင်း​နက်​က သာမန်​လူ​တွေ သုံး​ဖို့ မဟုတ်​ဘူး။
ကျနော် networking စ​သင်​ကာ​စ​က သင်​တန်း​မှာ သူ​များ​တွေ​ကို လင်း​နက်စ် သင်​နေ​တာ သွား​ကြည့်​ဖူး​ပါ​တယ်။ အဲ​ဒီ​တုန်း​ကတော့ အမဲ​ရောင် screen ကြီး​မှာ ကွန်​မန်း​တွေ ရိုက်​နေ​တာ​ကို​ပဲ တွေ့​တော့ လင်း​နက်စ်​ဆို​တာ ကွန်​ပြူ​တာ ကျွမ်းကျင်​ပညာ​ရှင်​တွေ​ပဲ သုံး​တာ​လို့ တွေး​မိ​ခဲ့​ဖူး​ပါ​တယ်။ လင်း​နက်စ်​အကြောင်း ကြား​ဖူး​ကာ​စ လူ​တွေ​လည်း အဲ​ဒီ​လို​ပဲ တွေး​တတ်​ပါ​တယ်။ ဟိုး​အရင်​တုန်း​က လင်း​နက်စ်​ကို ကျွမ်းကျင်​ပညာ​ရှင်​တွေ​ပဲ အဓိက သုံး​ခဲ့​ပေ​မဲ့ အခု​အချိန်​မှာ အဲ​ဒါ​က မ​မှန်​တော့​ပါ​ဘူး။ လင်း​နက်စ်​ကို အသုံးပြု​နေ​တဲ့ သာမန်​ကွန်​ပြူ​တာ​အသုံးပြု​သူ (Desktop User) တွေ သန်း​ချီ ရှိ​နေ​ပါ​ပြီ။

- လင်း​နက်စ်​က ၀င်း​ဒိုး​လောက် မလှ​ဘူး။
မှား​ပါ​တယ်။ တစ်​ကယ်​တော့ လင်း​နက်စ်​က သေချာ​ပြင်ဆင်​သုံး​တတ်​သွား​ရင် ၀င်း​ဒိုး​ထက် အပြန်​တစ်​ရာ​လောက် လှ​အောင် ဖန်တီး​နိူင်​ပါ​တယ်။ အောက်​က ဗီ​ဒီ​ယို​တွေ​ကို န​မူ​နာ​ကြည့်​နိူင်​ပါ​တယ်။
http://www.youtube.com/watch?v=Of4m0AgPv-o
http://www.youtube.com/watch?v=69bKvvDV7a0

- လင်း​နက်စ်​က သုံး​ရ​တာ ခက်​တယ်။
လင်း​နက်စ်​က သုံး​ရ​တာ မ​ခက်​ပါ​ဘူး။ ဒါပေမဲ့ ၀င်း​ဒိုး​ကို သုံး​နေ​ကြ​လူ​က လင်း​နက်စ်​ကို စ​ပြောင်း​သုံး​တာ​ဆို​ရင် လုံး​ဝ​ကွဲပြား​တဲ့ system နှစ်​ခု ဖြစ်​တဲ့ အညီ ကျင့်​သား​မ​ရ​မ​ချင်း နည်း​နည်း အခက်​တွေ့​နိူင်​ပါ​တယ်။ ကျနော်​တို့ ၀င်း​ဒိုး​ကို စ​သုံး​ကာ​စ​က​လည်း အဲ​ဒီ​လို အခက်​တွေ့​ခဲ့​တာ​ပဲ ... မဟုတ်​ဘူး​လား။

- လင်း​နက်စ်​အတွက် လုပ်​ငန်း​သုံး​ပ​ရို​ဂ​ရမ်(Application)တွေ သိပ်​မ​ရှိ​ဘူး။
ဒါ​လည်း မှား​ပါ​တယ်။ လင်း​နက်စ်​အတွက် ရေးထား​တဲ့ ပ​ရို​ဂ​ရမ်​တွေ ထောင်​ချီ​ပြီး​တော့ ရှိ​ပါ​တယ်။ လင်း​နက်စ်​က အခု​မျက်မှောက်​မှာ ၀င်း​ဒိုး​လောက် ဆောဖ့်​ဝဲ​တွေ မ​ရှိ​သေး​ဘူး​ဆို​ပေ​မဲ့ ၀င်း​ဒိုး​အတွက် ထုတ်​လုပ်​ထား​တဲ့ ပ​ရို​ဂ​ရမ်​တွေ အများ​စု​ကို လင်း​နက်စ်​မှာ ဝိုင်(Wine) ဆို​တဲ့ ပ​ရို​ဂ​ရမ်​နဲ့ အသုံးပြု​နိူင်​ပါ​တယ်။ ပြီး​တော့ အခု​နောက်​ပိုင်း ကုမ္ပဏီ အများ​စု​က ၀င်း​ဒိုး​အတွက်​သာ​မက လင်း​နက်စ်​အတွက်​ပါ ပ​ရို​ဂမ်​တွေ ထုတ်​လာ​ကြ​ပါ​ပြီ။

- လင်း​နက်​က သွင်း​ရ​ခက်​တယ်။
လုံး​ဝ လုံး​ဝ​ကို မှား​ပါ​တယ်။ လင်း​နက်စ်​လောက် သွင်း​ရ​လွယ်​တာ လင်း​နက်စ်​ပဲ ရှိ​ပါ​တယ်။ လင်း​နက်စ်​က ၀င်း​ဒိုး​ထက် သွင်း​ရ​တာ ပို​မြန်​သ​လို ပို​လဲ​လွယ်​ပါ​တယ်။ လင်း​နက်စ်​ကို မိမိ​ကွန်​ပြူ​တာ​မှာ မ​သွင်း​ပဲ စီ​ဒီ​ရွမ်​က​နေ စမ်း​သုံး​ကြည့်​လို့​တောင် ရ​ပါ​တယ်။

ဘာ​လို့ လင်း​နက်စ်​ကို သုံး​သင့်​လဲ

- လင်း​နက်စ်​က ငွေ​ကြေး​အကုန်အကျ သက်သာ​တယ်။
၀င်း​ဒိုး​ကို အသုံးပြု​ဖို့ ဒေါ်လာ​ရာ​နဲ့​ချီ​ပြီး ၀ယ်​ရ​တာ​ပါ။ မြန်မာ​ငွေ​ဆို သိန်း​ချီ​ပြီး ကျ​မှာ​ပေါ့။ ကျနော်​တို့ မြန်မာ​နိူင်​ငံ​မှာ အခု ၀င်း​ဒိုး​ကို သုံး​နေ​တာ အများ​စု​က လိုင်စင်​မဲ့ (pirate) ခိုး​သုံး​နေ​ကြ​တာ​ပါ။ ဒါ​က အခု​အချိန်​မှာ ပြဿနာ မ​ရှိ​သေး​ပေ​မဲ့ နောင်​တစ်​ချိန်​မှာ ရှိ​လာ​နိူင်​ပါ​တယ်။ လင်း​နက်စ်​ကို​တော့ အခ​မဲ့ အင်​တာ​နက်ပေါ်​က ဒေါင်း​လုပ်⁠လုပ်​ပြီး သုံးစွဲ​နိူင်​ပါ​တယ်။ ပြီး​တော့ ၀င်​ဒိုး​မှာ တစ်​ခြား ပ​ရို​ဂ​ရမ်​တွေ အများ​စု​က​လည်း ပိုက်ဆံ​ပေး​ဝယ်​ရ​တာ​ပါ။ လင်း​နက်စ် ပ​ရို​ဂ​ရမ်​တွေ အများ​စု​က အခ​မဲ့​ပါ။ ဥပမာ - ၀င်း​ဒိုး​အတွက် ရုံး​သုံး​ပ​ရို​ဂ​ရမ်(Microsoft Office) ကို ဒေါ်လာ​ရာ​ချီ​ပြီး ပေး​ဝယ်​ရ​ပါ​လိမ့်​မယ်။ ထို​နည်းတူ မိမိ ဓာတ်​ပုံ​လေး​တွေ ပြင်ဆင်​လို​ပြန်​ပြီ​ဆို​ရင် ဖို​တို​ပြင်​တဲ့ ပ​ရို​ဂ​ရမ်(Adobe Photoshop) ကို ၀ယ်​ရ​ပါ​လိမ့်​မယ်။ လင်း​နက်စ်​မှာ​တော့ Open Office, GIMP အစ​ရှိ​တဲ့ ပ​ရို​ဂ​ရမ်​တွေ​ကို အခ​မဲ့ ရ​ယူ​နိူင်​သုံးစွဲ​နိူင်​ပါ​တယ်။

- လင်း​နက်စ်​က လွတ်လပ်​မူ (Freedom) ရှိ​တယ်။
အခ​မဲ့​ဖြစ်​တာ​နဲ့ လွတ်လပ်​တာ​နဲ့ မ​တူ​ပါ​ဘူး။ တစ်​ချို့ ပ​ရို​ဂ​ရမ်​တွေ​က အခ​မဲ့ ရ​ယူ​သုံးစွဲ​နိူင်​ပေ​မဲ့ အဲ​ဒီ ပ​ရို​ဂ​ရမ်​ကို မိမိ စိတ်​ကြိုက်​ပြင်ဆင် သုံး​ဆွဲ​နိူင်​ခွင့် မ​ရှိ​သ​လို တစ်​ခြား သူ​တွေ​ကို​လည်း ပြန်လည်​မျှဝေ​ခွင့် မ​ရှိ​အောင် လိုင်စင်​တွေ​နဲ့ ကန့်သတ်​ထား​ပါ​တယ်။ အဲ​ဒါ​တွေ​ကို freeware လို့ခေါ်​ပါ​တယ်။ ဒါပေမဲ့ လင်း​နက်စ်​နဲ့ လင်း​နက်စ်​ပ​ရို​ဂ​ရမ်​အများ​စု​ကို ဘယ်​လို ရေးသား​ထား​တယ်​ဆို​တာ မိမိ​ကိုယ်တိုင် လေ့​လာ​ကြည့်​ရူ​ပြီး မိမိ​စိတ်​ကြိုက်​ပြင်ဆင် သုံးစွဲ​နိူင်​ပါ​တယ်။ ပြီး​တော့ လွတ်လွတ်​လပ်​လပ် ပြန်လည်​မျှဝေ​ခွင့် ရှိ​ပါ​တယ်။ အဲ​ဒါ​ကို free software လို့ခေါ်​ပါ​တယ်။ ၀င်း​ဒိုး​က လိုင်စင်​တွေ​နဲ့ ကန့်သတ်​ထား​လို့ လွတ်လပ်​ခွင့် လုံး​ဝ မ​ရှိ​ပါ​ဘူး။ မိမိ​က ၀ယ်​ပြီး​သွား​ရင်တောင် ကွန်​ပြူ​တာ​တစ်​လုံး​ဆို တစ်​လုံး​မှာ​ပဲ သုံး​ရ​ပါ​မယ်။ နောက်​တစ်​လုံး​မှာ သုံး​ချင်​ရင် နောက်​လိုင်စင်​တစ်​ခု ထပ်​ဝယ်​ရ​ပါ​မယ်။ လင်း​နက်စ်​မှာ​တော့ မိမိ​စိတ်​တိုင်း​ကျ လွတ်လွတ်​လပ်​လပ် သုံးစွဲ​ပြီး ပြန်လည်​မျှဝေ​နိူင်​ပါ​တယ်။

- လင်း​နက်စ်​က ပိုမို​လုံခြုံ​ပြီး ပြဿနာ​ရှင်း​တယ်။
လင်း​နက်စ်​က ၀င်း​ဒိုး​ထက် အများ​ကြီး ပို​ပြီး လုံခြုံ​စိတ်ချ​ရ​ပါ​တယ်။ ဒါ​ကြောင့်​လည်း လုံခြုံ​ရေး (Security) အဓိက ဖြစ်​တဲ့ အင်​တာ​နက်​ဆာ​ဗာ​တွေ အများ​စု​က လင်း​နက်စ်​ကို​ပဲ သုံး​ကြ​တာ​ပါ။ လင်း​နက်​ကို သုံး​ရင် BSOD (Blue Screen of Death), Virus, Worms, Trojan တွေ​ကို မေ့​ထား​နိူင်​တယ်။ Anti-Virus, Firewall တွေ အတွက်​လည်း ခေါင်း​စားစရာ လို​တော့​မှာ မဟုတ်​ဘူး။ လင်း​နက်စ်​မှာ စက်​ဟန်း​သွား​လို့ ကွန်​ပြူ​တာ ပြန်​စ​ရ​တယ်(restart) ဆို​တာ မ​ရှိ​ပါ​ဘူး။

- လင်း​နက်စ်​က ပိုမို​ယုံကြည်​စိတ်ချ​ရ​တယ်။
၀င်း​ဒိုး​က closed source၊ လင်း​နက်စ်​က open source ပါ။ Source(source code) ဆို​တာ​က ကွန်​ပြူ​တာ ပ​ရို​ဂ​ရမ်​တွေ​ကို ဘယ်​လို​ရေးသား​ထား​လဲဆို​တဲ့ နည်း​ပါ။ ဥပမာ - ပြော​ရ​ရင် ကျနော်​တို့ ကိတ်​မုန့် ၀ယ်​တယ် ဆို​ပါ​စို့။ ကိတ်​မုန့်​ကို ဘယ်​လို​ဖုတ်​ထား​တယ်​ဆို​တဲ့ အသေး​စိတ်​ကို ကျနော်​တို့ မ​သိ​နိူင်​ပါ​ဘူး။ ထို​နည်းတူ closed source ပ​ရို​ဂ​ရမ်​တွေ​ကို ဘယ်​လို​ရေးသား​ထား​ပြီး ဘာ​တွေ​လုပ်​တယ်​ဆို​တယ်​ကို ကျနော်​တို့ သေချာ မ​သိ​နိူင်​ပါ​ဘူး။ ပြဿနာ​က ကိတ်​မုန့်​ထဲ ဘာ​ပါ​တယ်​ဆို​တာ​ကို ကျနော်​တို့ သေချာ မ​သိ​နိူင်​သ​လို closed source ပ​ရို​ဂ​ရမ်​တွေ ဘာ​တွေ​လုပ်​နေ​တယ်​ဆို​တာ ကျနော်​တို့ မ​သိ​နိူင်​ပါ​ဘူး။ မိုက်​က​ရို​ဆောဖ့်​က ကျနော်​တို့​ရဲ့ အရေးကြီး​တဲ့ ကိုယ်​ရေး​ကိုယ်​တာ​အချက်အလက်​တွေ​ကို အင်​တာ​နက်​က တစ်​ဆင့်​ပြန်​ပြီး စုဆောင်း​နေ​သလား​ဆို​တာ ဘုရားသခင်​နဲ့ ဘီလ်​ဂိတ်​ပဲ သိ​ပါ​တယ်။ :P လင်း​နက်​မှာ​တော့ open source ဖြစ်​တဲ့​အတွက် ဘာ​တွေ​ဘယ်​လို ရေးသား​ထား​တယ်​ဆို​တာ​ကို လူ​တိုင်း​ကြည့်​ရူ စစ်ဆေး​နိူင်​ပါ​တယ်။ တစ်​ကယ်​လည်း ကွန်​ပြူ​တာ​ပညာ​ရှင်​များ​စွာ​က လေ့​လာ​စစ်ဆေး​နေ​တာ​ပါ။ ဒါ​ကြောင့် open source ပ​ရို​ဂ​ရမ်​တွေ​က ပို​ပြီး ယုံကြည်​စိတ်ချ​ရ​ပါ​တယ်။

- လင်း​နက်စ်​ကို လက်ဝါး​ကြီး​အုပ်​ထား​တဲ့ ကုမ္ပဏီ မ​ရှိ​ပါ​ဘူး။
၀င်း​ဒိုး​ကို ကုမ္ပဏီ​တစ်​ခု​တည်း(မိုက်​က​ရို​ဆောဖ့်)က​ပဲ လက်ဝါး​ကြီး​အုပ် ထား​တာ​ပါ။ ဥပမာ ဆို​ပါ​စို့ - မိုက်​က​ရို​ဆောဖ့်​ကို ၀င်း​ဒိုး​ကို ဆက်​မ​ထုတ်​တော့​ဘူး​ဆို​ရင် ကျနော်​တို့ ဘာ​မှ မတတ်​နိူင်​ပါ​ဘူး။ လင်း​နက်စ်​က အဲ​ဒီ​လို ကုမ္ပဏီ တစ်​ခု​တည်း​ကို မှီခို​တာ မ​ရှိ​ပါ​ဘူး။ Red Hat က ဖီ​ဒို​ရာ(Fedora) လင်း​နက်စ်​ကို ဆက်​မ​ထုတ်​တော့​ဘူး​ဆို​ရင် ကျနော်​တို့ Canonical က အူ​ဘွန်​တု(Ubuntu) လင်း​နက်စ် ကို​သုံး​နိူင်​ပါ​တယ်။ ဒါ​မှ​မဟုတ် လင်း​နက်စ်​က အထက်​မှာ​ဆို​ခဲ့​တဲ့​အတိုင်း free software ဖြစ်​တဲ့​အတွက် မိမိ​ကိုယ်တိုင် ကုမ္ပဏီ​ထောင်​ပြီး ပြန်လည်​ဖြန့်​ဝေ​လို့​ရ​ပါ​တယ်။

- လင်း​နက်​က ပိုမို​အဆင်​မြင့်​ကောင်းမွန်​တယ်။
၀င်း​ဒိုး​မှာ လုံး​ဝ မ​ဖြစ်​နိူင်​တဲ့ ပိုမို​အဆင့်​မြင့်​ကောင်းမွန်​တဲ့ နည်း​ပညာ​တွေ လင်း​နစ်​မှာ အများ​ကြီး​ပါ⁠ပါ​တယ်။ ဥပမာ ဆို​ပါ​စို - ၀င်း​ဒိုး​မှာ ကွန်​ပြူ​တာ​မှာ ရှိ​သ​မျှ ပ​ရို​ဂ​ရမ်​တွေ အားလုံး​ကို upgrade လုပ်​ဖို့ မလွယ်​ပါ​ဘူး။ window update ရှိ​ပေ​မဲ့ အဲ​ဒါ​က မိုက်​က​ရို​ဆောဖ့်​က ဆောဖ့်​ဝဲ​တွေ​ပဲ update လုပ်​နိူင်​တာ​ပါ။ တစ်​ခြား မိုက်​က​ရို​ဆော့ဖ်​က မဟုတ်​တဲ့ ဆောဖ့်​ဝဲ​တွေ (Winzip, Winrar, Firefox, Nero Burning, PowerDVD ...) အစ​ရှိ​တာ​တွေ​ကို တစ်​ခု​ချင်း​လိုက်​ပြီး update လုပ်​ရ​မှာ​ပါ။ လင်း​နက်စ်​မှာ​တော့ က​လစ်​တစ်​ချက်​နှိပ်​ရုံ​နဲ့ ကွန်​ပြူ​တာ​ထဲ​မှာ သွင်း​ထား​တဲ့ ပ​ရို​ဂ​ရမ်​တွေ​အားလုံး​ကို update လုပ်​နိူင်​ပါ​တယ်။

- လင်း​နက်စ်​က ပို​မြန်​တယ်။
ဒါ​က ကိုယ်တိုင်​သုံး​ကြည့်​မှ သိ​မှာ​ပါ။ ဒါ​က အူ​ဘွန်​တု​လင်း​နက်စ်​နဲ့ ၀င်း​ဒိုး​ကို နိူင်း​ယှဉ်​ပြ​ထား​တာ​ပါ။

- လင်း​နက်စ်​က မိမိ စိတ်​ကြိုက် ပြင်ဆင်​လို့​ရ​တယ်။
၀င်း​ဒိုး​မှာ​ဆို​ရင် ပြင်ဆင်​လို့​ရ​တယ်​ဆို​ပေ​မဲ့ အကန့်​အသတ်​ရှိ​ပါ​တယ်။ နောက်​ခံ​ပုံ​တွေ၊ ကာ​လာ​ဒီ​ဇိုင်း၊ အထား​အသို​တွေ ပြောင်း​လို့​ရ​ပေ​မဲ့ အခြေ​ခံ Desktop Enviroment ပုံစံ​က တူ⁠တူ​ပါ​ပဲ။ လင်း​နစ်​မှာ​တော့ Desktop Enviroment ကို GNOME/KDE/xfce/Open Box/Xmonad အစ​ရှိ​သ​ဖြင့် မိမိ စိတ်​တိုင်း​ကျ ရွေးချယ်​ပြီး အသေး​စိတ် ပြင်ဆင်​နိူင်​ပါ​တယ်။

- လင်း​နက်စ်​မှာ အရမ်း​မိုက်​တဲ့ CLI ဆို​တာ ရှိ​တယ်။
ဒါ​က သာမန်​ကွန်​ပြူ​တာ​အသုံးပြု​သူ​တွေ အတွက် သိပ်​အရေး​မ​ပါ​လှ​ပေ​မဲ့ ကျနော်​တို့​လို ကွန်​ပြူ​တာ​သမား​တွေ အတွက် အရမ်း​အသုံးဝင်​ပါ​တယ်။ တစ်​ချို့​ကိစ္စ​တွေ​မှာ GUI(Grahpical User Interface)ထက် CLI(Command Line User Interface)က ပို​သင့်လျော်​ပါ​တယ်။ ဥပမာ - မိမိ​က ဖိုလ်​ဒါ​တစ်​ခု​မှာ ရာ​ချီ​ရှိ​တဲ့ text file တွေ​အားလုံး​ထဲ​က OS ဆို​တဲ့ စကားလုံး​ပါ​တာ​ကို ရှာ​ချင်​တယ် ဆို​ပါ​စို့။ လင်း​နက်စ်​မှာ "grep 'OS' -R ." ဆို​တဲ့ ကွန်​မန်း​လေး တစ်​ခု​နဲ့​တင် ပြီး​ပါ​တယ်။