After six month’s development, a brand new release of Ubuntu has arrived – Natty Narwhal. We are having more and more people interested in our community happily, thus I am now announcing 18 release parities in 17 cities in China, which will have approximately 2000 participates. It will be a wonderful chance for people to share knowledge and joys, and generally enjoy the time getting together to celebrate a new release of the most widely used FLOSS distribution in China.
Here is the list cities and hosts (sort by alphabet order):
City / Host
———————————————————————
Beijing / Beijing University of Posts and Telecommunications
Dalian / Dalian Maritime University
Deqing / Deqing High School
Guangzhou / Sun Yat-Sen University
Hangzhou / Alibaba, Inc.
Ji’nan / Shandong Polytechnic University
Jinzhou / Liaoning Railway Vocational College of Technology
Nanjing / Nanjing University of Aeronautics and Astronautics
Nanjing / Nanjing University of Posts and Telecommunications
Shanghai / Shanghai University
Shenzhen / Unconfirmed (*)
Tianjin / Tianjin Normal University
Wenzhou / Wenzhou Vocational College of Science and Technology
Wuhan / Wuhan Railway Vocational College of Technology
Xiangtan / Hunan University of Science & Technology
Yantai / Graduate School of China Agricultural University
Zhengzhou / Henan Experimental High School
Zhongshan / Zhongshan Institute of University of Electronic Science and Technology
* I haven’t confirmed where will host the release party in Shenzhen, however it has been handled by Shenzhen LUG already.
Today I received a mail asking me to give him some advice on how to become a Debian Maintainer and Debian Developer, I am glad to hear more people getting interested on joining Debian, :-)
The 1st thing to keep in mind is that, involving Debian’s development is easy, but becoming something _official_ requires a lot of time and efforts, so just be patient, :)
Here are my advices:
If there is one would like to help, he would do a throughout check on your package and find problems (and land mines) as much as he can. He might reject your package and ask you for improvements, then don’t be shy and just do what he has advised (DDs always think it is a good time to train new maintainers) and send your result back. Finally he is satisfied and uploads you package to Debian archive.
Try to get your first package uploaded as soon as possible if you’d like to achieve your aim at becoming DM/DD.
You’ll have to read Debian Policy Manual[2] if you haven’t read it yet, and you may need to read it for several times while you are making your package. If you have enough time, it’ll be better if you read Debian Developers Reference[3] as well.
So you are a DM after some time of hard work, then you could plan on becoming a DD now. Being a DD is much more complex than becoming a DM, since you’ll have many privileges and people have to make sure you have the ability to use it correctly. You’ll need to read through all Debian documents and read/ask again about the details then.
[1]http://www.debian.org/doc/maint-guide/
[2]http://www.debian.org/doc/debian-policy/
[3]http://www.debian.org/doc/developers-reference/
Ubuntu 里的 ibus-pinyin
2011/01/27
前面写的《Ubuntu 中文拼音输入法小结》中说 ibus-pinyin 是 Python 写的,存在一些谬误。ibus-pinyin 已经用 C++ 重写,并且做了很多改进。
可能有些用 Ubuntu 的朋友要问为什么现在还会有那些崩溃的现象,其实这是发行版的问题,迟迟没有能将新版推送到用户手中。
感谢 Shawn P Huang,Shellexy 和 BYBird 的提醒,博客上的那篇文章也做了更新。
Linux input method framework brief summary
2011/01/15
I am trying to keep this article concise for you to make you have an outline of current condition of Linux (and maybe other platforms like BSDs) input methods. It’s coverage is mostly CJK languages, but I think other languages that use input method would be sure to find there examples in this article. We will start with the most popular ones, and there will be some hints about other ones at last.
Before we start our tour, there are two concepts to know, input method framework and input method engine:
1. SCIM (Smart Common Input Method)
Most Linux input method users may have the experience of using SCIM, which is created by Chinese developer Su Zhe for promoting his Intelligent Pinyin input method and providing a better input method framework.
Some friends of mine are still keep using SCIM even though it is not being maintained, nor SKIM, its sister project on KDE. SCIM was the default choice of distros for years. People developed lots of input method engines for it, for example scim-pinyin, which has been mentioned above as Intelligent Pinyin input method. Users may be also familiar with scim-python, scim-xingma-*, scim-googlepinyin and the still-maintained scim-sunpinyin.
On a distro maker’s point of view, the glorious age of SCIM has just finished.
2. IBus (Intelligent Input Bus)
IBus is the de facto standard of input method framework on nowadays Linux distros, whose author is a Chinese developer, Huang Peng, who has been mentioned as the author of scim-python and scim-xingma-*. IBus is aiming at a “next generation input framework” comparing to SCIM. I think this goal has been achieved – new comers may only know IBus from the very beginning of his adventure on Linux.
IBus is written in C++, and is designed to be highly modularized: core input bus, gtk/qt interfaces, python binding, table engine, table modules and other input method engines. It uses Gtk immodule, thus is the best choice for GTK+ applications. What’s more, Flash Player support Gtk immodule only and IBus has no problem to work with it. The author of IBus is really helpful with other input engine developers, so there are many input method engines available on IBus framework.
But IBus has obvious limitations from its design:
Note: ibus-pinyin has been rewritten in mainly C++ with many improvements, and such changes will land on major in very near future (maybe some of them have already published it, I didn’t do a detailed research here).
3. Fcitx (Free Chinese Input Toy for X)
Fcitx is an old and new input method. It bears at the same time as SCIM, and now gets a new life with the brand new 4.x series. As name suggests, it is first designed to be a Chinese specific input method by Yuking. During 3.x series, the aim of being a feature rich Chinese input method gave it quite a few of fans, but also kept it from being a default choice of major distros. Fcitx uses XIM, which works well for most platforms (like GTK+ and QT), but has some small problems.
However, starting from 4.x series, Fcitx has been given a new goal with a new maintainer – a college student at Peking University, Weng Xuetian. Now he has published 4.0.1, the second version of 4.x series, with features like customizable skins, tables which has been wanted for a long time. It has been heavily modularized: all tables are separated, developer-friendly input method engine interface, graphic user configuration tool. Also, 4.x series does not use GBK encoded Chinese configuration files anymore, and UTF-8 encoded English configuration files are used. I would like to highlight its perfect user experience of fcitx-sunpinyin, it is worthwhile for every Pinyin users to give a try.
There are still issues on its way of (probably) being the default of distros:
Properly speaking, Fcitx is still not a input method framework because of the reasons listed above, but it will be, also as said above.
Above are the most famous input methods, here is a list of other things in Linux input methods with short descriptions.
1. ucimf (Unicode Console Input Method Framework)
ucimf is an input method framework for Linux unicode framebuffer console, which is mainly with fbterm and jfberm. It is developed by Chinese developer, Mat. He maintains a series of input method engines ported from BSD licensed Mac OSX input method OpenVanilla.
There are other solutions under framebuffer console, for example ibus-fbterm (development has stopped), but I still recommend to use ucimf because it full featured and well maintained.
2. SunPinyin
One thing to clarify, Sunpinyin isn’t a frame work, but it is important so I would like to mention it here. We have mentioned scim-sunpinyin, ibus-sunpinyin and the recommended fcitx-sunpinyin. In fact there is also a standalone xsunpinyin alive. SunPinyin is a statistical language model based Chinese input method, which was firstly developed by Sun Beijing Globalization team, and opened source to community with Opensolaris project, with LGPLv2 and CDDL dual-licenses.
SunPinyin would be heavily used from now on, it is the best Pinyin engine on Linux and some other platforms.
3. SCIM2
SCIM2 was trying to be a next generation SCIM, but abandoned because of the emerging star during that period – IBus.
4. ImBus
ImBus is created by the author of SCIM, and he would like to make it a general input method framework including all known best techniques with minimal dependencies. But the project halted with the same reason like SCIM2, no code in its svn repository.
5. Fitx (Fun Input Toy for Linux)
Fitx was a flash in the pan on Linux, the project stopped soon after its emerging. Fitx is a ported version of FIT input method on Mac OSX, but implemented using SCIM framework.
6. gcin
gcin is a input method developed by traditional Chinese community, targeted to traditional Chinese users.
7. uim
uim is a input method framework made by Japanese developers. It is a little different because uim isn’t an input method server (XIM is a server), it’s just a library. Because the designer believe many people don’t need a full featured platform but only something enough to work.
For information about input method types, there is a good website: http://seba.studentenweb.org/thesis/im.php
Update:
2011-01-15 21:30
Thanks to Zhengpeng Hou, I’ve added some description about uim, and a notice about whether fcitx should be considered as a framework now.
2011-01-28 00:15
Thanks to Shawn P Huang, ibus-pinyin has been rewritten in mainly C++ with many improvements.
VM disk performance on btrfs partition
2011/01/04
Recently I read Alexandre Rosenfeld’s blog post about low performance of btrfs while placing VM’s disk on it, so I had a try and got almost the same result.
I tried to have someone look into the problem, and now get the answer, quoting Bastian Blank
This is a result of the filesystem design, no bug. For decent performance don’t use O_SYNC on files. For qemu use cache=writeback in the disk definition.
Here are speakers presentations we’ve used on 16th Oct, 2010′s Beijing Ubuntu 10.10 Release Party, and licensed under CC by-nc-sa 3.0.
1. Live USB introduce – 白清杰 [linuxbqj AT gmail DOT com] (Chinese)
2. You in Community – Aron Xu [happyaron AT ubuntu DOT com] (English)
3. How Applications Speak Fluently – Eleanor Chen [chenyueg AT ubuntu DOT com] (English)
Update: I’ve updated more details about the party.
Hello everybody,
We are happy to announce that we’ll hold Beijing Ubuntu 10.10 Release Party on 16th Oct, 2010.
Time: 2010-10-16 14:00-17:50
Location: Building 3, BUAA, No. 37 Xueyuan Road, Haidian District, Beijing, P.R.China (Google Maps)
Activities:
14:00-15:00 Presentations
14:00-14:20 Qingjie Bai (From Kanas FOSS Store) Howto: LiveUSB Making and Usage
14:20-14:40 Aron Xu (Ubuntu Simplified Chinese Translation Team Leader, Ubuntu Member, Organizer): You in Community – The Foss Essentials
14:40-15:00 Eleanor Chen (Ubuntu China LoCo Contact, Ubuntu Member, Organizer): How
Applications Speak Fluently – Introduction to FOSS I18n and L10N
15:00-17:50 Installfest and discussions (so take your laptop with you!)
There is no need for registration or invitation, feel free to join us and have fun!
My Chromium trunk update script
2010/09/14
Chromium trunk build doesn’t automatically update the latest version like Minefiled (Firefox trunk), some Ubuntu users have chosen chromium-daily PPA for doing so, but I think updating a bleeding edge daily package will make lots of noise, so I wrote this script.
I am a big fan of Firefox, but I use Chromium in some cases that Firefox cannot handle very well. The script will maintain a directory in good shape so that you can run your program properly, even when you are running chromium and the script won’t crash you by the update. But never tell me you don’t close it for a long long long time that this script has ran for times and your browser crashed, just restart will make it okay.
Put it in your ~/usr/chromium/ and setup cron to run it every day or any time you would like to, it will update your chromium from http://build.chromium.org to your user’s directory. Be aware this program is run in a common user’s account, and by default it gets the AMD64 version.
If you wish to change to I386, find and replace “chromium-rel-linux-64″ with “chromium-rel-linux”.
Note: replace any “<” or “>” (and following ; mark)you find in your script with “”, I am not able to to make them show up correctly in this page. :-(
#!/bin/sh # Copyright (C) 2010 Aron Xu <happyaron.xu@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . LATEST=`wget -q -O - 'http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/LATEST' | awk 'NF > 0'` cd $HOME/usr/chromium/ if [ -f ./CURRENT ]; then CURRENT=`cat CURRENT` if [ $LATEST -le $CURRENT ]; then exit; fi fi if [ -f ./OLD ]; then OLD=`cat OLD`; fi if [ -d ./update ]; then rm -rf ./update/* && cd ./update/; else rm -rf ./update && mkdir ./update && cd ./update/; fi wget -q http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/$LATEST/chrome-linux.zip unzip chrome-linux.zip rm -f chrome-linux.zip mkdir ../$LATEST mv ./chrome-linux/* ../$LATEST/ rm -rf ./* cd ../ rm -f chromium-browser ln -s $LATEST chromium-browser rm -rf $OLD mv CURRENT OLD echo $LATEST > CURRENT
It is very easy to change this shell script to grab a specific build of chromium if you want to have “bug free” version (I mean build bot doesn’t complain).
#!/bin/sh # Copyright (C) 2010 Aron Xu <happyaron.xu@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . LATEST=$1 cd $HOME/usr/chromium/ if [ -f ./CURRENT ]; then CURRENT=`cat CURRENT` if [ $LATEST -le $CURRENT ]; then exit; fi fi if [ -f ./OLD ]; then OLD=`cat OLD`; fi if [ -d ./update ]; then rm -rf ./update/* && cd ./update/; else rm -rf ./update && mkdir ./update && cd ./update/; fi wget -q http://build.chromium.org/buildbot/snapshots/chromium-rel-linux-64/$LATEST/chrome-linux.zip unzip chrome-linux.zip rm -f chrome-linux.zip mkdir ../$LATEST mv ./chrome-linux/* ../$LATEST/ rm -rf ./* cd ../ rm -f chromium-browser ln -s $LATEST chromium-browser rm -rf $OLD mv CURRENT OLD echo $LATEST > CURRENT echo $LATEST > GRAB
Again, put it in ~/usr/chromium/ and run:
sh grab-chromium.sh 59353
(59353 is a build of chromium that no build bot bugs show up, you can change it to any version you’d like to grab).
If you like to run chromium with a long list of parameters, just create another script. Mine is here:
#!/bin/sh $HOME/usr/chromium/chromium-browser/chrome %U --disk-cache-dir="/dev/shm/browser.`whoami`.cache/chromium" --disk-cache-size=52428800
You can add it to your desktop’s menu.
Convert man page to PDF
2010/09/13
It’s fairly easy:
$ man -t bash | ps2pdf - bash.pdf
“man -t” uses groff -mandoc to format the manual page to stdout.
“ps2pdf – bash.pdf” means the input is from stdin and output to bash.pdf.
We use a simple pipe to join the stdout of “man” and stdin of “ps2pdf”.
That’s it!
Unzip 5.x has an option -O to specific the encoding of file names in an ZIP archive, but when 6.0 is arriving with unicode support, that option disappeared as well. CJK users need special cares on support and conversion of obsolete encoding while they are switching to utf-8.
Here is my workaround about this problem, install p7zip and convmv packages on your system first, then:
$ env LC_ALL=C 7z x file.zip
$ convmv -f gbk -t utf8 --notest *
File names extracted by unzip are not able to be converted to correct one whatever you do with it, but what is done by 7z can be converted by convmv.
Moving more on, we can automate this action to a script:
#! /bin/sh
LANG=C /usr/bin/7z x -y "$1" | sed -n 's/^Extracting //p' | sed '1!G;h;$!d' | xargs convmv -f gbk -t utf8 --notest >/dev/null 2>/dev/null
Save it us unzip.sh, then try:
$ sh unzip.sh file.zip
This will act as what unzip does, but with additional care about converting file name encoding from gbk to utf-8. Moreover, convmv can detect whether your file name is already utf-8 encoded and will skip it.
If your file names are encoded other encoding, please replace “gbk” with the appropriate name.