- import xxx.jpg
- ksnapshot
Taiwan is a independent country. Chinese are forbidden into,台灣是我的國家,不是他媽中國的一部分,去你媽的中國人
2008/6/24
2008/6/20
ssh login no password
- modify the /etc/ssh/sshd_conf
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
ssh-keygen -t rsa
- cd $home/.ssh
cp /.ssh/identity.pub /.ssh/authorized_keys
- restart sshd
ssh-agent $SHELL
ssh-add
2008/6/19
2008/6/11
2008/6/10
在linux上用msn
目前小弟我是用KMess(KDE)
之前,也有用過amsn但是推薦在Fedora上或Gnome桌面使用
或是pidgin (gaim的後來計劃)都還不錯
Mandriva 2007 英文作業系統上audacious要顯示中文歌曲
終於,首先KDE的相關套件全裝,然後開啟audacious的preference->playlist->character encoding
填入 big5就可以
網路上說法Auto character encoding 選chinese可惜英文版不能選, 只好在他下方的地方填入big5就可以了
2008/6/8
How to install or setup PETSc
Intel MKL on Windows or Linux (/usr/opt/int/mkl)
Assume I had install MPICH and BLAS & LAPACK.
Therefore, if you want to install single computer PETSc without MPICH
- PETSC_DIR=$PWD; export PETSC_DIR
- ./config/configure.py --with-cc=/opt/intel/cc/10.0.14/bin/icc --with-cxx=/opt/intel/cc/10.0.14/bin/icpc --with-fc=/opt/intel/fc/10.0.14/bin/ifort --with-blas-lapack-dir=/usr/opt/intel/mkl/10.0.1.014 --with-mpi=0
- make all
- make test
- Install PETSc with MPICH
- PETSC_DIR=$PWD; export PETSC_DIR
- ./config/configure.py --with-blas-lapack-dir=/usr/opt/intel/mkl/10.0.1.014 --with-mpi-dir=/usr/opt/mpich --with-clanguage=cxx --with-cxx=/usr/opt/mpich/bin/mpicxx
- make
- make test
BLAS/LAPACK: these packages provide some basic numeric kernels used by PETSc.
- /usr/lib/libblas.a,liblapack.a
- Intel MKL on Windows or Linux
- sunperf on solaris
- VecLib on Macs
- IBM ESSL
- --with-blas-lapack-lib=libsunperf.a
- --with-blas-lib=libblas.a --with-lapack-lib=liblapack.a
- --with-blas-lapack-dir=opt/intel/mkl72
. /config/configure.py --with-mpi-dir=/path-to-mpich-install
MPICH configure
2008/6/7
快被氣死的Mandriva 2007 & 2008 security
normal user 不能 reboot,poweroff 和使用 /usr/bin
搞了半天原來是 "安全性" 調成了 High 或 Higher
urpmi Usage
list my configured media sources :
urpmq --list-media
add any local directory I like as a package source:
urpmi.addmedia --update "some_name" file:///some/directory/path
automatically update everything that needs updating:
urpmi --auto-select (note: this will NOT update your kernel!)
detail website: http://speculation.org/garrick/urpmifaq.txt
2008/6/6
nvidia driver install on Mandriva 2007
easy urpmi website: http://easyurpmi.zarb.org/
video card : Geforce4 Magic
***************************************
* Note: Do not forget installing kernel source *
***************************************
1. Add urpmi media using easy urpmi
urpmi.addmedia main http://ftp.twaren.net/Linux/Mandrake/official/2007.1/i586/media/main/release with media_info/hdlist.cz
urpmi.addmedia --update main_updates http://ftp.twaren.net/Linux/Mandrake/official/2007.1/i586/media/main/updates with media_info/hdlist.cz
urpmi.addmedia contrib http://ftp.twaren.net/Linux/Mandrake/official/2007.1/i586/media/contrib/release with media_info/hdlist.cz
urpmi.addmedia --update contrib_updates http://ftp.twaren.net/Linux/Mandrake/official/2007.1/i586/media/contrib/updates with media_info/hdlist.cz
urpmi.addmedia --update plf-free http://mdk.linux.org.tw/ftp/pub/plf/mandriva/2007.1/free/release/binary/i586/ with media_info/hdlist.cz
urpmi.addmedia --update plf-nonfree http://mdk.linux.org.tw/ftp/pub/plf/mandriva/2007.1/non-free/release/binary/i586/ with media_info/hdlist.cz
2. Install nvidia driver
you can use the mandriva control centre to choose the packages
urpmi nvidia
Then it automatically choose
dkms-2.0.16-1.1mdv2007.1.noarch
dkms-minimal-2.0.16-1.1mdv2007.1.noarch
dkms-nvidia97xx-1.0-9755.2plf2007.1.i586
nvidia97xx-1.0-9755.2plf2007.1.i586
3. setup nvidia driver
After drivers are installed you can install them by typing (as root)
XFdrake
- now select your card - this should be done automatically but please check.
- save settings and reboot - you may not need to but sometimes the nvidia module doesn't load until a reboot.
4. Check nvidia 3d is working
Test the 3D by trying to run a game/screensaver
5. Enable XGL
- login to MCC
- choose hardware - configure 3D desktop effects
you should be able to choose XGL
- reboot and you should have a shiny 3D desktop
NVidia drivers installation
The thing that’s probably missing is a NVidia proprietary driver that supports the composite extension needed by Xgl (the default free driver nv
unfortunately does not support it). Installing the driver in Mandriva is as easy as typing as root urpmi nvidia
in the system console. If everything goes properly a table like this should appear:
More information about nvidia-8774-4plf2007.0.x86_64 IMPORTANT NOTE: This PLF provided NVIDIA driver must be configured differently than the one available from NVIDIA, so please follow the instructions below: If you are upgrading from a Mandriva Club or PLF provided NVIDIA driver, reconfiguring is usually unnecessary.
You can reconfigure X to use the new NVIDIA driver either automatically:
Run XFdrake as root.
Go to the Graphics Card list
Select your card (it is usually already autoselected).
Answer any questions asked and then quit.
OR you can do it manually by editing /etc/X11/xorg.conf:
Change the Driver to "nvidia" in the Device section.
Remove any Load "glx" lines from the Module section.
Add the following line to the Module section: Load "/usr/lib64/xorg/modules/extensions/nvidia/libglx.so"
Run "update-alternatives --config gl_conf" and select nvidia.conf.
So, now all we need to do is to follow the instructions provided by the manufacturer. I used a text editor called VIM, so I typed vim /etc/X11/xorg.conf
and applied the suggestions above.
2008/6/5
ATi and nvidia dirver 在mandriva的安裝
先用easy urpmi加入plf站台
再登入root,使用urpmi
nvidia 或 urpmi ati
Easy urpmi: 加入更多套件來源
要指定加入套件來源的地址,用指令會比用進入MCC圖形介面更加容易。PLF的網站有一個介面叫 Easy urpmi,可以把你準備加入的站台的程序指令以文字形式顯示出來,只要以 root 身份把它給你的一行行指令用老鼠剪貼到到終端機去執行就可以了。
以 MDV2008 比方來說,通常先把 DVD 或 CD 媒體 的"啟用"取消(MCC 下執行,或終端機下執行urpmi.removemedia -a) 後,用喜歡的瀏覽器 (如mozilla-firefox)開啟 easyurpmi.zarb.org 網址 ,它會問你一些問題,然後會給你要用到的指令
1.在網頁第一個步驟 (Select your system) 中指定使用版本,機種,跟管理機制,比如Mandriva 2008.0 ,x86_64 (表示AMD 的 64 bit,跟Intel 的 64bit, i586 都不一樣),跟 urpmi,及要不要 Select the mirror separately for every source 。然後按 "proceed to step 2"。
2. 指定站台地址: main、contrib 和 update 的 mirror 站台地址。Main 是正式支援的自由軟體套件,有些非自由軟體會放到 non-free下,contrib 是其它人協助包裝但沒有正式支援的,對這三者而言: XXX_update 是發行後更新套件,XXX_backport 是半官方版本更新套件(有相容風險)。有裝 YYY 來源的話,YYY_update 最好也加入。以新增Main媒體為例,就把mirror 站下拉選成喜歡的(如twaren.net ),然後打勾。PLF 這是 PLF 自己的套件的 mirror 站台地址。
最後按 proceed to step 3。
3.以 root 用老鼠剪貼它顯示的指令到到終端機去執行,以新增Main媒體為例,如下:
urpmi.addmedia --update main_updates http://ftp.twaren.net/Linux/Mandrake/official/2008.0/x86_64/media/main/updates with media_info/hdlist.cz
要是 64 bit 環境要混用 i586套件,只要回到步驟一把架構換成 i586,重複加入更多的套件來源即可。這樣就可以在圖形介面 (rpmdrake) 或文字模式介面 (urpmi) 中選取安裝喜歡的軟件了。
使用管理
裝好後後可以用
- urpmq 套件名稱
查詢是否已安裝某個套件。
-p 查詢還沒安裝套件檔案的資訊
-i 顯示套件的功用資訊
-l 列出包含了那些檔案
-a 列出系統內所有的套件
分頁輸出用rpm -qa | less - urpmi 套件名稱
來安裝你想要的套件, - urpmf 檔案名稱
可以查詢某個檔案是在那個套件裡面。 - urpme 檔案名稱
移除某個套件
即使在文字模式介面下,只要套件來源設好,要是需要安裝相依套件,urpmi也 會警告套件相依,在使用者同意後自行滿足安裝相依,十分方便。
安裝更新管理
新版在軟體有更新時,在gnome 工具列上也會提醒安裝更新。可以自行參考 /etc/urpmi/urpmi.cfg 的格式修改設定自動更新安裝。往後定期跑 urpmi.update -a 更新所有媒體資訊,文字模式介面下,每天也只要執行
urpmi --auto-select --media updates
就可以很簡單完成重大更新安裝。
不過有時候mirror 站會出問題卡住(其他如Ubuntu 也會),還是不建議完全倚賴用自動更新。
相依(dependency)問題
想把其他家的 RPM 套件裝到 Mandriva 上經常可能會遇到相依問題, 特別是出現 "找不到某某 .so 檔" ( shared objects: 動態聯結程式庫,) 之類的錯誤訊息。可能要到sophie/rpmfind 網上搜尋那個套件裡面提供欠缺的 .so程式庫,。 找不到同樣版本的話,有時到 /lib 或 /lib64 下建立 symbolic link 欺騙系統也許能成功。如
ln -s 某某.so.現有版 某某.so.需要版
不過32 位元 跟 64 位元程式庫通常是無法互用的。
Reference: Shelandy