Software: July 2008 Archives

因為 gnome-terminal 的 zoom_out hotkey Ctrl+-, 跟 joe editor 的 undo 相衝,
導致 joe 在使用時無法 undo, 很不方便.
以下是取消 zoom_in,zoom_out hotkey 的方法
gconftool-2 -st string /schemas/apps/gnome-terminal/keybindings/zoom_in disabled
gconftool-2 -st string /schemas/apps/gnome-terminal/keybindings/zoom_out disabled

ref. gnome-terminal source

下載 Linux 專用的 Java 軟體 並安裝
若 Firefox 裝在 /usr/local/firefox
cd /usr/local/firefox/plugins
ln -s /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so .
重新啟動 Firefox, 可以到 Java 測試頁 試一下 Java 有沒有 Work
實際路徑可能跟您裝的 jre 版本不同

ref. Mozilla PluginDoc: Java Runtime Environment

Go-OO

user-pic
Vote 0 Votes

要備份系統時遇到詭異問題, Ghost 到一半電腦就自動關機(用 DOS 版 Ghost),
屢試不爽.
Google 一下, 參考了他人的討論, 最後做了磁碟掃描後就正常了.

newcj3gcin for gcin
newcj3scim for scim
script 的前面有兩個參數,
NO_DOT_COMMA=1, 表示移除不用 ,. 當字根(傳統倉頡做法)
NO_PTT=1 (表示移除 ptt 相關詞)
若要用 SVN 的版本, 先抓 NewCJ3.cin 到目前目錄, 再跑 script.
/usr/share/gcin/table/gtab.list 內容
#內碼 0 -
倉頡 1 cj.gtab
亂倉 2 NewCJ3.gtab
#倉五 2 cj5.gtab
#輕鬆 2 ez7.gtab
注音 3 -
#帶調粵拼 4 jyutping.gtab
#標點倉頡 4 cj-punc.gtab
嘸蝦米 5 liu5.gtab
#拼音 5 pinyin.gtab
#詞音 6 -
大易 7 dayi3.gtab
行列 8 ar30.gtab
#簡易 - simplex.gtab
改完後用 gcin-setup 再調整一下.

Firefox 3.0.1 Released

user-pic
Vote 0 Votes

Download Firefox 3.0.1
其中 Tab Mix Plus 不能用了,
我只是要把 Tab 放在下方而已, 所以改用 Tab Mix Lite CE,

文泉驛正黑體

user-pic
Vote 0 Votes

文泉驛正黑體 出了 0.6.26 版
下載解開
cp wqy-zenhei.ttf /usr/share/fonts
fc-cache -fv
fc-list | grep WenQuanYi 有看到「文泉驛正黑」, 表示安裝成功.
個人認為還是微軟正黑體的顯示效果好一些,
截圖比較: 微軟正黑體文泉驛正黑體

ref. 推薦使用免費開源又美觀的文泉驛正黑體

Multiple DNS implementations vulnerable to cache poisoning
DNS 的一個設計上的漏洞可能導致 cache poisoning attack,
幾乎影響到所有的 DNS Server.
若是使用 BIND 請更新到以下這些版本:
9.5.0-P1, 9.4.2-P1, 9.3.5-P1

DbVisualizer

user-pic
Vote 0 Votes

DbVisualizer 是一套全方位的資料庫管理工具, 各種資料庫都支援.
會注意到這套主要是它有 for Linux 的版本, 用來在 Linux 下管理 MSSQL 還滿好用的.
DbVisualizer 是用 Java 寫的, 需 copy 中文字型到 $JAVA_HOME/jre/lib/fonts 中文才不會秀出方塊,
cd $JAVA_HOME/jre/lib/fonts
mkdir fallback
cp path/msjh.ttf fallback (複製微軟正黑體)
cd fallback
mkfontscale
mkfontdir
試用的 Free Edition 好像也沒什麼限制.

ref. Linux操作系统JDK中文字体设置方法介绍

GNOME 設定檔案關聯

