2011年1月29日

五種 ubuntu 上用的 blog 撰寫軟體

來源: Five Desktop Blog Editors for GNU/Linux Users


偶然從逛網站看到的, 都還沒試用過, 先記住以利日後參考。
我其實是想找一次可以管理多個網站、網誌的軟體,因為有太多網誌, 常常自已 PO 到哪都忘記了...


Five Blogging Editors to Make Blog Posts From the GNU/Linux platform

1. GNOME Blog Entry Poster
Post Blog posts from GNU/Linux using Blog Entry Poster
Gnome Blog Home page

2. Drivel Journal Editor
Post Blog posts from GNU/Linux using Drivel
More information on Drivel

3. BloGTK Blog Editor
Post Blog posts from GNU/Linux using BloGTK Editor
More about BloGTK

4. ScribeFire Firefox Extension
Post Blog posts from GNU/Linux using ScribeFire Firefox Extension
Getting Started with ScribFire Blog Editor

5. Google Docs as a Blog Editor

2011年1月28日

grub loader 語法: ubuntu 10.04 Netbook Remix

title Ubuntu 10.04 Netbook Remix (NetBook Distro)
find --set-root /ubuntu-10.04-netbook-i386.iso
map /ubuntu-10.04-netbook-i386.iso (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz floppy.allowed_drive_mask=0 noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu-netbook.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04-netbook-i386.iso splash
initrd /casper/initrd.lz

將 Ubuntu的 ISO 檔放到 USB 外接硬碟,然後利用Grub4DOS開機,並成功安裝到桌機的硬碟裡面。
參考的是這一篇http://hi.baidu.com/sxpspace/blog/item/aa29f5f351acf857352acc38.html
注意 menu.lst 裡的這一段:
title Install ubuntu
map (hd0,0)/ubuntu.iso (hd32)
map --hook
root (hd0,0)
kernel (hd32)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso
initrd (hd32)/casper/initrd.gz

ubuntu 下的 virtualbox 中的 winXP 不能讀 USB

系統 -> 管理 -> 使用者及群組, 解鎖後
選 [管理群組], 找到 [vboxusers], 按 [屬性]
再將你的帳號加入這個 [vboxusers] 群組就可以了

或用指令
sudo groupadd -a -G vboxusers yourid

複製 virtualbox 中的 *.vdi 檔

在 ubuntu 的終端機中, 下指令
VBoxManage clonehd 來源.vdi 目標.vdi
即可, 例如:
VBoxManage clonehd xp-sp2-3.vdi myXP.vdi

2011年1月27日

再探 UEC (1): VT-enabled CPU (64-bit), UEC

UEC 最簡單的架構是兩個server:
server 1: CLC + WALRUS + CC + Storage Controller
   CPU 快一點的電腦, 因為要控制連結 NC
server 2: NC
   支援 VT, 且記憶體多一點的電腦
可選擇性加入:
 server 3,4,5...: NC
   支援 VT, 且記憶體多一點的電腦


圖片來源: UE architecture (pdf)



哪些 CPU 有支援 VT 功能? 查了一些資料後發現可以由 CPU 的 info 來確定:


名詞:

虛擬機器 (參見 鳥哥 利用 Xen 設計虛擬機器)
主要分為半虛擬化 (Para-virtualization) 及全虛擬化 (Full virtualization) 兩種;


可以執行半虛擬化主機, CPU 必須要支援的實體位址延伸技術 (PAE) ; 檢查 CPU 的參數即可確認:

xxx@desktop:~$cat /proc/cpuinfo | grep flags
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt
(我的機器是 AMD Phenom II X4 945 四核) 有看到 pae 應該就有支援。而支援全虛擬化
(註 Intel 提供 VT 技術, AMD 則提供 SVM 技術) 這兩種技術在 CPU 的旗標分別是:Intel (vmx) 與 AMD (svm)

安裝 ms core fonts in ubuntu

sudo apt-get install --reinstall ttf-mscorefonts-installer

2011年1月24日

ubuntu 中掛載 NTFS 磁碟

開機時自動掛載 Windows 分割區 (FAT),並允許所有使用者能 讀取/寫入:
假設 Windows 的分割區 (FAT) 是 /dev/hda1 ,掛載的資料夾是 /media/windows
sudo gedit /etc/fstab
在最後加上
/dev/hda1 /media/windows vfat iocharset=utf8,umask=000 0 0
然後儲存檔案

開機時自動掛載 Windows 分割區 (NTFS),並允許所有使用者能讀取:


假設 Windows 的分割區 (NTFS) 是 /dev/hda1 ,掛載的資料夾是 /media/windows
sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab.backup
sudo gedit /etc/fstab
在最後加上
/dev/hda1 /media/windows ntfs nls=utf8,umask=0222 0 0
按照 /etc/fstab 的設定自動重新掛載一次 (不用重開機)
sudo mount -a
參考: ubuntu 正體中文, 鳥哥的 Linux 私房菜

2011年1月7日

在 ubuntu 10.04 安裝 gretl 1.9.3x - 有關 gnuplot 的問題

用 gnuplot for gretl 的方法, 但是有錯誤(在執行 gnuplot 時):
XXX@ubu1004:/$ /opt/gnuplot/bin/gnuplot
/opt/gnuplot/bin/gnuplot: error while loading shared libraries: libwx_gtk2u_richtext-2.8.so.0: cannot open shared object file: No such file or directory
找了很多方法, 都不能決解, 
後來乾脆直接下載 gnuplot (4.4.0-1)  (for maverick ) 的 binary 檔來試試
 @ http://packages.ubuntu.com/maverick/gnuplot

但要先安裝

gnuplot-nox (>= 4.4.0-1)
gnuplot-x11 (>= 4.4.0-1)
裝好以後 gnuplot 的部份應該OK了 (可以在終端機中打 gnuplot, 看版本是不是 4.4)
接著安裝我自已打包的 gretl_1.9.3-1_i386.deb

安裝好 gretl 之後, 依 在 ubuntu 9.10 裝 自行打包的 gretl 1.8.6 這篇的說明:

  • 1. 在 /usr/local/lib 下, 找到 libgretl-1.0.so.0 和其它 3 個以 libgretl* 開始的檔案, 都複製到 /usr/lib 
  • 2. 找不到 lapack.so.0 ...
  • /usr/local/bin/gretl_x11: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory
少了 lapack, 試著在 synaptic 裝 liblapack-dev, 之後用管理權限, 在 /usr/lib 下, 找到 liblapack.so, 複制成 liblapack.so.3; 再用管理權限, 在 /usr/lib 下, 找到 libblas.so, 複制成 libblas.so.3Ok 了, gretl 和 gnuplot 都可以正常執行了