Friday, February 29, 2008

Accessing the system clipboard by y and p command in VIM (WIN32)

Add the following line to _vimrc for accessing the system clipboard by y and p command:
set clipboard=unnamed

For more information please ref: http://vim.wikia.com/wiki/VimTip21

Thursday, February 28, 2008

screen is an useful tool for remote access(e.g. SSH)

screen is an wonderful tool for remote access and easy use. The process are running after the screen is detached, even if the remote access was terminated.

start an new screen with name "s-name"
screen -S s-name

do something,and detach current screen process
CRTL+a d

list screens
screen -ls

reattach an detached screen process with name "s-name"
screen -r s-name

Tuesday, February 26, 2008

Virtual CD-ROM under linux

for mount:
  1. rm -fr /dev/cdrom
  2. ln /dev/loop7 /dev/cdrom
  3. losetup /dev/loop7 /iso/file/path/filename.iso
  4. mount /dev/cdrom /media/cdrom
for umount:
  1. umount /media/cdrom
  2. losetup -d /dev/loop7

set up scim under en_US locale

It's very simple now in ubuntu hardy

$im-switch -z en_US -s scim-bridge 

use YaHei font in ubuntu system

Just for log.
  • in Nautilus, press CTRL+L, locate at fonts:/
  • paste the yahei.ttf and yaheibd.ttf
  • add the following line to 40-generic.conf and 60-latin.conf under /etc/fonts/conf.avail. (after <family>Bitstream Vera Serif</family>)

<family>Microsoft YaHei</family>


now restart the xserver, Chinese font display perfectly.