Replace scim with ibus on Debian
The default input method framework of Debian is scim.
You may know from my last post that I just change to use sunpinyin for my default Chinese input method. But the scim sunpinyin engine seems like a little buggy. I can not switch between English and Chinese input by the shift. The window may hangs when I am typing pinyin.
Okay. I change to use ibus as well.
Firstly, the scim should be remove completely from system. Use the Synaptic or apt-get to remove all the scim related package ( scim, scim input engines, scim libs and so on ).
$ sudo apt-get purge scim
Secondary, install the ibus and ibus sunpinyin engine.
$ sudo apt-get install ibus $ sudo apt-get -t experimental ibus-sunpinyin
Finally, set ibus the default input method then restart the X session to active the ibus input method.
$ im-switch -s ibus
Install sunpinyin on Debian
The default scim-pinyin engine is too hard to use. It almost have no support to Chinese words. I have to pick up the Chinese characters carfully.
The great google told me sunpinyin is a better choice.
I don't like to download the sunpinyin source code from its google-code repository and compile it by myself. My laptop is not so powerful for gcc compiling. I prefer Debian package installation.
I only find the sunpinyin package in the expriemental repository. So, I take the risk to install a experimental package. I just had enough for the scim-pinyin. ;-)
Warning: The expriemental packages is not complete distribution. They may do harm to your system without care.
You have been warned.
Let's go on.
1) Add the experimental repository to the /etc/apt/source.list
deb http://ftp.debian.org/debian experimental main
2) Since I am using the scim. I install the sunpinyin engine for scim.
$ sudo apt-get update $ sudo apt-get install -t experimental scim-sunpinyin
You may want to try the ibus. Some says ibus is more user-friendly than scim.
3) Configure the scim to set the scim-sunpinyin engine the default Chinese input engine.
Now I feel more comfortable for typing in Chinese. :-)
Convert file format from dos to unix
Convert file format by sed
$cp you-file-name your-file-name.bak $sed 's/^M//g' your-file-name.bak > your-file-name
Covert file format by Perl
$perl -i.bak -pe 's/^M//g;' your-file-name
Covert file format by vim
:setlocal ff=unix :wq
Detect file format is dos or unix
Detect file format with grep.
$ grep '^M' your-file-name
^M is Ctrl-V + Ctrl-M. If the grep returns any line, the file is in DOS format.
Detect file format with vim.
1) Open the file with vim.
2) Use the vim set command to show the file format.
:set ff?
The command returns fileformat=<dos/unix/mac> to indect current file format.
Create Google Analytics profile for this blog
Just creat google analytics for this blog. Try to get closer to my vistors.
Let's see.