2008年11月28日星期五

Archlinux:Phone 用wammu通过蓝牙保存通信录及短信

Archlinux:Phone 用wammu通过蓝牙保存通信录及短信


1.安装wammu
sudo pacman -S wammu pybluez
2.安装蓝牙管理工具
sudo pacman -S bluez-utils
启动蓝牙服务
sudo /etc/rc.d/bluetooth restart

3.扫描蓝牙设备
hcitool scan

4.配置PIN码
cd /etc/bluetooth/
sudo vi hcid.conf

security auto;
passkey "0000";

sudo vi pin
录入 0000

5.重启生效
sudo /etc/rc.d/bluetooth restart

6.启动wammu

7.开启手机蓝牙,搜索PC蓝牙,连接,PIN码输入 0000 [这步很重要],连接成功

8.wammu->搜索手机->next->在程序指导下配置->蓝牙->我不知道->居于AT命令集
的-> 蓝牙上的AT命令集->选择蓝牙地址->连接测试->命名
蓝牙地址可以用 hcitool scan 查找

2008年11月26日星期三

VirtualBox 如何添加共享文件夹

共享文件夹: 允许主机和虚拟机共同访问同一个文件夹.

1.关闭虚拟机,开启要共享虚拟机的属性页,选数据空间
选[添加],在路径输入主机上德文件夹,如 /tmp .共享名填写 SharedFolder

留意添加后显示的帮助,写了如何在虚拟机里挂共享文件夹

2.开启虚拟机[以winxp为里]
运行-输入 cmd
输入 net use x: \\vboxsvr\SharedFolder

3.打开我的电脑,发现多了个 X 盘符,访问即可.

2008年11月23日星期日

Linux:Archlinux Howto Install RSIBreak (防沉迷工作软件)

I wanna use Workrave to help RSI,But I am using KDE4 ,It need download many lib files to install workrave . So I choose RSIbreak ,a tools fo KDE .

Below is information for installing RSIBreak in Archlinux .

1. download files
http://www.rsibreak.org
download latest
http://www.rsibreak.org/files/rsibreak-0.9.0.tar.bz2

2.install compile tools
sudo pacman -S cmake
sudo pacman -S automoc4

3.make

mkdir build && cd build && cmake ..
make
sudo make install
sudo ln -s /usr/local/bin/rsibreak /usr/bin

4.auto load
vi ~/.bash_profile

#add
rsibreak &

2008年11月21日星期五

Linux:Archlinux Howto install NetworkManager in KDE4.1

1.install NetworkManager

sudo pacman -S networkmanager

2.install KNetworkManager

goto http://aur.archlinux.org/packages.php?ID=19622

download TarBall file
http://aur.archlinux.org/packages/knetworkmanager3/knetworkmanager3.tar.gz

tar -xvzf knetworkmanager3.tar.gz

cd knetworkmanager3

makepkg

sudo pacman -U knetworkmanager3-0.2.2-1-i686.pkg.tar.gz


3. run

knetworkmanager

2008年10月9日星期四

Archlinux 上安装 Oracle 10g

Archlinux 上安装 Oracle 10g

环境:
Archlinux 2.6.26-ARCH
Oracle Database 10.2.01

Section I 准备工作

##### 创建oracle用户和组
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -m -g oinstall -G dba oracle

id oracle
uid=1004(oracle) gid=1004(oinstall) groups=1004(oinstall),1005(dba)

#host_id
确认你的 /etc/hosts 里面有 hostname 的解析。

# 设置 oracle 帐户的口令:
passwd oracle

##### 创建目录
sudo mkdir /u01/oracle/base
sudo mkdir /u01/oracle/home
sudo chown oracle:dba /u01/oracle -fR
sudo chmod 775 /u01/oracle -fR

##### 配置环境变量

# /home/oracle/.bash_profile
export ORACLE_BASE=/u01/oracle/base
export ORACLE_HOME=/u01/oracle/home
export ORACLE_SID=TEST
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:/usr/sbin:$ORACLE_HOME/bin

export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native


##### 准备所需的库

到一下地址下载libaio-0.3.106.tar.gz
#http://packages.gentoo.org/packages/?category=dev-libs;name=libaio
#http://download.chinaunix.net/download/0006000/5732.shtml

tar -xvzf libaio-0.3.106.tar.gz
cd libaio-0.3.106
make prefix=`pwd`/usr install

sudo ln -s /usr/lib/libstdc++.so.6.0.3 /usr/lib/libstdc++.so.5
sudo ln -s /usr/lib/libgcc_s.so.1 /lib/libgcc_s.so.1
cd /usr/bin
sudo ln -s ../../bin/awk awk
sudo ln -s ../../bin/tr tr


##### 配置 Linux 内核参数

