Thursday, 30 October 2008

Repositories for Ubuntu 9.04

# deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]/ jaunty main restricted
# See for how to upgrade to
# newer versions of the distribution.

deb jaunty main restricted
deb-src jaunty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb jaunty-updates main restricted
# deb-src jaunty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb jaunty universe
# deb-src jaunty universe
deb jaunty-updates universe
# deb-src jaunty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb jaunty multiverse
# deb-src jaunty multiverse
deb jaunty-updates multiverse
# deb-src jaunty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb jaunty-backports main restricted universe multiverse
# deb-src jaunty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb jaunty partner
# deb-src jaunty partner

deb jaunty-security main restricted
# deb-src jaunty-security main restricted
deb jaunty-security universe
# deb-src jaunty-security universe
deb jaunty-security multiverse
# deb-src jaunty-security multiverse
# ============================================================================
# latest (beta versions) versions:
# deb intrepid main

# sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list
# the public key:
# sudo apt-get update && sudo apt-get install medibuntu-keyring

# ==========================================
# Google
deb stable non-free
# wget -q -O - | sudo apt-key add -
# Or goto to download the key, then install by using synaptic

# Wine
#sudo wget -O /etc/apt/sources.list.d/winehq.list
# wget -q -O- | sudo apt-key add -

# Miro
deb jaunty/

# =========================
# Firefox
deb jaunty main
# key: sudo apt-key adv --keyserver --recv-keys 247510BE

# Banshee
deb jaunty main
# key: sudo apt-key adv --keyserver --recv-keys 6E80C6B7

# Openoffice
deb jaunty main
# key: sudo apt-key adv --keyserver --recv-keys 247D1CFF

# Ubuntu-netbook-remix
deb jaunty main
# key: sudo apt-key adv --keyserver --recv-keys C6598A30

# Ubuntu-tweak
deb jaunty main
deb-src jaunty main
# key: sudo apt-key adv --keyserver --recv-keys E260F5B0

# for Mac users
deb jaunty main# key: sudo apt-key adv --keyserver --recv-keys 2B97B7B8

# chromium
deb jaunty main
#key: sudo apt-key adv --keyserver --recv-keys 4E5E17B5

Wednesday, 29 October 2008

[funny]Pres. Bush endorses McCain and Palin


Friday, 24 October 2008

中文podcast(beta): 介绍podcast


original audio

HOWTO: convert amr ringtones or voice recording to mp3/ogg/wav

First you should decode the file to the raw format:
$ amrnb-decoder Sound1.amr Sound2.raw
which should produce something like this:
================================================== =================
TS 26.104
REL-5 V5.4.0 2004-03
REL-6 V6.1.0 2004-03
3GPP AMR Floating-point Speech Decoder
================================================== =================

Secondly, you can convert the resulting .raw file to other preferred format in Audacity.
In Audacity, using 'File->Import->Raw Data' to open the raw file by selecting 8000 as the sample rate.

Thursday, 23 October 2008

The music players for Ipod in Linux

A little bit jealous of Mac users, because those stupid people have a smart itune.
Compared with clever us, linux users, we have to confront the bloody true world.

Here are my favorite music players. So far, none of them can be called perfect.

1. Rhythmbox 0.11.6
As a 'music' player supporting podcasting, for audio ones, it works very very well, just like itune, the episodes can be marked new or old. super!
And support Chinese characters.
But it can not do the right things of video podcast transferring to ipod, even though it can play video now using visualization.

2. Banshee 1.4
Almost can do everything, including video podcast transfering to ipod, and a sync button.
But 1) not support transferring music or videos with Chinese file name correctly. Yes, you can transfer them, but when you reconnect ipod, most of the songs in ipod can not be recognized. Maybe the database in ipod is destroyed by the Chinese characters; Except everytime you re-sync your music library in ipod.
And 2) Doesn't mark the item is new or listened. (compared with Rhythmbox and amarok)

3. Songbird 1.0
Great products and ideas from mozilla. In the current 0.70 version, the synchronaztion works. (add something to tell ipod the item is video, so ipod nano 3rd gen will not see and hear any video podcasts)
And support Chinese characters.
But it has same shortcoming with firefox 1) too much memory usage, because of internal web engine embeded. 2) Without new/old marks in Ipod. Also, 3) It can not watch folders, but this feature is coming in half of year, feb 2009. 4) Very weak functionality for podcasting.

