Monday, December 28, 2009

HOWTO : Google Public DNS

Google Public DNS is a free, global Domain Name System (DNS) resolution service, that you can use as an alternative to your current DNS provider. It is faster and more secure than OpenDNS.

Configure your network settings to use the IP addresses and as your primary and secondary DNS servers respectively.

Google Public DNS

Speed up your browsing experience

Improve your security

Frequently Asked Questions

HOWTO : Screen resolution on Ubuntu 9.10

When your display cannot report the correct EDID (Extended Display Identification Data), your X will not work properly. Usually, it will display 800x600 resolution or lower although your display is 1024x768 or higher.

Step 0 :
sudo service gdm stop
sudo Xorg -configure
sudo service gdm start

Step 1 :
If your monitor is 1024x768 at 60Hz, you can go to the following site and calculate the modeline.

Calculator for video timings

Select standard "1024x768@60Hz" mode and press the Calculate button.

The modeline will be as the followings :

Modeline "1024x768" 65 1024 1048 1184 1344 768 771 777 806 -hsync -vsync

Copy and paste the captioned "modeline" to "Monitor Section" of ~/

Step 2 :
sudo cp /etc/X11/xorg.conf

Step 3 :
Go to "System" - "preference" - "Display"

Choose "Yes" and select the desired resolution then save.

Step 4 :
Reboot your system or restart X.

If you are using nVidia display card, you need to do the following.

Step a :
Install the nVidia driver from "System" - "Administration" - "Hardware driver".

Reboot your system.

Step b :
sudo nvidia-xconfig

Step c :
gksudo nvidia-settings

Select the desired resolution and save to the configuration file.

Step d :
Go to "System" - "preference" - "Display"

Choose "No" and select the desired resolution then save.

Step e :
Reboot your system or logout and login again.

That's all. See you!

Saturday, December 19, 2009

HOWTO : HSDPA/HSPA modem on Ubuntu 9.10

When you are the first time using HSDPA/HSPA modem on Ubuntu 9.10, you will not encounter any problem. However, when you use the modem the second time, it hardly to get the DNS. As a result, you cannot surf the internet.

Therefore, you should write the DNS down when you insert the HSDPA/HSPA modem to the Ubuntu 9.10 the first time. Add the DNS to the Network Manager by editing "IPV4 Setting" - "PPP address only".

The following are some service providers in Hong Kong :

3HK -
Primary DNS
Secondary DNS

CSL, One2Free, 1010 -
Primary DNS
Secondary DNS

Smartone Vodefone - unknown to me

That's all. See you!

Monday, December 14, 2009

HOWTO : Ubuntu 9.10 on HP Mini 110 Netbook

HP Mini 110 Netbook is using Broadcom 4312 Wifi card (bcm4312). However, Ubuntu 9.10 cannot recognize the hardware. You should do something on it.

The tutorial also suits for bcm4311, 4321 and 4322 hardware.

Install the driver
sudo apt-get remove b43xx-fwcutter
sudo apt-get install bcmwl-kernel-source

Append "wl" to the following file.
sudo nano /etc/modules


Configure the module
sudo nano /etc/modprobe.d/wl

Add the following line.
install wl modprobe -r b43 b44 b43legacy ssb; modprobe --ignore-install wl $CMDLINE_OPTS; modprobe ssb; modprobe b44;

Reboot your system.

That's all. See you!

Sunday, December 13, 2009

HOWTO : Traditional Chinese handwriting on Ubuntu 9.10

Traditional Chinese handwriting is available in Linux now. Tegaki Project provides Traditional and Simpified Chinese as well as Japanese handwriting input for Linux, Mac OS X and Windows. It is developed by Python; thus, it is a cross-platform application.

However, Tegaki supports SCIM only. Therefore, you should install SCIM and change to use SCIM instead of iBus at "System" - "Administration" - "Language support".

Install SCIM
sudo apt-get install scim scim-modules-table scim-chewing scim-pinyin scim-chinese

Install Tegaki
Download and install the following files from the Tegaki official site. The packages in Ubuntu repository cannot be installed.

(a) tegaki-python (install this first)
cd ~
tar -xzvf tegaki-python-0.3.tar.gz
cd tegaki-python-0.3
sudo python install