# /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
## execute /sbin/sysctl -p

#/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

#/etc/pam.d/login
session required /lib/security/pam_limits.so




##### 修改 Archlinux 的版本以“ 欺骗” Oracle安装程序,使之能正常安装。
sudo echo Red Hat Enterprise Linux AS rlease 3 (Taroon) > /etc/redhat-release




Section II 安装

###### 下载Oracle Database 10g
http://www.oracle.com/technology/software/products/database/index.html

Oracle Database 10g Release 2
Standard Edition, Standard Edition One, and Enterprise Edition
Oracle Database 10g Release 2 (10.2.0.1.0) for Linux x86

http://download.oracle.com/otn/linux/oracle10g/10201/10201_database_linux32.zip

10201_database_linux32.zip

很奇怪这是个zip文件,不过可以把ark把它打开,解压到/tmp下, 注意,/tmp 重启后会被清理,安装过程中不要重启计算机。

##### 切换到oracle用户
su - oracle

#####
export LANG=C
/tmp/database/runInstaller

用英文界面安装,如果想要配置中文,请google 一下java 1.4的中文问题.


##### oracle 安装到29%时,
vi $ORACLE_HOME/bin/gennttab


# Change this...
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
INI=`$ECHO ${TtoINI} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
BAS=`$ECHO ${TtoBAS} | $SED 's/ /\\
/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`


# To this...
LIB=`$ECHO ${TtoLIB} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
INI=`$ECHO ${TtoINI} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`
BAS=`$ECHO ${TtoBAS} | $SED 's/ /\n/g' | $GREP "^${T}:" | $AWK -F: '{print $2}'`

主要把回车删除,把一个/换成n

###### 安装选项
按照自己的需求吧,可以参考这篇文章
http://www.souzz.net/html/database/ORACLE/12246.html


###### 错误处理
http://hi.baidu.com/edeed/blog/item/18cf87d6294cc72c07088b1f.html


Section III 调试

##### 配置文件
sudo vi /etc/hosts
xxx.xxx.xxx.xxx(本机IP) oracle-server

#listener.ora @ $ORACLE_HOME/network/admin

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/oracle/home)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE-SERVER)(PORT = 1521))
)
)

#tnsnames.ora @ $ORACLE_HOME/network/admin

LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE-SERVER)(PORT = 1521))


TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLE-SERVER)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TEST)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)


#


##### startup
$ sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 10 11:08:33 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter user-name: / as sysdba
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 83887720 bytes
Database Buffers 192937984 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.

SQL>shutdown
Database closed.
Database dismounted.


ORACLE instance shut down.
SQL>


##### 用脚本启动

#dbstart @ $ORACLE_HOME/bin
#change
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
#to
ORACLE_HOME_LISTNER=$ORACLE_HOME

#允许用dbstart 启动
#oratab @ /etc
#change
TEST:/media/udata/oracle/home:N
#to
TEST:/media/udata/oracle/home:Y

#启动
$ORACLE_HOME/bin/dbstart
Processing Database instance "TEST": log file /media/udata/oracle/home/startup.log

#检验
sudo netstat -a |grep 1521
密码:
tcp 0 0 ORACLE-SERVER:1521 *:* LISTEN
tcp 104 0 ORACLE-SERVER:1521 ORACLE-SERVER:20328 ESTABLISHED
tcp 0 0 ORACLE-SERVER:20328 ORACLE-SERVER:1521 ESTABLISHED


#关闭
$ORACLE_HOME/bin/dbshut
lsnrctl stop #关闭侦听器


参考文档:
http://hi.baidu.com/sneeze/blog/item/4e0db0777f29c51bb051b9d8.html
http://www.blogger.com/post-create.g?blogID=3560048731273076746

2008年10月6日星期一

Archlinux : xorg.conf for HP Compaq nx7400

# /.../
# SaX generated X11 config file
# Created on: 2008-08-19T16:21:40+0800.
#
# Version: 8.1
# Contact: Marcus Schaefer , 2005
# Contact: SaX-User list
#
# Automatically generated by [ISaX] (8.1)
# PLEASE DO NOT EDIT THIS FILE!
#

