-----Ubuntu 10.04 linux kernel upgrade form 2.6.32-21-generic to 3.18.0 --------
P.S. Commands marks as purple.
1.
Download linux kernel from https://www.kernel.org/
Choose file: linux-3.18.tar.xz
2.
sudo apt-get install xz-utils
tar Jxvf linux-3.18.tar.xz
3.
sudo apt-get install libncurses5-dev
sudo apt-get install kernel-package
cd linux-3.18
sudo cp /boot/config-2.6.32-21-generic .config
make menuconfig
fakeroot make-kpkg --initrd --revision huang.001 --append-to-version -20141208 kernel_image
4.
double click and install "linux-image-3.18.0-20141208_huang.001_i386.deb"
5.
check new linux kernel module name:
ls /lib/modules/
2.6.32-21-generic 3.18.0-20141208
6. create initrd:
cd /boot
sudo makinitramfs -k -o initrd.img-3.18.0-20141208 3.18.0-20141208
sudo update-grub2
sudo reboot
P.S. if you doesn't do step6 will occur "kernel panic - not syncing : VFS : unable to mount root fs on unknown block (0,0)".
7.
When Ubuntu reboot, long press SHIFT will into GRUB menu,
Select new kernel "3.18.0-20141208", done.
2014年12月8日 星期一
2014年4月21日 星期一
Password for 'default' GNOME keyring: solution
When meet error like
you can edit ~/.subversion/config in section [Auth] add:
password-stores =
Password for 'default' GNOME keyring:
you can edit ~/.subversion/config in section [Auth] add:
password-stores =
2014年4月11日 星期五
Password for '(null)' GNOME keyring
用svn checkout時發生以下問題,無法登入:
Password for '(null)' GNOME keyring:
解決辦法:
rm ~/.gnome2/keyrings/login.keyring
再重新輸入帳密即可
2014年3月26日 星期三
ubuntu 10.04 libstdc++5 not found solution
1. download libstdc++5_3.3.6-20~lucid1_i386.deb from here .
2. dpkg -i libstdc++5_3.3.6-20~lucid1_i386.deb
done!
-------------------------------------------------------------------------------------
If you using Debian OS, just type:
sudo apt-get install libstdc++5
done!
2. dpkg -i libstdc++5_3.3.6-20~lucid1_i386.deb
done!
-------------------------------------------------------------------------------------
If you using Debian OS, just type:
sudo apt-get install libstdc++5
done!
2013年3月29日 星期五
Ubuntu 10.04 close update manager when startup
1. System -> Preferences -> Startup Applications
Disabled Update Notifier.
2. Administration -> Update Manager -> Settings...
Set Automatic updates disabled.
Disabled Update Notifier.
2. Administration -> Update Manager -> Settings...
Set Automatic updates disabled.
2013年3月19日 星期二
Virtual Box 開啟多核心
要開啟多核心必須先將Bios中的Intel Virtualization Technology設為Enable.
1. 重新開機, 開機時連續按delete,進入Bios畫面.
2. 如圖所示,選擇Advance->Intel Virtualization Technology.
這邊特別要注意,要開啟的是Intel Virtualization Technology而不是Hyper-threading!!!
Intel Virtualization Technology預設是Disabled,把它設為Enable即可.
3. 儲存並離開Bios,重新開機.
4. 開啟Virtual Box->設定->系統->處理器, 把cpu拉到你電腦最高支援的核心數.
(圖中因為虛擬作業系統開啟,所以無法變更cpu數目.更改數目時必須關閉虛擬作業系統.)
5. 開啟Virtual Box的虛擬作業系統,完成.
1. 重新開機, 開機時連續按delete,進入Bios畫面.
2. 如圖所示,選擇Advance->Intel Virtualization Technology.
這邊特別要注意,要開啟的是Intel Virtualization Technology而不是Hyper-threading!!!
Intel Virtualization Technology預設是Disabled,把它設為Enable即可.
3. 儲存並離開Bios,重新開機.
4. 開啟Virtual Box->設定->系統->處理器, 把cpu拉到你電腦最高支援的核心數.
(圖中因為虛擬作業系統開啟,所以無法變更cpu數目.更改數目時必須關閉虛擬作業系統.)
5. 開啟Virtual Box的虛擬作業系統,完成.
2012年8月1日 星期三
Virtual Box Error: This kernel requires the following features not present on the CPU
If there is an error
This kernel requires the following features not present on the CPU :
ape
This kernel requires the following features not present on the CPU :
ape
Please check the settings.
2011年10月20日 星期四
Linux 設置 永久 PATH
1.
#gedit /etc/profile
(如果開啟profile發現是唯獨的話要改變權限)
#sudo chmod 777 /etc/profile
2.
在profile最後一行加入
export PATH="$PATH:/opt/toolchains/xxx/usr/bin"
3.
重新登入PATH就會被加進去了。
#gedit /etc/profile
(如果開啟profile發現是唯獨的話要改變權限)
#sudo chmod 777 /etc/profile
2.
在profile最後一行加入
export PATH="$PATH:/opt/toolchains/xxx/usr/bin"
3.
重新登入PATH就會被加進去了。
2011年10月6日 星期四
2011年9月27日 星期二
VirtualBox 共用資料夾 share dir Linux Ubuntu 掛載
自己搜尋網路上的方法,只要幾個步驟就ok。
1. 滑鼠選擇要創建共用資料夾的virtual box OS,這邊以ubuntu11為例,按右鍵->設定值,如下圖。