(b) tegaki-pygtk (install this secondly)
cd ~
tar -xzvf tegaki-pygtk-0.3.tar.gz
cd tegaki-pygtk-0.3
sudo python install

(c) tegaki-recognize
cd ~
tar -xzvf tegaki-recognize-0.3.tar.gz
cd tegaki-recognize-0.3
sudo python install

(d) scim-tegaki
cd ~
tar -xzvf scim-tegaki-0.1.tar.gz
cd scim-tegaki-0.1
sudo python install

(e) tegaki-train
cd ~
tar -xzvf tegaki-train-0.3.tar.gz
cd tegaki-train-0.3
sudo python install

(f) tegaki-tools
cd ~
tar -xzvf tegaki-tools-0.3.tar.gz
cd tegaki-tools-0.3
sudo python install

(g) Models of Zinnia - Traditional Chinese.
cd ~
unzip tegaki-zinnia-traditional-chinese-0.3
cd tegaki-zinnia-traditional-chinese-0.3
sudo make install
cd ~

(h) Install Zinnia Recognition Engine.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-zinnia zinnia-utils libzinnia0

Gnome menu entry
Add the Tegaki to the Gnome menu.
sudo nano /usr/share/applications/tegaki.desktop

[Desktop Entry]
Name=Tegaki Handwriting
Comment=Tegaki Handwriting

How to use Tegaki

Step 1 :
Click on "Tools/Configure" icon on the right hand side panel. Set "Search after (msecs)" to 200 or larger. Then click on "Search on stroke" and "Confirm".

Step 2 :
Write the Chinese characters in the boxes provided. To clear the characters click "Sweep". If you want to make correction to the character that you just wrote, click on the character on the top bar.

Step 3 :
After wrote some characters, you can click on "Green tick". Then, go to the word processor or editor. Press "Ctrl+V" or click "Paste".

Tegaki Project
HOWTO : Ubuntu 9.10 on Gigabyte TouchNote T1028X

Saturday, December 12, 2009

HOWTO : Ubuntu 9.10 on Gigabyte TouchNote T1028X

Hardware configuration

Intel Atom N280 1.6GHz CPU
250GB 2.5" Hard Drive (Changed to Intel X25-M 80GB SSD)
10.1" Touch screen
PC Express card slot
3 x USB 2.0
All-in-one card reader
Carrying bag

This tablet netbook is in good desgin and quality. It is purchased on 2009-DEC-11 at $4,700-HK with USB mouse and screen protector as gifts. However, the screen protector is a little bit larger than the screen. I also added a Hauwei EM770 3.75G HSDPA modem and changed the hard drive to Intel X25-M 80GB SSD. The total cost is increased to $7,260-HK. Although the price is more or less reached the mid-range notebook level, it is worth to buy. By the way, it is a little bit heavy when holding it with one hand using touch screen feature.

Make sure to update your BIOS to "FC" version as it will activate the Wifi by default. The machine comes with "FB" version of BIOS.

The machine almost works perfectly on Ubuntu 9.10 including HSDPA modem but except touch screen feature. We need to do something to make it work.

Installation of Ubuntu 9.10

Make sure to press F6 on the startup menu and choose "expert mode" and followed by "Esc". Otherwise, your mouse will not work after the boot up.

Append the following line at the end of the command displayed on the screen.

elevator=noop i8042.noloop=1

Install Ubuntu 9.10 as usual. After the first boot up your mouse cannot work. Just follow the steps below to make it work again.

Press Ctrl+Alt+F2. At the command prompt, enter your username and password.

sudo nano /boot/grub/grub.cfg

Locate "linux" tag and append the following at the end of the line.

elevator=noop i8042.noloop=1

Save and reboot your system.

** Note : you need to add the line on every kernel updated.

Configure touch screen

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

sudo apt-get install xserver-xorg-input-evtouch gnome-randr-applet

sudo nano /etc/hal/fdi/policy/evtouch.fdi

Append the following lines.

