2008年11月20日 星期四

madplayer --文字介面的播放器

之前弄專題的時候需要使用到這套軟體
後來在網路上發現這個網頁有提供很完整的安裝資訊
http://okomez.blogspot.com/
所以就拿來用了:

==============================================================

下載 source
http://sourceforge.net/project/showfiles.php?group_id=12349

下載 libid3tag, libmad, madplay.

mkdir madplayer

把下載的 source 放進去
解壓縮
tar zxvf xxx.tar.gz

先裝相依軟體
apt-get install zlib1g-dev

要先從 libid3tag 編譯
cd /libid3tag-0.15.1b/
./configure --prefix=~/madplayer
make ; make install

cd /libmad-0.15.1b
./configure --prefix=~/madplayer
ps: 這邊可能會有一些錯誤訊息,可能前面的lib沒編好,再重編一次即可
make
make install

cd madplay-0.15.2b
./configure --prefix=~/madplayer LDFLAGS=-L~/madplayer/lib CPPFLAGS=-I~/madplayer/include/

make
make install

編譯成功後

執行播放器播MP3
madplay xxx.mp3

若要循環播放可輸入
madplay -r mp3的目錄/*.mp3

2008年11月16日 星期日

在Linux下升級firefox的方法

以下方法來自ptt linux版的版友解答

方法一


1. 下載 firefox3 的 binary 檔案
# cd /tmp
# wget "http://download.mozilla.org/?product=firefox-3.0.1&os=linux&lang=zh-TW"

2. 解壓縮並放置
# tar xvjf firefox-3.0.1.tar.bz2
# mv firefox /usr/local/

3. 拉個 link
# cd /usr/local/bin
# ln -s /usr/local/firefox/firefox firefox3

之後的使用可執行 firefox3

========================================

方法二
下載回來的tar.gz解壓縮到例如~/opt底下
作一個軟連結
ln -s ~/opt/firefox/firefox /usr/bin/firefox3

往後執行firefox3就可以了,也不用動到原本安裝的firefox
有可能出現缺少libstdc的lib,在安裝一下就可以用了!

2008年10月28日 星期二

Install SUN Java JDK

Install SUN Java JDK.
First, download and save the linux version of SUN JAVA. Select the Linux self-extracting file one
Second, the file should be stored at "/home/user/Downloads"
Third, press "alt+F2" keys and then press "terminal" to open a terminal console windows.
Then, type "sudo /home/user/Downloads/jre-6u7-linux-i586-rpm.bin"

It is installed, but the system is not aware of it yet. The following commands take care of that, just paste them into the terminal with Ctrl+Shift+V. You will have to paste a whole block at once, because the \ at the end of a line means it is continued at the next line.

sudo update-alternatives --install \
/usr/bin/java java /usr/java/latest/bin/java 20000

sudo update-alternatives --install \
/usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so \
/usr/java/latest/plugin/i386/ns7/libjavaplugin_oji.so 20000

sudo update-alternatives --auto java
sudo update-alternatives --auto libjavaplugin.so

Sun Java is now the default Java. You can also switch between all installed Java versions at any time using the commands below.

sudo update-alternatives --config java
sudo update-alternatives --config libjavaplugin.so

linux 的藍牙週邊

Linux Bluetooth 檔案傳輸
http://cha.homeip.net/blog/archives/2005/08/gnome_bluetooth.html
Linux Bluetooth
http://www.wretch.cc/blog/cjsrex/11250871

qm轉ts的指令

linux下的翻譯檔通常位於/usr/share/locale/zh_TW/LC_MESSAGES/*.mo
但是某些軟體有自己一套的翻譯原則,例如smplayer
其檔名為.qm
因此想要看自己製作翻譯檔
必須將qm檔轉為ts,才可進行編輯。

Here's the command can translate the .qm file to .ts file

#qm2ts

and if you want to translate the .ts file to .qm file,
you can use this command

#lrelease

安裝Virtual Box

安裝Virtual Box
系統必須有以下套件:
automake, autoconf, kernel-devel, qt4, qt4-x11, gcc, gcc-c++
才可安裝

以上的套件我本身使用的系統本身就有
所以只下載了三個套件:
1.先下載qt4 fc7 updates的版本
2.下載qt4-x11 fc7的版本 qt4跟qt4-x11兩個版號要一致
3. 到virtualbox 網站下載 virtual box 2.0.2 fc7的版本

基本上這三個rpm 可以直接安裝
但是安裝完後還不能啟動
必須要更改權限才有辦法執行

sudo usermod -G vboxusers -a USERNAME

fedora下安裝無蝦米的方法

步驟如下:
1.請先google關鍵字
gcin-1.4.2-1.fc8.i386.rpm
第一個網站就有下載gcin-1.4.2-1.fc8.i386.rpm的載點
請先下載下來
並開且終端機切換到該目錄

輸入以下指令
rpm -ivh gcin-1.4.2-1.fc8.i386.rpm
即可安裝gcin輸入法
接著輸入以下指令
/usr/share/gcin/script/noseeing-inst

cp /root/tmp/noseeing.gtab /usr/share/gcin/table
按Y確定
接著在輸入im-chooser
使用自訂的輸入法 gcin
關閉後請登出

下次登入系統
按ctrl+space鍵
可以切成中文輸入
再按三次ctrl+shift即可將輸入法轉換成無蝦米輸入法