星期日, 11月 12, 2006

Remote X

X server and X client setups:
Three ways to get the remote graphic connection
1.named pipe
2.unix socket
3.TCP/IP

local site :
1.Execute the X server
2.In the X screen open an terminal execute xhost +192.168.0.1
2.telnet 192.168.0.1, then execute export DISPLAY="192.168.0.254:0"



小依科的文章

星期二, 10月 31, 2006

Unknown topic : should be something to fix the disk drive

Found volume group "VolGroup00" using metadata type lvm2

/dev/mapper/control : open failed. No such file or directroy.


1.hdparm -i /dev/hdd
2/hdparm -d1 /dev/hdd ; hdparm -Tt /dev/hdd
3.ab : used to test the performance of apache

P5GDC Deluxe LGA775
915P/1CH6R

星期五, 10月 27, 2006

MASQUERADE: Router send us somewhere else

After I turn on the iptable in the linux, the message keeps pop up.
Finally I solved the issue:

Change the original command

iptables -t nat -A POSTROUTING -s 192.168.101.0/24 -j MASQUERADE

to

iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.101.0/24 -j MASQUERADE
%called as SNAT (source NAT, since it replaces the source ip to the ppp0)

But if the ppp0 is using the dynamic IP , this one may need some modifications so as to get the CURRENT IP address.

修改registey

開機時執行的程式
\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS\CurrentVersion\Run

輸入法順序之選擇及增刪
HKEY_CURRENT_USERS\KEYBOARD LAYOUTS\Preload
各輸入法之列表
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\keyboard layouts

免費防毒軟體
Active Virus Shield 6.0.0.299 (non AOL users can use too)

星期日, 9月 17, 2006

今天的聯合報 學習英文 by 陳建志

學字根
讀希臘神話
讀聖經
聽流行歌(學歌詞)
參考游克強的網路文章(PCHome的電子報):『談成年人學英文』注意:這是一系列的文章哦!
jhou 有整理出來。

聽ICRT
看旅遊生活頻道:『Tracvel & Living』
DVD
『六人行』 對話速度恰到好處ˋ
『慾望城市』 對話速度快些
『玩酷世代』 很快的對話速度,很酷的新鮮話

讀英文版小王子

星期五, 8月 18, 2006

Linux Boot process

This link is good for understanding the Linux boot up process
http://www.comptechdoc.org/os/linux/howlinuxworks/index.html

Redhat 9.x can not find the ETH0 in VMWare 4.x or 5.0

When booting the system, the eth0 can not be found. The following is the solution,

Find
/etc/sysconfig/network-scripts/ifcfg-eth
/etc/sysconfig/networking/devices/ifcfg-eth

And then edit the file
/etc/sysconfig/networking/profiles/default/ifcfg-eth0
add the following
check_link_down () {
return 1;
}

then reboot it. Execute "ifup eth0" does not work...it will show "/sbin/ifup: line 268: [: : integer expression expected" and I do not know why. But anyway, reboot will get the satisfied result.



Another article mentioned that

locate
/etc/sysconfig/network-scripts/network-functions

And then modify the function "check_link_down()"

check_link_down() {
return 1
:
:
}

Execute this command "service network restart" ------ not tried.

Redhat 8.0 is O.K.

星期四, 8月 17, 2006

無法送email

在linux server 上發生無法deliver mail的現象,原來是因為硬碟滿了,但是為什麼好端端的會造成硬碟爆炸呢? (用 du -h /var/spool/mqueue/ 檢查空間)

原來是在/root/.spamassassin累積了無數的bayes_tok.expire*檔案,這群垃圾是由Spamassassin生成的,據說解決方法是禁制 Bayes auto-expiry(spam.assassin.prefs.conf中可以設定)同時再於重新安排MailScanner中的Bayes時程(MailScanner.conf).

範例(尚未實驗),

- edit /etc/MailScanner/spam.assassin.prefs.conf
bayes_auto_expire 0

- edit /etc/MailScanner/MailScanner.conf:
SpamAssassin Timeout = 120
Rebuild Bayes Every = 14400 (秒為單位)
Wait During Bayes Rebuild = yes

- /etc/init.d/MailScanner stop
- sa-learn --sync
- /etc/init.d/MailScanner start





待續﹍

星期日, 7月 23, 2006

Google Map的座標換算 ﹍ 以杜拜七星級帆船飯店為例

杜拜七星級帆船飯店的座標:
25° 8'30.27"N
55°11'7.22"E

人工島
25° 6'49.06"N
55° 8'27.92"E

24°59'50.39"N
54°59'38.82"E

注意,可以用 Google Map 直接依座標找到,如下:

25° 8'30.27"N = 25.141741 = 25 + 8/60 + 30.27/3600 ?
55°11' 7.22"E = 55.185339 = 55 + 11/60 + 7.22/3600

http://maps.google.com/maps?ll=25.141741,55.185339&spn=0.1,0.1&t=k&hl=en

25° 6'49.06"N = 25.112358
55° 8'27.92"E = 55.140398

Remove "Zombie" for unknown pid shown in executing "who"

cd /var/run
rm utmp
touch utmp
chgrp utmp utmp
chmod g+w utmp

after that, if you execute "who", no user will be shown, but they will be updated on the next login.
Yes, it works.

星期六, 7月 22, 2006

Linux Converter for DigiMemo A501

DigiMemo是一個 非常有趣的電子記事本;有人已經準備好了他的Unix/Linux Perl版程式 ,有的人一定要試用一下﹍我還沒有用過!!!!

http://www.etes.de/opensource/digimemo_a501_converter_linux/en

另外在Mobile01中有有同好準備了MS.NET "AceCad A501 電子筆記本格式拆解程式",有空時再來試一下。

星期五, 7月 21, 2006

Fedora 3 新酷音輸入安裝 scim-chewing

很久沒有update blog,今天突然發現這一個好的注音輸入法,重點是他是open source software,那一天很閒時,可以自行修改(哈! 如果有那麼一天) 。他有一個最重要的特徵---跨平台:Linux, Windows皆可。首頁在 智慧型注音輸入法發展總部。

Windows 的安裝很簡單,直接下載安裝檔就可以了;現在這篇文章就是用酷音輸入完成的。

Fedora 5 應該也不是問題(內建),Fedora 4 可參考http://www.seamxr.com/blog/?cat=3;事實上,可能fedora 3 也可以照樣畫葫蘆,不過一開始沒找到這一篇,所以我的方法有些不同(It can also be used in Fedora 4. I tried it already):

1.Download libchewing-0.3.0.tar.gzscim-chewing-0.3.1.tar.gz
2.Download scim-1.4.4
3.compile and install Download scim-1.4.4 (./configure , make , make install)
4.copy /usr/local/lib/pkgconfig/scim.pc and scim-gtk*.pc to /usr/lib/pkgconfig ---> necessary for building the scim-chewing
5.Complie and install libchewing and scim-chewing (./configure --prefix=/usr, make , make install)
6.finally, edit /etc/X11/xinit/xinput.d/zh_TW and change the following items
(a) XIM=SCIM
(b)
XIM_PROGRAM=scim
(c) XIM_ARGS=”-x scim”
(d) GTK_IM_MODULE=scim
7. Execute scim -d (若要每次log in都使用scim,可在~/.bashrc 加入 scim -d)
8. Ctrl-Space 就可以使用囉!


註記一下,我的 /etc/sysconfig/i18n 的設定是(English environment with Chinese input capability)

LANG="zh_TW.UTF-8"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:zh_TW.UTF-8:zh_TW:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"

星期四, 5月 04, 2006

Finally I can start to post articles

After some struggle, this blog is able to post now.