<?xml version="1.0" encoding="UTF-8" ?>
<deviceinfo version="0.2">
<match key="info.product" contains="eGalax Inc. USB TouchController">
<merge key="input.x11_driver" type="string">evtouch</merge>
<merge key="input.x11_options.ReportingMode" type="string">Raw</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
<merge key="input.x11_options.Emulate3Timeout" type="string">1</merge>
<merge key="input.x11_options.SendCoreEvents" type="string">On</merge>
<merge key="input.x11_options.MinX" type="string">0</merge>
<merge key="input.x11_options.MinY" type="string">2</merge>
<merge key="input.x11_options.MaxX" type="string">4096</merge>
<merge key="input.x11_options.MaxY" type="string">4096</merge>

Reboot your system.

After booting up, go to "System" - "Administration" - "Calibrate Screen" and follow the instruction on screen to calibrate the screen.

Screen Rotation

You can rotate your screen on demand by Gnome Randr Applet. However, it cannot rotate your screen automatically.

Make Firefox work better

Install "Grab and Drag" add-on.

"Grab and Drag" add-on demo on Youtube.

That's all. See you!

Sunday, December 06, 2009

HOWTO : Why partitioning does matter on Ubuntu?

Ubuntu is one of the most user-friendly Linux distributions in the world. However, Linux distributions change a lot on every new release. Although we can upgrade to the newer release easily on Ubuntu, I suggest to have a fresh install on every new release.

In my opinion, it is a good practice to format your hard drive at least in four partitions. Such as

/boot (about 1GB)
/ (not less than 8GB)
/home (depends on your hard drive space reminded)
/swap (twice as your amount of RAM)

In this way, you can install and format /boot and / partitions and leave /home untouch on every new or re-install. All your settings at /home are reminded unchange as well as the data in that partition. Be keep in mind that you are NOT required to format /home partition.

You are also required to backup /etc/passwd and /etc/shadow when necessary if you have more than one user.

That's all. See you!

Tuesday, December 01, 2009

HOWTO : MyGica D689 USB HDTV Dongle on Ubuntu 9.10

We can watch digital TV including HDTV on Ubuntu 9.10 with MyGica D689 USB HDTV dongle. You may also require to buy a new nVidia series 9000 or up display card. Since series 9000, nVidia display card supports hardware acceleration for playing HD video.

In order to keep my Ubuntu box easy for update and secure, I prefer to install software packages from official and PPA repositories. However, I need to compile the MyGica driver in order to make it works. Only gXine works out of box without compilation.

Hardware and software used in this tutorial :

CPU - AMD Athlon 64 x 2 4200+
RAM - 8GB DDR2 800
Hard Drive - 320GB x 2 on Hardware RAID 0
HDTV - MyGica D689 HDTV USB dougle (v3.0)
Display card - XFX nVidia GT240 with 1GB DDR3 RAM and HDMI
Operating system - Ubuntu 9.10 Desktop AMD64 with Kernel 2.6.31-16-generic

The following procedures are for installing PPA nVidia display driver.

Step 1 - Add essential repositories :

(A) Add medibuntu repository (for general multimedia codecs and plugins)

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list &&
sudo apt-get -q update &&
sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring &&
sudo apt-get -q update

** Note : If you are using Ubuntu Samiux Remix, you are not required to add this repository as it is already added.

(B) Add nvidia-vdpau repository (for related VDPAU libraries)

echo "deb karmic main" | sudo tee -a /etc/apt/sources.list.d/nvidia-vdpau.list
echo "deb-src karmic main" | sudo tee -a /etc/apt/sources.list.d/nvidia-vdpau.list

Add key of nvidia-vdpau repository to the keyrings.

sudo apt-key adv --keyserver --recv-keys CEC06767

sudo apt-get update
sudo apt-get upgrade

** Remarks : Or, you can use this command
sudo sh -c 'echo "Test I want to write" > /path/to/file'

Step 2 - Install all related softwares, codecs and plugins :

sudo apt-get install x264 gxine gxineplugin mencoder mplayer-nogui

** Note : If you are using Ubuntu Samiux Remix, you are not required to install the following codecs and plugins.

sudo apt-get install ubuntu-restricted-extras quicktime-utils quicktime-x11utils libdvdnav4 libdvdread4 libdvdcss2 non-free-codecs faad

** Note : If you are using Ubuntu Samiux Remix, you may need to uninstall mplayer as it cannot work properly.

Then, reboot your system.

Step 3 - Install nVidia display driver

