November 23, 2003

Windows XP 兩台電腦建立ad-hoc連線的方法

第一台電腦
無線網路->慣用網路->新增, SSID 任意取一個名字, 如 test
網路驗證: 已開啟
資料加密: 停用
進階: 只給電腦到電腦的網路

第二台電腦
重複上面的動作, SSID 取一樣即可

Posted by pank at 01:52 AM | Comments (0)

November 21, 2003

USB keyboard support

Input core support --->
[*] Input core support
[*] Keyboard support
USB support --->
[*] Support for USB
[*] USB HIDBP Keyboard (basic) support
勾選 OHCI Num Lock 燈號才會正常, 否則一直亮
[*] OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support

Posted by pank at 04:15 PM | Comments (0)

November 20, 2003

Linux driver for Lucent/Agere ORiNOCO USB devices (website)

http://folk.uio.no/oeysteio/orinoco-usb/

Posted by pank at 11:51 PM | Comments (1)

November 19, 2003

rdesktop 1.3

suport RDP 5.0

new feature

-a
Sets the colour depth for the connection (8, 15, 16 or 24).
More than 8 bpp are only supported when connecting to Windows XP
(up to 16 bpp) or newer. Note that the colour depth may also be
limited by the server configuration.

-r
Enable redirection of the specified device on the client, such
that it appears on the server. The only device currently sup-
ported is "sound" (requires Windows XP or newer). Note that the
allowed redirections may be restricted by the server configura-
tion.

-0 Attach to the console of the server (requires Windows Server
2003 or newer).

-4 Use RDP version 4.

-5 Use RDP version 5 (default).

Posted by pank at 10:44 AM | Comments (0)

Internet Explorer 未以正確格式儲存圖形檔案

http://support.microsoft.com/default.aspx?kbid=260650

發生的原因
此問題會發生有許多原因。
如果您的 Temporary Internet Pages 快取已滿,就可能發生此問題。
如果您在 [工具]、[網際網路選項]、[進階索引標籤] 中已選取 [不要將加密的網頁存到磁碟],並由安全連線 (http) 載入網頁,就可能發生此問題。
當您連接到網址中含有 的網站時,就可能發生此問題。 例如,您是透過 http:///default.htm 存取伺服器,而不是 http:///default.htm。
如需有關此問題其他原因的詳細資訊,請按一下下列文件編號,檢視 Microsoft Knowledge Base 中的文件:
250747 Right-Clicking, Selecting 'Save Picture As' Does Not Save Image with Correct Extension

其他可行方案
您可使用下列三種方法中任一種以解決此問題。
原因 1 處理方法
如果要解決問題,請選取 [工具]、[網際網路選項]、[一般] 索引標籤 並選取 [刪除檔案] 按鈕以刪除暫存的 Internet 檔案。

注意: 如果要找出 Temporary Internet Files 資料夾,請按一下 [工具] 功能表上的 [網際網路選項],按一下 [一般] 索引標籤,再按一下 [設定]。 [設定] 對話方塊會指出目前位置。
原因 2 處理方法
如果要執行這項操作,請從 [工具]、[網際網路選項]、[進階] 索引標籤中清除 [不要將加密的網頁存到磁碟] 核取方塊。 再選取 [檢視]、[重新整理] 以重新載入網頁。


原因 3 處理方法
方法 1
開啟 Temporary Internet Files 目錄,並找出您想儲存的影像。
在影像上按一下滑鼠右鍵,再按一下 [開啟]。
當影像載入 Internet Explorer 時,在影像上按一下滑鼠右鍵,再按一下 [另存圖片]。 正確的檔案類型與名稱應該是正確的。
方法 2
輸入前往您想儲存的影像的直接路徑。
當影像載入 Internet Explorer 時,在影像上按一下滑鼠右鍵,再選取 [另存圖片]。 確認輸入了正確的檔案類型與名稱。
方法 3
您也可以用 .bmp 格式儲存檔案,再使用圖形編輯器將檔案轉換為想要的檔案格式。

Posted by pank at 09:01 AM | Comments (0)

November 18, 2003

php show client's browser language

$_SERVER["HTTP_ACCEPT_LANGUAGE"]

Posted by pank at 03:21 PM | Comments (0)

November 17, 2003

linux "could not open session"

-rw-r--r-- /etc/passwd is normal
-rw------- will casue "could not open session" when normal user login or root su to normal user

Posted by pank at 09:42 PM | Comments (1)

xdm

server 端
修改 /etc/X11/xdm/xdm-config
改成 #DisplayManager.requestPort: 0
啟動 xdm

client 端
X -query host
X -broadcast

client 端一開機就連
3:2345:respawn:/usr/bin/X11/X -broadcast

Posted by pank at 02:44 PM | Comments (0)

November 14, 2003

bin2iso for unix (website)

http://users.eastlink.ca/~doiron/bin2iso/

Posted by pank at 01:25 PM | Comments (0)

perl,sed replace, append sample

在 ccc 後面加上一行 xxx

# cat test
aaa
bbb
ccc
ddd

# perl -pi -e "s/ccc/ccc\nxxx/" test

# cat test
aaa
bbb
ccc
xxx
ddd