user-pic
Vote 0 Votes

在檔案按右鍵 -> 屬性 -> 用指定軟體開啟

mingetty autologin

user-pic
Vote 0 Votes

mingetty 有自動登入參數 --autologin
例: 在第一個 console 以 pank 身分自動登入
/etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty --autologin pank tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

若遇到 ssh 一開始連線時要等一下子, 可試試在 sshd_config 裡 設定 UseDNS no
UseDNS Specifies whether sshd should look up the remote host name and
check that the resolved host name for the remote IP address maps
back to the very same IP address. The default is "yes".

Wubi 可以把 Ubuntu Linux 裝在 Windows 的機器上, 方便 Windows 用戶體驗 Linux.
它是安裝到 Windows partition 的一個目錄中.
Fedora 也將跟進, 在下一個版本 Fedora 10 中增加類似 Wubi 的功能.

GNOME vino server

user-pic
Vote 0 Votes

GNOME 系統 / 偏好設定 / 遠端桌面
可以啟動 Local 的 VNC :0 桌面分享功能, 遠端用 VNC Client 就可以連了!

用 command 控制此功能開/關的指令
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled false

發現若原本是打開的, 關閉此功能 Port 5900 仍舊有 Listen, 但是從外面連不到,
連不通後, 就會把 Service Shutdown 了.

ref. Remote Desktop Administration Using Vino
HOWTO: Control the gnome VNC vino-server from the command line

安裝 Mod_Auth_External
apxs -c mod_authnz_external.c
apxs -i -a mod_authnz_external.la

安裝 pwauth
編輯 config.h 裡的 #define SERVER_UIDS, 將 Apache 執行者的 UID 加入,
例如: #define SERVER_UIDS 72
make
chmod 4755 pwauth (pwauth 需 setuid root, 使能讀取 /etc/shadow)
mv pwauth /usr/sbin

在 httpd.conf 加入
LoadModule authnz_external_module modules/mod_authnz_external.so
AddExternalAuth pwauth /usr/sbin/pwauth
SetExternalAuthMethod pwauth pipe

建立 /etc/pam.d/pwauth
內容
auth required /lib/security/pam_pwdb.so shadow nullok
auth required /lib/security/pam_nologin.so
account required /lib/security/pam_pwdb.so

如此 Apache 的認證就可以用系統帳號了, 不需用 htpasswd 建立
.htaccess 內容
AuthType Basic
AuthName Login
AuthBasicProvider external
AuthExternal pwauth
GroupExternal unixgroup
require valid-user

ref. HOWTO PAM authentication with Apache 2.2 and mod authnz external - Gentoo Linux Wiki
mod_auth_pam 此專案已不再開發與維護了, 不建議使用.

Create Hidden Process

user-pic
Vote 0 Votes

Create Hidden Process 可以在 Windows 下隱藏啟動的程式,
例如要執行批次檔而不想畫面上出現 cmd 視窗.
chp test.bat

httping

user-pic
Vote 0 Votes

httping 可以對 Web Server 作 request, 結果會顯示回應時間, 類似 ping 的輸出.

# httping -c5 -g http://tw.yahoo.com
PING tw.yahoo.com:80 (http://tw.yahoo.com):
connected to tw.yahoo.com:80, seq=0 time=10.74 ms
connected to tw.yahoo.com:80, seq=1 time=9.94 ms
connected to tw.yahoo.com:80, seq=2 time=10.48 ms
connected to tw.yahoo.com:80, seq=3 time=9.75 ms
connected to tw.yahoo.com:80, seq=4 time=9.60 ms
--- http://tw.yahoo.com ping statistics ---
5 connects, 5 ok, 0.00% failed
round-trip min/avg/max = 9.6/10.1/10.7 ms

ref. httping : 針對 HTTP Request 的仿 ping 程式

About this Archive

This page is an archive of entries in the Software category from July 2008.

Software: June 2008 is the previous archive.

Software: August 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Software: Monthly Archives

Monthly Archives