Select "System" - "Administration" - "Hardware driver" from the menu on the desktop.
Choose nVidia display driver 190 version as prompted. After the install, you are required to reboot your system.

After the reboot, you should install the following package.

sudo apt-get remove nvidia-settings
sudo apt-get install nvidia-settings-190

Step 3a - Alternative way to install nVidia display driver (Optional)

** Note : Choose Step 3 or 3a only but not both of them.

Uninstall the following package.

sudo apt-get remove nvidia-settings-190

Download the latest beta nVidia display driver 195.22 (as on 2009-11-28).

x86 version :

x86_64 version :

Install nVidia latest beta driver (195.22)

sudo apt-get remove nvidia-settings-190

sudo service gdm stop

It will go to command mode.

sudo sh


sudo sh

Follow the instructions on the screen to complete the installation.

sudo service gdm start

Reboot your system to make the driver activate.

For uninstall nVidia display driver :

sudo sh --uninstall
sudo sh --uninstall

** Note : If your kernel is updated, you should install the nVidia again.
** Note : Manual install of nVidia driver will overwrite some of the PPA's files. When you uninstall the driver, you need to reinstall the PPA's driver and libraries.

***The following procedure is for reinstall the PPA's driver after uninstalled manual installed official driver.

sudo service gdm stop
sudo apt-get --reinstall install nvidia-settings-190 nvidia-190-libvdpau nvidia-glx-190 nvidia-common nvidia-190-kernel-source xserver-xorg-video-nv nvidia-190-modaliases

sudo reboot

Download links for latest nVidia driver :

Download latest or beta x86 version
Download latest or beta x86_64 version

Then reboot your system.

Step 4 - Confirmation of VDPAU drivers are installed

Make sure "vdpau" is installed and activated.

ffmpeg -formats | grep vdpau

If you can see some vdpau displayed, vdpau works.

Step 5 - Install MyGica D689 driver :

sudo apt-get install mercurial

At you desired directory, such as /home/samiux.

mkdir mygica
cd mygica
hg clone
cd mygica_x8558pro

sudo make install

** Note : If you see an error of compiling FireDTV, you should do the following.

nano v4l/.config

Locate "CONFIG_DVB_FIREDTV=m" and change to "CONFIG_DVB_FIREDTV=n"

Save it and run "make" again.

sudo make install

Step 5a - Alternative way to install MyGica driver (Optional) :

** Note : Choose Step 5 or 5a only but not both of them.

Or, you can install this version. I prefer this version.

