跳到主要內容

發表文章

目前顯示的是 2010的文章

Install MSYS

就如同官網上所講的, MSYS可以讓Windows有基本的Linux Shell的指令. MSYS is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present. It is intended to supplement MinGW and the deficiencies of the cmd shell. 但由於mingw-get-inst自動安裝程式下載msys的套件安裝還有問題, 所以我改用手動安裝. 官網的安裝說明: http://www.mingw.org/wiki/msys

Add vi keys to eclipse editor

Vrapper is an eclipse plugin which acts as a wrapper for eclipse text editors to provide a Vim-like input scheme for moving around and editing text. To install Vrapper, add the remote site http://vrapper.sourceforge.net/update-site/stable to your Eclipse Update Manager.

MinGW installation

It seems the MinGw main site is broken currently. (2010 Oct 26) The automated MinGW Installer (mingw-get, mingw-get-inst) still can't find some of the packages. I do some googling and find another maintainer of MinGW -- TDM-GCC which has a better installer. Reference: http://wiki.codeblocks.org/index.php?title=MinGW_installation

用remserial來建立一個serial port I/O

首先, 需建立一個輸入端: # nc -l -p 2000 -t 再用remserial 連線到這個port #  remserial -r localhost -p 2000 -l /dev/remserial /dev/ptmx 如此在netcat下輸入的資料, 都會被導向到/dev/remserial這個pseudo serial port去

sendmail使用hibox寄信

在台灣使用sendmail寄信到外部郵件信箱(如gmail, pchome, hinet...), 大概都會遇到smtp需要認證的問題(SMTP AUTH). 為了解決這個問題, 必需要把sendmail的SMART_HOST, confAUTH及MASQUERADE功能打開. 

Office 2003, 2007共存的問題

若您在安裝office時跟我一樣選擇留下舊版的office2003的話, 在使用完2003後再開啓2007, 或者是用完2007再開2003, 可能都會再進入安裝的畫面.

手動複製ubuntu Linux

複製硬碟由小到大簡單, 由大到小比較難, 我就遇到這種問題. 兩家2G的卡片, 就有不同的大小. 這是第一個CF的大小 Disk /dev/sda: 2079 MB, 2079866880 bytes 這是第二個的 Disk /dev/sdb: 2029 MB, 2029805568 bytes 這是partition的layout Device Boot Start End Blocks Id System /dev/sda1 * 2048 3756031 1876992 83 Linux /dev/sda2 3758078 4061183 151553 5 Extended /dev/sda5 3758080 4061183 151552 82 Linux swap / Solaris 在較小的CF卡上, 我決定將後面的swap放棄掉. Linux的partition不變. 1. 我先備份bootloader(Grub) $dd if=/dev/sda of=MBR-backup bs=446 count=1 我不備份到512bytes的原因, 是因為不想備份到partition table. 參考這篇文章: http://embraceubuntu.com/2005/10/20/backing-up-the-mbr/ 2. 按照之前sda所得到的partition table, 用fdisk設定到sdb上, 只有swap的partition變小. 並將之格式化. # mkfs.ext2 /dev/sdb1 swap 因為要設定UUID, 所以待會再做 再把bootloader 還原回去 $ dd if=MBR-backup of=/dev/sdb 3. 將/dev/sdb1 mount 到/mnt上, 用rsync備份根目錄下的資料到/mnt下 # mount /dev/sdb1 /mnt # cd / 因為mnt, proc, sys的目錄都是虛擬的檔案系統, 所以不用copy # rsync -a --exclude=mnt -...

CVS指令找改過的檔案

CVS版本管理系統雖然古老但是還是很多人在用, 至少我之前的公司就是 cvs status雖然可以找到變更的檔案有時卻又太多 這兩個指令可以找到有變更的檔名, 出處我已經忘了. # Show new files in current project "cvs status | grep ?" # Show status of all *not* Up-to-date files "cvs status | grep Status | grep -v Up"

xming 改變字型大小

Xming   是一個在   Microsoft Windows   作業系統上運行   X Window System   的   自 由軟件 。 安裝方式可參考 http://www.cs.nctu.edu.tw/ help/xming.html 使用Xming開啓gnome-terminal時, dpi 100時字會太小, 可以用Ctrl Shift + 來放大, 或者可以修改啓動檔.xlaunch來指定解析度. RemoteUser="jim" Display="5" Clipboard="true" ExtraParams="-dpi 95"/>

Use mutt receive email

如果要用mutt內建的pop/imap收信功能, 首先要檢查是否compile時有enable # mutt -v +USE_POP  +USE_IMAP 1. 執行mutt 2. 假設要連線到pop3 server:www.hibox.hinet.net 3. 按c 改變mail box 路徑 4. 輸入: pop://email-account@www.hibox.hinet.net  5. 若要使用imap, 則改變pop成imap即可imap ://email-account@www.hibox.hinet.net

Xming裡使用中文輸入法

使用Xming來遠端執行Linux程式已經很久了, 但是一直沒有方式可以輸入中文, 後來看了 這篇文章 後才成功的. 首先輸入法應該改用gcin, 因為其它輸入法不支援遠端client. 還要改變輸入視窗開啟的方式, 以免與Windows Ctrl+Space相沖, 以及選擇遠端client支援.

在firefox中完全移除ask.com toolbar

在灌KMPlyaer時不小心灌了ask.com的toolbar, 導至在firefox及ie6預設的search engine都被改了. 刪除的方法, 在 firefox中, 除了用工具->附加元件 去移除之外, 另外還得要在網址列打"about:config" 進入偏好設定去刪除其它的部份 參考下圖

將Bing翻譯加到Microsoft office中

微軟出的線上翻譯 Bing翻譯 http://www.microsofttranslator.com/Default.aspx 原本Microsoft Office 2003 & 2007 的翻譯為WorldLingo 下載 Microsoft Translator installer for Microsoft Office 安裝好後就會改用Bing翻譯了

a small and nice ini parser -- iniParser

Today I finished cross-compiling wvdial package. After I cross-compiling it, I found that it has some problem to load the wvdial.conf. And I also know that passing arguments to the wvdial is still working. Finally, I decide to modify the wvdial program to load the wvdial.conf by my own. I load the config file with iniParser and pass it to the cfg object. Now it works perfectly !! wvdial -- a utility that helps in making modem-based connections to the Internet wvdial site wvdial wiki iniParser home wvdial introduction  

ubuntu上mount lvm partition

ubuntu 9.10灌好後, 最先就是把之前灌fedora那個硬碟的資料copy回來. 由於fedora 9預設是用lvm的partition, 因此要安裝lvm2套件, 剩下的, 就是把lvm mount起來 # sudo apt-get install lvm2 # sudo vgscan # sudo vgchange -ay VolGroup00 # sudo lvs # sudo mount /dev/VolGroup00/LogVol00 /mnt Reference: http://www.linux-sxs.org/storage/fedora2ubuntu.html