4. Amarok
Mark new or old, video podcasting and transfering, supporint Chinese characters. Only missing the sync button, but it can add the new podcast episodes to a queue, which collects all the items are waiting for transferring to ipod.
But 1) No sync button, have to manually sync each playlist, transfer episode and delete old episodes. 2) Very odd KDE interface and menu, difficult to find the right place to show what's in ipod libary and how to transfer or sync.

Penguins can fly in Linux

中文podcast(beta): zero


original audio

Bloody correct comments on Mac and Linux(current)

Paul Murphy, noted recently,

MacOS X is the no brainer option…[it] mostly just stays out of the way of knowledgeable users. In fact, for many it meets the IT ideal: it works so well, they don’t know it’s there or doing anything to help them - they just click and expect it to work; because, well, it just does.

When Linux can do that too (and Ubuntu brings us pretty close), it makes it ever harder to justify licensing Windows. Now if the educational software vendors can just become platform agnostic, I’ll be a happy camper.

HOWTO: 使用Mutagen来修改Mp3文件的标签信息


安装Mutagen(ubuntu下终端运行 sudo apt-get install python-mutagen)后,在终端执行:

mid3iconv -e gbk *.mp3

如果想转换当前目录下的所有 mp3 (包括子目录):

find . -iname "*.mp3" -execdir mid3iconv -e gbk {} ;


Wednesday, 22 October 2008

Ubuntu AD Rocks, Come on baby

HOWTO: NFS server

Install NFS Server Support
at the terminal type
sudo apt-get install nfs-kernel-server nfs-common portmap
(Optional: sudo dpkg-reconfigure portmap)
sudo /etc/init.d/portmap restart

Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server

invoke your favorite text editor or
sudo vi /etc/exports

Here are some quick examples of what you could add to your /etc/exports

For Full Read Write Permissions allowing any computer from through

  • /files,no_root_squash,async)
    Here /24 is netmask, meaning the netmask is 24 bits. Therefore, above line can be equivalent to:
  • /files (rw,no_root_squash,async)
    details can be found in the reference

Or for Read Only from a single machine
  • /files (ro,async)
save this file and then in a terminal type
sudo /etc/init.d/nfs-kernel-server restart

Also aftter making changes to /etc/exports in a terminal you must type
sudo exportfs -a

Install NFS client support
sudo apt-get install portmap nfs-common

Mounting manually
Example to mount to /files. In this example is the name of the server containing the nfs share, and files is the name of the share on the nfs server

The mount point /files must first exist on the client machine.
cd /
sudo mkdir files

to mount the share from a terminal type

sudo mount /files

Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

Mounting at boot using /etc/fstab
Invoke the text editor using your favorite editor, or
gksudo gedit /etc/fstab

In this example my /etc/fstab was like this:
  • /files nfs rsize=8192,wsize=8192,timeo=14,intr
You could copy and paste my line, and change “”, and “/files” to match your server name:share name, and the name of the mount point you created.
It is a good idea to test this before a reboot in case a mistake was made.
mount /files
in a terminal, and the mount point /files will be mounted from the server.

========== (for client configuration) (for mounting using fstab) (for server configuration) (contains more info about NFS) (man for exports) (netmask /24 things)

a nice try of ubuntu linux for education in China

Tuesday, 21 October 2008

We're winning!


Blogged from:

Disappointed Ubuntu upgrade to 8.10 compared with Fedora 10

New features in Ubuntu 8.10:

  • Linux kernel 2.6.27
  • GNOME 2.24
  • Encrypted private directory
  • X.Org 7.4 (offering better support for keyboards, mice, and tablets)
  • Network Manager 0.7 (improved network management)
  • Dell’s DKMS (Dynamic Kernel Module Support)
  • PAM authentication
  • BBC plugin for Totem (grab free shows from the BBC)
  • Guest session support.

