Friday, June 01, 2007

Decompress rpm file without install it

rpm2cpio package.rpm | cpio -id

Thursday, May 31, 2007

Fix Maya ugly cross cursor

Add this into "~/maya/7.0/Maya.env"

MAYA_MMSET_DEFAULT_XCURSOR=1;

How to know Linux Distro version?

Ubuntu
#cat /etc/lsb-release

SuSE
#cat /etc/SuSE-release

Wednesday, May 30, 2007

Simple diff and patch

To generate a patch
#diff -u [original dir] [modified dir] > patchfile

To use a patch
#cd [original dir]
#patch -p[num] < patchfile

[num] is level of directories to ignore

ex.
if num = 1 then
a/foo/bar.c become foo/bar.c

No Syntax Colors in Vim

#vi ~/.vimrc
Add "syntax on" in it.
Done!

Tuesday, May 29, 2007

Switch Input Method in Ubuntu

#im-switch [im_name]
#man 7 undocumented

Wednesday, May 23, 2007

Linux Printing Command

linux command

#lpr //print file
#lpq //query

Tuesday, May 08, 2007

Install RPM Package under Ubuntu

using Alien Package Converter

#sudo apt-get install alien
#sudo alien -k name-of-rpm-file.rpm

the parameter "-k" in the command line means "keep version"
sometimes you may also want to use "-scripts" to maintain the related installation scripts

Saturday, April 28, 2007

Make Linux Kernel

make defconfig
make xconfig/menuconfig
make
make modules_install
make install

HOWTO: Kernel Compilation for Newbies - Ubuntu Forums

HOWTO: Kernel Compilation for Newbies - Ubuntu Forums
This guide is aimed at the newbies who are willing to learn something about kernel compilation or just who need a new kernel for incompatibility issues (e.g. DMA issues). This is a STEP-BY-STEP guide, so don't be afraid of compiling your first kernel, it's a piece of cake...

Monday, March 12, 2007

Flash 9.0.31.0 on ubuntu at Superbil.info

Adobe Flash 9.0 會與gcin相衝導致Firefox當掉,
將gcin升級至1.3.3以上可解決此問題,
說明如下方連結:
Flash 9.0.31.0 on ubuntu at Superbil.info
download gcin for ubuntu
dpkg -i xxx.deb

Thursday, March 08, 2007

Bash Shell Job Control

  • ctrl+z
    • move foreground job to background and stop it
  • jobs
    • show current running jobs and their job numbers
  • bg %i
    • make stopped job number#i run in background
  • fg %i
    • move background job number#i to foreground

Wednesday, March 07, 2007