Section "Files"
FontPath "/usr/share/fonts/misc:unscaled"
FontPath "/usr/share/fonts/local"
FontPath "/usr/share/fonts/75dpi:unscaled"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/URW"
FontPath "/usr/share/fonts/Speedo"
FontPath "/usr/share/fonts/PEX"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/latin2/misc:unscaled"
FontPath "/usr/share/fonts/latin2/75dpi:unscaled"
FontPath "/usr/share/fonts/latin2/100dpi:unscaled"
FontPath "/usr/share/fonts/latin2/Type1"
FontPath "/usr/share/fonts/latin7/75dpi:unscaled"
FontPath "/usr/share/fonts/baekmuk:unscaled"
FontPath "/usr/share/fonts/japanese:unscaled"
FontPath "/usr/share/fonts/kwintv"
FontPath "/usr/share/fonts/truetype"
FontPath "/usr/share/fonts/uni:unscaled"
FontPath "/usr/share/fonts/CID"
FontPath "/usr/share/fonts/ucs/misc:unscaled"
FontPath "/usr/share/fonts/ucs/75dpi:unscaled"
FontPath "/usr/share/fonts/ucs/100dpi:unscaled"
FontPath "/usr/share/fonts/hellas/misc:unscaled"
FontPath "/usr/share/fonts/hellas/75dpi:unscaled"
FontPath "/usr/share/fonts/hellas/100dpi:unscaled"
FontPath "/usr/share/fonts/hellas/Type1"
FontPath "/usr/share/fonts/misc/sgi:unscaled"
FontPath "/usr/share/fonts/xtest"
FontPath "/opt/kde3/share/fonts"
InputDevices "/dev/gpmdata"
InputDevices "/dev/input/mice"
EndSection

Section "ServerFlags"
Option "AIGLX" "on"
Option "AllowMouseOpenFail" "on"
Option "ZapWarning" "on"
EndSection

Section "Module"
Load "glx"
Load "type1"
Load "extmod"
Load "dbe"
Load "freetype"
Load "dri"
EndSection

Section "InputDevice"
Driver "kbd"
Identifier "Keyboard[0]"
Option "Protocol" "Standard"
Option "XkbLayout" "us"
Option "XkbModel" "microsoftpro"
Option "XkbRules" "xfree86"
EndSection


Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Buttons" "5"
Option "Device" "/dev/input/mice"
Option "Name" "Pixart Imaging USB OPTICAL MOUSE"
Option "Protocol" "explorerps/2"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
Driver "synaptics"
Identifier "Mouse[3]"
Option "Buttons" "5"
Option "Device" "/dev/input/mice"
Option "Emulate3Buttons" "on"
Option "HorizScrollDelta" "0"
Option "InputFashion" "Mouse"
Option "Name" "Synaptics;Touchpad"
Option "Protocol" "explorerps/2"
Option "SHMConfig" "on"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5"
EndSection


Section "Monitor"
DisplaySize 305 230
HorizSync 30-82
Identifier "Monitor[0]"
ModelName "1280X1024@60HZ"
Option "DPMS"
Option "PreferredMode" "1280x1024"
VendorName "--> LCD"
VertRefresh 50-60
UseModes "Modes[0]"
EndSection


Section "Modes"
Identifier "Modes[0]"
EndSection


Section "Screen"
DefaultDepth 24
SubSection "Display"
Depth 15
Modes "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1280x960" "1280x800" "1152x864" "1280x768" "1280x720" "1024x768" "1280x600" "1024x600" "800x600" "768x576" "640x480"
EndSubSection
Device "Device[0]"
Identifier "Screen[0]"
Monitor "Monitor[0]"
EndSection


Section "Device"
BoardName "945 GM"
BusID "0:2:0"
Driver "intel"
Identifier "Device[0]"
Option "monitor-LVDS" "Monitor[0]"
Screen 0
VendorName "Intel"
Option "AddARGBGLXVisuals" "True"
EndSection



Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
InputDevice "Mouse[3]" "SendCoreEvents"
Option "Clone" "off"
Option "Xinerama" "off"
Screen "Screen[0]"
EndSection


Section "DRI"
Group "video"
Mode 0660
EndSection

Section "Extensions"
Option "Composite" "Enable"
EndSection

2008年5月27日星期二

沙朗斯通:史上最愚蠢的女人

    之所以说沙朗斯通没有脑子,是因为再愚蠢的女人,也不会对灾民幸灾乐祸,而且是如此的公然!

    如果天灾是报应(或因果循环),那么美国的飓风,或者新奥尔良水灾。。。。美国政府该找块豆腐撞死N遍了。

    而再想到911的人祸,沙朗斯通有没有“受到很大的教训”呢?

    请留意,一些媒体说沙朗斯通最后用会帮助灾区人民来打圆场,其实,自始至终她都没这个意识,她只是觉得西藏组织受了这么大的“压迫”,现在中国受到报应了,西藏组织还主动去援助“敌人”,这种胸怀,她很受教育!

    数万条鲜活的生命一瞬间夭折,数万个笑魇从此消失,在她的眼里,他们是罪有应得!

    能坦然说出这些话的人,要么就是没脑子,要么就是极度憎恨中国。

    而我以为,比起达赖,对于中国,她充其量只是讨厌,而不是憎恨。

Blogged with the Flock Browser