New features in Fedora 10:
  • AMQP Infrastructure: A technology that makes it easy to build scalable, interoperable, high-performance enterprise application
  • Appliance Tools: Tools and meta-data that make it easier for anyone (ISVs, developers, OEMS, etc) to create and deploy virtual appliances
  • Artistic 1.0 License Removal: Remove all packages licensed under only the Artistic 1.0 license before Fedora 10
  • Better Printing
  • Better Remote Support
  • Better Start-up
  • Better Webcam Support
  • Connection Sharing: Enable adhoc network sharing
  • Echo Icon Theme
  • Eclipse 3.4: Rebase Eclipse to version 3.4
  • EFI
  • Evdev Input Driver
  • Faster Startup
  • First Aid Kit: First Aid Kit is an automated recovery tool that brings together common recovery processes and applies them to a system
  • Glitch Free Audio: Rewrite the PulseAudio sound server to use timer-based audio scheduling
  • Gnome 2.24: Re-base Fedora to Gnome 2.24
  • GStreamer RPM dependencies: dependencies Assist automated installation of GStreamer codecs provided by third-party repositories
  • Kernel Modes Setting for Graphics: Move graphic mode initialization from the X server's DDX drivers to the kernel
  • NetBeans IDE: Add the NetBeans IDE to Fedora
  • Online Accounts Service: Provides applications with credentials for user's online accounts listed on or stored in GConf
  • Python NSS Bindings
  • Remote Virtual Install
  • RPM 4.6
  • Save to Bugzilla: Auto create bugzilla entry with anaconda tracebacks
  • Sbin Sanity: Add /usr/local/sbin:/usr/sbin:/sbin to the PATH
  • for normal users to simplify command-line administration tasks
  • Security Audit: A new security audit system and intrusion detection system
  • Sugar Desktop: Include the Sugar Desktop (used in OLPC) in Fedora
  • Virtual Storage: Make storage provisioning over libvirt connections (local and remote) virtual machines as simple as possible.