MyGica driver version used (Tip's version) :
Download Tip's version


tar -xvzf tip.tar.gz
cd mygica_x8558pro

sudo make install

** Note : If you see an error of compiling FireDTV, you should do the following.

nano v4l/.config

Locate "CONFIG_DVB_FIREDTV=m" and change to "CONFIG_DVB_FIREDTV=n"

Save it and run "make" again.

sudo make install

Tip's version changelog

Step 6 - Configure gXine :

Run gxine once and quit.

cd ~
nano .config/gxine/config

nano .config/gxine/channels.conf

Copy and paste the following :


* This "channels.conf" is for HONG KONG only.
** The first entry of the "channels.conf" will be played once it is activated.

Then, copy the channels.conf to ".xine" directory.

cp .config/gxine/channels.conf .xine/channels.conf

Or, you can scan your own.

sudo apt-get install dvb-apps

scan /usr/share/dvb/dvb-t/hk-HongKong > channels.conf

Step 7 - Further configure gXine :

(A) Select "File" - "Configure" - "Perference" on the gXine control panel. Make changes as is.

gui : experience_level (Expert)

audio : a52 : dynamic_range (enabled)
audio : a52 : surround_downmix (enabled)
audio : a52 : level (200)
audio : volume : mixer_volume (100)
audio : volume : remember_volume (enabled)

media : dvb : tuning_timeout (3500)
media : dvb : remember_channel (disabled) *Enabled if you want
media : dvb : channels_conf (select .config/gxine/channels.conf)

engine : performance : memcpy_method (libc)
engine : buffers : video_num_buffers (519999)
engine : buffers : video_num_frames (50)

** Other settings be keep them untouched.

(B) Select "Audio" - "Configure Plugins" - "Audio Post-processing" on gXine control panel.

Add/Change "volnorm" - "properties" - "method" (1) and apply the change.

(C) Select "Video" - "Configure Plugins" - "Deinterlace" on gXine control panel.

Add/Change "tvtime" - "properties" - "method" (use_vo_driver) and apply the change.

(Ca) Select "Video" - "Configure Plugins" - "Deinterlace" on gXine control panel.

Add/Change "pp" - "properties" - "quality" (39) - "mode" (vb) and apply the change.

(Cb) Select "Video" - "Configure Plugins" - "Deinterlace" on gXine control panel.

Add/Change "pp" - "properties" - "quality" (39) - "mode" (ha) and apply the change.

(Cc) Select "Video" - "Configure Plugins" - "Deinterlace" on gXine control panel.

Add/Change "pp" - "properties" - "quality" (39) - "mode" (va) and apply the change.

*If you find video playback chopping, you should applied this setting. Step 7 (Ca) to (Cc) are useful for an old CPU.

(D) Select "Video" - "Configure Plugins" - "Video Post-processing" on gXine control panel.

Add/Change "tvtime" - "properties" - "method" (LinearBlend) and apply the change.

Step 8 - Watch HDTV :

Run gxine from the "Application" - "Mutimedia" - "gXine".

Click on "File" - "DVB" or "Playlist" to watch TV on gxine. If you just start the gXine, you should click "DVB".

(A) Watch HDTV :
On the control panel, select "Video" and uncheck "Post-processing" and check "DeInterlace". Otherwise, the video and sound cannot be synchronized.

e.g. Jade HD and aTV HD

(B) Watch Digital TV and Standard TV (analog) :
On the control panel, select "Video" and check "DeInterlace" and "Post-processing". Otherwise, the playback will be chopping.

Step 9 - Test your MyGica D689 (Optional) :

Insert your MyGica D689.


The output should be :
Bus 001 Device 002: ID 0572:d811 Conexant Systems (Rockwell), Inc.

The following is for testing purpose.

sudo apt-get install dvbsnoop dvbtune

dvbsnoop -s signal

If there is some output but not error, your MyGica D689 works.

Step 10 - Streaming TV on LAN and recording TV programmes (Optional and not tested by me) :

This is work of "ksng".

Download ksng's scripts (dated 2009-NOV-26)
Download ksng's scripts (dated 2009-DEC-05)
Download ksng's scripts (dated 2010-FEB-04)

Known Issue :

(1) Make sure your signal strenght of digial TV is strong enough and your MyGica D689's antenna should be placed near or at the window. It is because signal strength detection does matter. Otherwise, your playback will be chopping and lagging as well as stuttering and distorting or even channels shifting. An amplifier is required at my area of testing.

(2) Xine decoder is coded by Xine team and the CPU power consumption is very high. Thus, more powerful CPU is required. The playback of HDTV (such as Jade HD and aTV HD) (1920x1080) is chopping under the testing hardware (Athlon 64x2 4200+ CPU). This CPU is launched around 2006. Another test with version 195.22 driver also has the same problem on my testing hardware.

**The chopping playback is solved by applied Step 7 (Ca)-(Cc). My Athlon 64x2 4200+ is too old to run the modern technology! The playback is just acceptable only.

(3) nVidia display driver version 190.42 does not support video post-processing and multi-threading. However, the beta driver (195.22 or later) may solved the multi-threading problems.

(4) Compiz runs flawless while watching HDTV, superise?!

(5) Mplayer (from official Ubuntu repository and nvidia-vdpau repository) does not work properly.

(6) Standard channels does not work properly at my side. May be the signal is not strong enough. However, when an amplifier is applied, the problem is solved.

(7) Me TV cannot record the TV programmes and HDTV may not play properly.

(8) When the kernel is updated, you need to delete the driver directory and build as well as re-install again.

Reference :

Please check HKEPC Forum (Linux) for updates (if any).

HKEPC Forum (Traditional Chinese, Hong Kong Forum)

Streaming HDTV scripts

Discussion on MyGica D689 (Traditional Chinese)

** Note : The links will be deleted when the time goes by.

Honor :

Many thanks to David T.L. WONG for the MyGica driver while "ksng" for the streaming scripts. They are active members of HKEPC Linux forum.

That's all. See you!