把 xxx 換成 yyy
# perl -pi -e "s/xxx/yyy/" test

# cat test
aaa
bbb
ccc
yyy
ddd

把檔案中含有 xxx 字串的下一行加上一行 new line
# cat test
aaa 111
bbb 222
ccc 333
555 xxx 444
ddd kkkkkkkkkkkkk
xxx 666
mmmmmmmmmmmmm
lllllllllllllllllxxx
eeeeeee

# sed -e '/xxx/a\
new line' test > test.tmp

# mv test.tmp test

# cat test
aaa 111
bbb 222
ccc 333
555 xxx 444
new line
ddd kkkkkkkkkkkkk
xxx 666
new line
mmmmmmmmmmmmm
lllllllllllllllllxxx
new line
eeeeeee

Posted by pank at 09:06 AM | Comments (0)

November 11, 2003

postfix clean mail queue

postsuper -d ALL

Posted by pank at 02:10 PM | Comments (0)

November 03, 2003

apache + ssl + php (更新版)

準備
apache_1.3.29.tar.gz from http://httpd.apache.org/
openssl-0.9.7c.tar.gz from http://www.openssl.org/
php-4.3.3.tar.gz from http://www.php.net/
mod_ssl-2.8.16-1.3.29.tar.gz from http://www.modssl.org/

解壓全部
cd openssl-0.9.7c
./config -fPIC
make
make install

cd ../mod_ssl-2.8.16-1.3.29
./configure --with-apache=../apache_1.3.29 --with-ssl=../openssl-0.9.7c --prefix=/usr/local/apache

cd ../apache_1.3.29
./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf --enable-module=so \
--enable-shared=ssl --enable-module=ssl --enable-module=rewrite --enable-shared=rewrite
make
make certificate

STEP 0: Decide the signature algorithm used for certificate
The generated X.509 CA certificate can contain either
RSA or DSA based ingredients. Select the one you want to use.
Signature Algorithm ((R)SA or (D)SA) [R]:D (選 DSA)

WARNING! You're generating a DSA based certificate/key pair.
This implies that RSA based ciphers won't be available later,
which for your web server currently still means that mostly all
popular web browsers cannot connect to it. At least not until
you also generate an additional RSA based certificate/key pair
and configure them in parallel.
______________________________________________________________________

STEP 1: Generating DSA private key (1024 bit) [server.key]
Generating DSA private key via SnakeOil CA DSA parameters
109338882 semi-random bytes loaded
Generating DSA key, 1024 bits
______________________________________________________________________

STEP 2: Generating X.509 certificate signing request [server.csr]
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
1. Country Name (2 letter code) [XY]:TW (輸入資訊)
2. State or Province Name (full name) [Snake Desert]:Taiwan
3. Locality Name (eg, city) [Snake Town]:Taipei
4. Organization Name (eg, company) [Snake Oil, Ltd]:TECO
5. Organizational Unit Name (eg, section) [Webserver Team]:IA
6. Common Name (eg, FQDN) [www.snakeoil.dom]:www.teco-ia.com.tw
7. Email Address (eg, name@FQDN) [www@snakeoil.dom]:root@teco-ia.com.tw
8. Certificate Validity (days) [365]:10000 (填一個夠長的時間)
Certificate Version 選 3

STEP 3: Generating X.509 certificate signed by Snake Oil CA [server.crt]
Certificate Version (1 or 3) [3]:3

Encrypt the private key now? [Y/n] (選 n 啟動時才不用輸入密碼)
make install

cd ../php-4.3.3
./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --enable-module=so \
--with-config-file-path=/usr/local/etc --libexecdir=/usr/local/apache/libexec
make install

修改 httpd.conf

在 DirectoryIndex 該行後加上 index.php

新增
LoadModule php4_module libexec/libphp4.so
LoadModule ssl_module libexec/libssl.so
AddModule mod_php4.c
AddModule mod_ssl.c

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

加入 register_globals = on 到 php.ini
echo "register_globals = on" >> /usr/local/etc/php.ini

啟動 /usr/local/apache/bin/apachectl startssl

Posted by pank at 09:19 AM | Comments (0)

Postfix 的 MX relay

master.cf 裡面要有這一行
relay unix - - n - - smtp

Posted by pank at 08:20 AM | Comments (0)

thttpd 改 default charset 為 big5

in FreeBSD , 修改 /usr/local/sbin/thttpd_wrapper
加 -T big5

Posted by pank at 08:18 AM | Comments (0)

November 02, 2003

RedHat Linux

RedHat 已不再公開釋出版本, 爾後分三個等級出售, 最便宜的也要 USD 179 (約台幣6000, 超貴)

http://www.redhat.com/software/rhel/ws/

Red Hat Enterprise Linux WS
Ideal for all desktop/client needs, including development workstation, power desktop, targeted client applications, and High Performance Computing.

Red Hat Enterprise Linux ES
The solution for small to mid-range servers used for the majority of today's business computing needs.

Red Hat Enterprise Linux AS
The top-of-the-line enterprise Linux, supporting high-end and mission-critical systems, and available with the highest levels of support.

Posted by pank at 02:51 AM | Comments (0)