Compared with these two major distro of linux, ubuntu is more like a service pack to me than a new release (from: . While Fedora pushes it's milestone release, which will be the shipped to next version of Red Hat Enterprise Linux 6, to a new level, even though some features have existed in ubuntu or other distros, fedora got a huge improvement.

Monday, 20 October 2008

HOWTO: 昂达989+ 白屏






HOWTO: Remove Input Method(SCIM) from Right Click Menu

Type "ALT+F2" and start the "gconf-editor". Then:

desktop --> gnome --> interface

and disable


Sunday, 19 October 2008


yum install bash-completion
Now you will get the ability to use TAB to autocomplete your command and COMMAND OPTIONS.

Friday, 17 October 2008

Queen on Google

这个Royal Channel on YouTube 公布了 54个皇室的视频,已经被浏览160万次,如果女王自己也做一个blog的话,这个浏览量应该能给皇室带了更多的广告效益。2006年女王的演讲还被受准作为podcast发行。可见女王作为一个internet的使用者,已经走在了我们绝大多数人的前面,google以之作为logo,不足为怪。

但是在这个视频中,个人发现一点比较有趣的现象,主要负责接待的google高官,无一带领带,都是敞开西服上衣,里面衬衫领子,随意凌乱的自由状态。相比其他员工在女王来临之前的毕恭毕敬的联系打招呼,可以形成一个较为鲜明的对比。也许,这就是google的dressing code,或许,google在释放什么信息。哈。纯属个人理解。但是我还是比较喜欢这种风格,即便是面女女王这样的人物。

Google, well done.

Thursday, 16 October 2008

HOWTO: equivalent yum option to apt-get autoremove

To remove packages that has been installed as dependencies for the package you are removing if they are only needed for that particular package.

a yum plugin must be installed. Otherwise, yum doesn't provide the capability.

yum install yum-remove-with-leaves
Now yum will automatically have the same function as apt-get autoremove.

yum-changelog is a Yum plugin for viewing package changelogs before/after updating.

Install yum-changelog via:
# yum install yum-changelog

How to use yum-changelog:
# yum update ktechlab --changelog
Loading "changelog" plugin
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package ktechlab.i386 0:0.3-6.fc6 set to be updated
--> Running transaction check

Changes in packages about to be updated:

ktechlab - 0.3-6.fc6.i386
* Wed Nov 22 23:00:00 2006 Chitlesh Goorah - 0.3-6
- Rebuilt due to new gpsim-devel release

By default, this plugin will show the changelogs before the updates. However if you want to make it echo those changelogs after the updates, replace when=pre by when=post in the file /etc/yum/pluginconf.d/changelog.conf

HOWTO: yum equivalent function with apt-get

1. Find and review "lost" packages

You can find orphaned packages (ie packages not in the repositories anymore) with the tool package-cleanup from the yum-utils package: yum install yum-utils; package-cleanup --orphans.
Old packages with a failing "%postun" script will remain partly
installed. Remove them with rpm -e package-name-and-version. It's often
helpful to run this command after the update, too.

But here what 'package-cleanup --orphans' found out is the 'obsolete' ones in ubuntu words. Namely installed not from repositories.

2. Find yum install or update history


3. Find orphan packages
sudo package-cleanup --orphans

Note: Here 'package-cleanup' must run with sudo or su, otherwise lots of packages will be considered as orphans because of normal users don't know the relationship between packages and repositories.

Monday, 13 October 2008

HOWTO: wine fonts

Wine中对话框默认的字体是Tahoma,在我们的LINUX上,Tahoma字体是无法正常显示中文的。比如Wine configuration中的"确定""取消"等就变成了"<<"">>"的字样。



\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

方法1. 直接地将这个键设为空,问题就解决了。

方法2. 将MS Shell Dlg设置为一种自己字库中已有的中文字体即可,如果已经将windows中宋体取来使用了,字库中SimSun对应宋体(这是Windows的,LINUX下默认是没有的),在这里设置为 SimSun即可。

HOWTO: find WINE menu stored in Gnome

Everything about the wine menu is stored here in a text mode, while not separately for each item.

  • .config/menus
Especially the file, '', a xml file, which describes the Gnome menu structure.
Every menu-edit operation on wine menu will reflected in this file.

  • .config/menus/applications-merged
The 'wine-program-*' files, xml files, are the short-cuts appears in the 'application-wine-Programs'. The rest, not appear here, will listed in the other menu.

  • ~/.local/share/applications/wine/Programs

Where the 'application-other' menu retrieve short-cuts directly from

Sunday, 12 October 2008

HOWTO: codecs for fedora

download "all-20071007.tar.bz2" to your desktop, then right click and
extract it now rename the folder to codecs, then open a terminal and

cd ~/Desktop


mv codecs /opt/
ln -sf /opt/codecs /usr/lib/win32
ln -sf /opt/codecs /usr/lib/codecs
ln -sf /opt/codecs /usr/local/lib/win32
ln -sf /opt/codecs /usr/local/lib/codecs

For Totem (gstreamer)
gstreamer-ffmpeg and ffmpeg is essential.
other plugins for gstreamer will be helpful.

Friday, 10 October 2008



•    网络管理员( Network administration (LAN, WAN)): 70%

•    Wiondows管理员(Windows administration): 69%

•    桌面支持(Desktop support): 69%

•    数据库管理( Database management): 58%

•    无线网络管理( Wireless network management): 47%

•    通讯支持(Telecommunications support): 44%

•    Web开发/网站设计(Web development/Website design): 42%

•    商业情报/报告服务(Business intelligence/reporting services): 33%

•    虚拟化(Virtualization): 32%

•    .NET开发(.NET development): 22%

•    CRM 实施(CRM implementation): 22%

•    ERP 实施(ERP implementation): 20%

•    Linux/Unix 管理员(Linux/Unix administration): 20%

•    Java开发(Java development): 17%

•    开源开发(Open source development): 17%

•    XML 开发(XML development): 17%

Bill Gates on The Daily Show With Jon Stewart

HOWTO: Gnome下节省系统资源的输入中文方式

最简单的方式输入中文就是在System-Administration-Language Support里选中'enable support to enter complex characters'.但是这样会使得scim的进程一直在后台占用一定的内存,不太‘干净’。

1。每次都是在gnome的popup menu里选择input methods-scim又太过麻烦

2。在~/.profile最后加上(出自man scim)


3。在~/.bashrc最后加上(出自man scim)

# If not running interactively, don't do anything
[ -z "$PS1" ] && return


Wednesday, 8 October 2008

hp m2000 拆解图


Monday, 6 October 2008

HOWTO: podcast a audio in blog

here we explore some new Flash MP3 players from Google and Yahoo!
that are again light-weight, easy to implement and extremely efficient.

1. Google Reader MP3 Player

Google Reader has an inbuilt MP3 player that is pretty much the same
as Gmail player but it also works on non-Google websites. This player
has volume controls, no Google branding and it auto-detects the
duration of the music file so your readers know how long the song will
last. Here’s a live example followed by the HTML embed code:

To use this MP3 player on your website or blog, copy-paste the
following code and replace the MP3_FILE_URL with the link to your MP3

<embed type="application/x-shockwave-flash" src=""
width="400" height="27" allowscriptaccess="never" quality="best"
bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />

2. Yahoo! MP3 Player

If you think normal is boring, check this out. Yahoo! offer a code generator (Easy Listener) to help you create a Flash based MP3 player that matches your website color theme and layout. See example:

Though this Easy Listener MP3 player requires you to pass the
address of the web page that contains the MP3 file(s), you can directly
pass the MP3 link and it will work just fine. Supports auto play and
you can decide where the meta data associated with the MP3 file should
be displayed.

<embed src="" width="400" height="40" wmode="transparent" flashVars="playlist_url=MP3_FILE_URL&skin_color_1=-145,-89,-4,5&skin_color_2=-141,20,0,0" type="application/x-shockwave-flash" />

3. Yahoo! Media Player

If you maintain an MP3 blog or run a podcast and regularly link to
MP3 files, it makes little sense to embed a separate Flash player with
every MP3 file. I would therefore recommend using the Yahoo! Media Player that auto-detects links to MP3 files in your web pages and creates an embedded player for each link.

All you have to do is insert the following link in your blog
template and all MP3 hyperlinks will be converted into inline MP3
players. This also has the shuffle feature and visitors can easily skip
to any song in the playlist. Excellent stuff.

<script type="text/javascript" src=""></script>

4. Odeo MP3 Player

Odeo offers a pretty impressive MP3 player (see example)
that works perfect in web pages as well as RSS readers but a small
issue is that Odeo Player requires you to type the exact duration of
the song in the embed code. You can skip this step but then the
progress bar won’t reflect the true status when you play the
song. And there are no volume controls.

To use Odeo MP3 player in your website, add the following code replacing MP3_FILE_URL and DURATION with relevant values.

<embed src= "" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent"  type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=[MP3 file address]" pluginspage=""> </embed>

Summary: With so many choices, how do you pick the right MP3 player for your website ?

Saturday, 4 October 2008

HOWTO: use the "label:" query word to search in Gmail

how to use the "label:" query word to search for Multi-Labeled messages
as well as Un-Labeled messages. Thanks to "rishid" on the GmailForums
for submitting this tip...

Say you want to find messages that have multiple Labels. For example,
you want to display all messages with label1, label2 and label3 that
you had previously defined and assigned. Into the basic search field at
the top of any Gmail page, you would enter label:label1 label:label2

Note that this is searching for all messages that have label1 AND
label2 AND label3. If you want to include messages that have ANY of
those labels, you can use the "OR" command like this: label:label1 OR
label:label2 OR label:label3 (Note: "OR" must be in uppercase.)

You can optionally add a "-" to the query words to exclude search
criteria. For example, entering -label:label1 label:label2 label:label3
would return all messages that have label 2 AND label 3, but do not
have a label1 Label.

Taking this concept a step further, you can use this method to search
for all "Un-Labeled" messages. Unfortunatly, Gmail does not provide a
choice in the search dropdown that lets you search for unlabeled
messages. If you manage a large number of messages, it can be very
cumbersome to determine which messages are unlabeled. My personal
preference is to ensure that all messages have a Label making it easier
to manage and organize them.

So, if you want to list all unlabeled messages, just create a long
search string containing every label that you have defined. Be sure to
include the "-" character in front of every label. This ensures that
messages with these labels will be EXCLUDED (remember, you are looking
for all messages WITHOUT Labels.) You can also optionally include the
hidden "inbox" Label to exclude anything in your Inbox.

For example, if you have defined the Labels "Family", "Friends",
"Ebay", and "Support", you would enter the following string into the
search field (note that the labels are not case sensitive) to find all
Unlabeled messaegs:

-label:inbox -label:family -label:friends -label:ebay -label:support

If you have a large number of labels, obviously, this becomes harder
and harder to manage, so I recommend reating a "note" email to yourself
containing the search string for easy future reference.

Thursday, 2 October 2008

HOWTO: Find which Debian or ubuntu Linux Version you are running

Find or identify which version of Debian Linux you are running

This can be checked in

/etc/debian_version file

Find or identify which version of ubuntu Linux you are running

You can find in different ways in ubuntu

Solution 1

cat /etc/issue

The file /etc/issue holds the version of Ubuntu installed on your system

Solution 2

lsb_release -a


cat /etc/lsb-release

Where lsb for Linux Standard Base

鹤吃兔(regent park版)


我和珊珊一起去了regent park,并拍了以下一些照片。







Heron eats rabbit


Heron eats rabbit


Heron eats rabbit


Heron eats rabbit


Heron eats rabbit


看到这里,我得澄清一下,6-10并不是我拍的在regent park的鹤,不过也真是巧,周日公园里看到鹤,第二天早上看报纸,就看到这和鹤吃兔子的报道。于是乎,我就连在一起了,娱乐一下。哈。

My photo
London, United Kingdom

Facebook & Twitter