2. 選擇左側的共用資料夾,右上角按新增,資料夾路徑選其他,指定一個在windows要分享到virtual box的資料夾,屬性勾自動掛載跟永久。

3. 安裝virtual box的guest additions,在主畫面上方選裝置,安裝guest additions,如下圖。

4. 選擇ok->run->輸入登入密碼,會自動安裝,裝完後記得要重新啟動ubuntu。

4. 重開機後,在/media目錄下可看到virtual box已自動幫你掛載好資料夾(ex. 在windows下我取名為windowssharedir,在virtual box內會自動幫你命名為sf_windowssharedir),,但是打不開,通常有問題都是卡在這裡,解決辦法在第5步。

5. 選System->Adminstration->Users and Groups,如下圖。

6. 點Mange Groups->找到群組vboxsf->點Properties。

7. 將自己的使用者打勾,如下圖。

8. 接著先登出,再登入。
9. 去看/media,發現可以進入資料夾了,完成!
=========================================
或是直接下命令
1. 滑鼠選擇要創建共用資料夾的virtual box OS,這邊以ubuntu11為例,按右鍵->設定值,如下圖。
2. 選擇左側的共用資料夾,右上角按新增,資料夾路徑選其他,指定一個在windows要分享到virtual box的資料夾,屬性勾自動掛載跟永久。
3. 安裝virtual box的guest additions,在主畫面上方選裝置,安裝guest additions,如下圖。
4. 選擇ok->run->輸入登入密碼,會自動安裝,裝完後記得要重新啟動ubuntu。
4. 重開機後,在/media目錄下可看到virtual box已自動幫你掛載好資料夾(ex. 在windows下我取名為windowssharedir,在virtual box內會自動幫你命名為sf_windowssharedir),,但是打不開,通常有問題都是卡在這裡,解決辦法在第5步。
5. 選System->Adminstration->Users and Groups,如下圖。
6. 點Mange Groups->找到群組vboxsf->點Properties。
7. 將自己的使用者打勾,如下圖。
8. 接著先登出,再登入。
9. 去看/media,發現可以進入資料夾了,完成!
=========================================
或是直接下命令
sudo adduser <username> sudo
ex. #sudo adduser wayne sudo
2011年3月16日 星期三
2011年2月21日 星期一
Java text append to Linux txt format
在用Java的JTextArea時,如果想將輸出的檔案可在Linux下開啟不要亂碼,換行是用'\n'。
但是單純用String tempstring = tempstring + '\n';的話,tempstring最後4個bytes的16進位會是"00 0A"(用PsPad HEX開可看到),而在Linux上的話就會因為多出了那個"00"而導致亂碼產生,所以必須寫這樣的程式去轉換,使得tempstring最後2個bytes的16進位會是"0A"就好,要去掉"00"。
/////////////////////////////////////////////////
byte[] byteData = new byte[orgstring.length()];
for ( int i = 0 ; i < orgstring.length(); i++) {
byteData[i] = (byte)orgstring.charAt(i);
} // for
byteData[orgstring.length()-1] = 0x0A;
String strResult = new String(byteData);
textarea.append(strResult);
/////////////////////////////////////////////////
但是單純用String tempstring = tempstring + '\n';的話,tempstring最後4個bytes的16進位會是"00 0A"(用PsPad HEX開可看到),而在Linux上的話就會因為多出了那個"00"而導致亂碼產生,所以必須寫這樣的程式去轉換,使得tempstring最後2個bytes的16進位會是"0A"就好,要去掉"00"。
/////////////////////////////////////////////////
byte[] byteData = new byte[orgstring.length()];
for ( int i = 0 ; i < orgstring.length(); i++) {
byteData[i] = (byte)orgstring.charAt(i);
} // for
byteData[orgstring.length()-1] = 0x0A;
String strResult = new String(byteData);
textarea.append(strResult);
/////////////////////////////////////////////////
2010年9月16日 星期四
ubuntu 10.04 安裝HTS 3.4.1 和 HTS 2.1.1
------2011.3.7--------------
更改SPTK3.3 為 SPTK3.4
-----------------------------
所需的安裝檔案:
HTK-3.4.1.tar.gz
HDecode-3.4.1.tar.gz
HTS-2.1.1_for_HTK-3.4.1.tar.bz2.tar
SPTK-3.4.tar.gz
ActiveTcl8.4.19.4.292682-linux-ix86.tar.gz
speech_tools-2.0.95-beta.tar.gz
festival-2.0.95-beta.tar.gz
openfst-1.1.tar.gz
hts_engine_API-1.03.tar.gz
//////////////////////////////////////////////////////////
安裝順序:(不可調換順序)
1. HTK
2. HDecode
3. HTS
2. SPTK
4. ActiveTcl
5. speech_tools
6. festival
7. openfst//////////////////////////////////////////////////////////
HTK and HTS system會用到一些linux的package,可以先安裝好.
預先安裝的套件:
sudo aptitude update
sudo aptitude install build-essential
sudo apt-get install gfortran
$ sudo apt-get install build-essential
更改SPTK3.3 為 SPTK3.4
-----------------------------
所需的安裝檔案:
HTK-3.4.1.tar.gz
HDecode-3.4.1.tar.gz
HTS-2.1.1_for_HTK-3.4.1.tar.bz2.tar
SPTK-3.4.tar.gz
ActiveTcl8.4.19.4.292682-linux-ix86.tar.gz
speech_tools-2.0.95-beta.tar.gz
festival-2.0.95-beta.tar.gz
openfst-1.1.tar.gz
hts_engine_API-1.03.tar.gz
//////////////////////////////////////////////////////////
安裝順序:(不可調換順序)
1. HTK
2. HDecode
3. HTS
2. SPTK
4. ActiveTcl
5. speech_tools
6. festival
7. openfst//////////////////////////////////////////////////////////
HTK and HTS system會用到一些linux的package,可以先安裝好.
預先安裝的套件:
sudo aptitude update
sudo aptitude install build-essential
sudo apt-get install gfortran
$ sudo apt-get install build-essential
$ sudo apt-get install libx11-dev
$ sudo apt-get install libncurses5-dev
$ sudo apt-get install libncursesw5-dev
$ sudo apt-get install sox//////////////////////////////////////////////////////////
開始安裝:
將所有壓縮檔放在同一個目錄下,進到那個目錄,開始打指令安裝.
$ tar zvxf HTK-3.4.1.tar.gz
$ tar zvxf HDecode-3.4.1.tar.gz
$ tar -xf HTS-2.1.1_for_HTK-3.4.1.tar.bz2.tar -C ./htk
$ cd htk
htk$ patch –p1 –d . < HTS-2.1.1_for_HTK-3.4.1.patch
htk$ ./configure
htk$ make all
htk$ sudo make install
htk$ cd ..
$ tar zvxf SPTK-3.4.tar.gz
$ cd SPTK-3.4
SPTK-3.4$ ./configure
SPTK-3.4$ make
SPTK-3.4$ sudo make install
SPTK-3.4$ cd ..
$ tar zvxf ActiveTcl8.4.19.4.292682-linux-ix86.tar.gz
$ cd ActiveTcl8.4.19.4.292682-linux-ix86
ActiveTcl8.4.19.4.292682-linux-ix86$ sudo ./install.sh
按照跳出來的安裝精靈安裝完ActiveTcl,目錄都用預設.
ActiveTcl8.4.19.4.292682-linux-ix86$ cd ..
$ tar zvxf speech_tools-2.0.95-beta.tar.gz
$ cd speech_tools
speech_tools$ ./configure
speech_tools$ make
speech_tools$ sudo make install
speech_tools$ cd ..
$ tar zvxf festival-2.0.95-beta.tar.gz
$ cd festival
festival$ ./configure
festival$ make
festival$ sudo make install
festival$ cd ..
$ tar zvxf openfst-1.1.tar.gz
$ cd openfst-1.1
openfst-1.1$ ./configure
openfst-1.1$ make
openfst-1.1$ sudo make install
至此安裝完成.
p.s.
1.可以再安裝hts_engine
$ tar zvxf hts_engine_API-1.03.tar.gz
$ cd hts_engine_hts_engine_API-1.03
hts_engine_API-1.03$ ./configure
hts_engine_API-1.03$ make
hts_engine_API-1.03$ sudo make install
2.$sudo cp -r /usr/local/HTS-2.1.1/bin /usr/local/
可將HTS執行檔複製到主機使得直接打HCopy等指令就可執行HTS程式.
3. 有時候會發生"libfst.so.0 cannot open shared object file"
原因是libfst.so.0安裝在/usr/local/lib,用指令
$sudo cp /usr/local/lib/libfst.so.0 /usr/lib
$sudo cp /usr/local/lib/libfst.so /usr/lib
$sudo cp /usr/local/lib/libfstmain.so.0 /usr/lib
$sudo cp /usr/local/lib/libfstmain.so /usr/lib
複製過去即可.
開始安裝:
將所有壓縮檔放在同一個目錄下,進到那個目錄,開始打指令安裝.
$ tar zvxf HTK-3.4.1.tar.gz
$ tar zvxf HDecode-3.4.1.tar.gz
$ tar -xf HTS-2.1.1_for_HTK-3.4.1.tar.bz2.tar -C ./htk
$ cd htk
htk$ patch –p1 –d . < HTS-2.1.1_for_HTK-3.4.1.patch
htk$ ./configure
htk$ make all
htk$ sudo make install
htk$ cd ..
$ tar zvxf SPTK-3.4.tar.gz
$ cd SPTK-3.4
SPTK-3.4$ ./configure
SPTK-3.4$ make
SPTK-3.4$ sudo make install
SPTK-3.4$ cd ..
$ tar zvxf ActiveTcl8.4.19.4.292682-linux-ix86.tar.gz
$ cd ActiveTcl8.4.19.4.292682-linux-ix86
ActiveTcl8.4.19.4.292682-linux-ix86$ sudo ./install.sh
按照跳出來的安裝精靈安裝完ActiveTcl,目錄都用預設.
ActiveTcl8.4.19.4.292682-linux-ix86$ cd ..
$ tar zvxf speech_tools-2.0.95-beta.tar.gz
$ cd speech_tools
speech_tools$ ./configure
speech_tools$ make
speech_tools$ sudo make install
speech_tools$ cd ..
$ tar zvxf festival-2.0.95-beta.tar.gz
$ cd festival
festival$ ./configure
festival$ make
festival$ sudo make install
festival$ cd ..
$ tar zvxf openfst-1.1.tar.gz
$ cd openfst-1.1
openfst-1.1$ ./configure
openfst-1.1$ make
openfst-1.1$ sudo make install
至此安裝完成.
p.s.
1.可以再安裝hts_engine
$ tar zvxf hts_engine_API-1.03.tar.gz
$ cd hts_engine_hts_engine_API-1.03
hts_engine_API-1.03$ ./configure
hts_engine_API-1.03$ make
hts_engine_API-1.03$ sudo make install
2.$sudo cp -r /usr/local/HTS-2.1.1/bin /usr/local/
可將HTS執行檔複製到主機使得直接打HCopy等指令就可執行HTS程式.
3. 有時候會發生"libfst.so.0 cannot open shared object file"
原因是libfst.so.0安裝在/usr/local/lib,用指令
$sudo cp /usr/local/lib/libfst.so.0 /usr/lib
$sudo cp /usr/local/lib/libfst.so /usr/lib
$sudo cp /usr/local/lib/libfstmain.so.0 /usr/lib
$sudo cp /usr/local/lib/libfstmain.so /usr/lib
複製過去即可.
ubuntu 10.04 好用的blog editor/writer Blogilo
2010年9月15日 星期三
ubuntu 10.04 取代msn的即時通 Pidgin, Amsn
ubuntu軟體中心搜尋pidgin,安裝即可使用.
比ubuntu內建的即時通Empathy好用多了,Empathy用msn不可傳檔案,但用這個pidgin後可以傳檔!!
----------------------------------------------------
另外也有個軟體號稱是對msn最相容的叫做amsn,以前還有支援視訊不過因為微軟改版導致audio和video的protocol失效,所以現在不支援視訊了,介面也不錯個人感覺比pidain好!
2010年9月13日 星期一
linux find 簡易用法
$ find 要尋找的目錄 -name 要尋找的檔名
example :
$ find /home/zwe/download/ -name '*.pdf'
找尋/home/zwe/download/以下資料夾內全部的pdf檔案.
$ find / -name index.html
找尋/以下資料夾內叫做index.html的檔案.
example :
$ find /home/zwe/download/ -name '*.pdf'
找尋/home/zwe/download/以下資料夾內全部的pdf檔案.
$ find / -name index.html
找尋/以下資料夾內叫做index.html的檔案.
訂閱:
文章 (Atom)








