Something interesting

We are what we repeatedly do. Excellence, therefore, is not an act, but a habit.

Archive for the ‘ubuntu’ Category

HOWTO: Asymptote on Ubuntu – quick and dirty way

Posted by yuzhou on December 31, 2006

Asymptote, inspired by Metapost but with a much readable (C++-like) syntax, has evolved rapidly (1.20 as of the end of 2006). However, in Ubuntu 6.10, the included version is still 1.03 (released in March 2006) with very limited functionality in Flowcharting and in some other advanced features. After a brief reading on the Asymptote online document, I think, it is time to assemble a quickstart tutorial or guide. Let’s get started now.
Read the rest of this entry »


Posted in howto, latex, linux, ubuntu | 4 Comments »

HOWTO: Bluetooth and Skype on Ubuntu

Posted by yuzhou on December 28, 2006

This howto is based on Motorola HS815 Headset and Zonet (Broadcom Corporation USB) Adapter on Ubuntu 6.10 (Edgy)

1. sudo modprobe snd-bt-sco or add ‘snd-bt-sco’ to the end of ‘/etc/modules’

2. sudo apt-get install bluez-utils to install btsco user-space program and (optional) bluez-pin for PIN GUI

3. edit ‘/etc/bluetooth/hcid.conf’ for security and pairing mode settings

  • ‘security auto;’ if using static pass key in the same file – add following statement
    • passkey “0000”;
  • ‘security user;’, if using a GUI interface to allow input – add following statement
    • pin_helper /usr/bin/bluez-pin;
  • ‘pairing multi;’

4. (seems optional) edit ‘/etc/bluetooth/rfcomm.conf’ to set remote device’s MAC address and channel

5. sudo /etc/init.d/bluetooth restart to restart bluetooth daemon

6. (optional) if in step 3 the security is set to ‘user’, need to run ‘passkey-agent --default /usr/bin/bluez-pin &

  • for the first time, I highly recommend everyone trying to use ‘user’ in step 3
    • before step 6, run xhost + to enable the GUI to show;
    • then run step 6;
    • when run step 7, the GUI for passkey shows, enter the passkey (0000 in my case) for your device;
    • then go on to step 8;
    • now, you can use xhost - to disable GUI;
    • then go back to step 3 ad change ‘security’ to ‘auto’;
    • then run step 5 to restart the daemon;
    • from now on, for everyday use, you can simply turn on your headset and run step 7 and 8;
    • you are all good, aren’t you?

7. sudo hcitool cc 00:00:00:00:00:00 (replace this with remote bluetooth device’s MAC address)

  • use sudo hcitool dev to ensure whether the bluetooth adapter is working
  • use sudo hcitool scan to get the MAC address of the remote bluetooth device’s MAC address

8. btsco 00:00:00:00:00:00 2 to use bluetooth headset as the audio device.

  • or better opt to btsco 00:00:00:00:00:00 2 >/dev/null & to run it at background with less message

9. select BT Headset as the Sound Device in Skype -> Tool -> Options -> Sound Devices.

(ToDo: I will add some references later on)

Posted in howto, linux, ubuntu | 7 Comments »

Ubuntu – Chinese under English locale

Posted by yuzhou on November 10, 2006

Generate locales:

1. sudo cp /var/lib/locales/supported.d/local /var/lib/locales/supported.d/local.old
2. sudo cp /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/local


1. sudo nano /var/lib/locales/supported.d/local
2. add

zh_CN.UTF-8 UTF-8
zh_CN.GB2312 GB2312
zh_CN.GB18030 GB18030
zh_HK.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8

3. sudo dpkg-reconfigure –force locales
在切换到英文界面之后,编辑配置文件 /etc/environment,增加或者修改相应的 locale 设置:
LC_CTYPE=”zh_CN.UTF-8″ # “zh_CN.GBK” to cover GB2312 and UTF-8


HOWTO: setup Chinese support under English locale from Ubuntu Chinese Forum

Or 在 Ubuntu 英文界面下处理中文

Posted in linux, ubuntu | 3 Comments »