Wednesday, April 29, 2009

install make libfetion

install make libfetion

源码下载: http://www.libfetion.cn/Linux_demoapp_download.html
解压命令:tar -zxvf linux_fetion-0.*.*.tar.gz
进入源代码目录: cd linux_fetion-0.*.*
(64位用户需执行: ./64_libfetion.sh 脚本)
运行编译命令: qmake-qt4;make
安装程序:./install.sh



Wednesday, April 22, 2009

Enabling a cgi directory for each user

因為要寫perl cgi程式
Enabling a cgi directory for each user
要讓普通使用者的public/cgi-bin/可以執行pl cgi 除了chmod 成 755


只要在apache2.conf or /etc/apache2/httpd.conf中加入一段:
代碼:


Options ExecCGI
SetHandler cgi-script

這樣就可以執行了!!

Thursday, April 16, 2009

xprofile


export LANG="zh_TW.UTF-8"
export LC_ALL="zh_TW.UTF-8"
export LC_CTYPE="zh_TW.UTF-8"
export LC_ALL="zh_TW.UTF-8"
exec /usr/libexec/gnome-settings-daemon &
export GCIN_DUAL_XIM_OFF=
export GCIN_XIM=gcin.UTF-8
export XMODIFIERS=@im=${GCIN_XIM}
exec gcin &

swiftweasel 軟體安裝加入列表的shell

#!/bin/sh
#
# This script installs Swiftfox

# Download Swiftfox
echo " "
echo "Password required to install to /opt directory..."
echo " "
cd /opt
#sudo wget http://getswiftweasel.com/builds/releases/3.0.4pre-1/swiftweasel-3.0.4pre-1-prescott.tar.bz2

# Install Swiftfox
echo " "
echo "Installing HAHA..."

# If there is an existing swiftweasel install here let's move it out of the way
#sudo mv swiftweasel swiftweasel.old

# Extract the build
#sudo tar -jxf swiftweasel-3.0.4pre-1-prescott.tar.bz2

# Search for plugins
echo " "
echo "Searching for existing plugins, errors can be safely ignored..."
sudo cp swiftweasel.old/plugins/* swiftweasel/plugins
sudo cp /usr/lib/firefox/plugins/* swiftweasel/plugins
sudo cp /usr/lib/mozilla/plugins/* swiftweasel/plugins
sudo cp /usr/lib/mozilla-firefox/plugins/* swiftweasel/plugins
sudo cp /usr/lib/browser-plugins/* swiftweasel/plugins
sudo cp /usr/lib/xulrunner-addons/plugins/* swiftweasel/plugins

# Make sure root owns the Swiftfox directory
sudo chown -hR root:root swiftweasel

# Add link in /usr/bin
sudo ln -s /opt/swiftweasel/swiftweasel /usr/bin/swiftweasel

# Add Swiftfox to menu
#cd /usr/share/applications
#sudo wget http://getswiftweasel.com/builds/installer/Swiftfox.desktop

# Remove the downloaded tarball
#sudo rm /opt/swiftweasel-3.0.4pre-1-prescott.tar.bz2

echo " "
echo "Swiftfox has been installed. Happy Surfing!"
echo " "
exit

要加入程式啟動表內
#cd /usr/share/applications
vi swiftweasel.desktop

[Desktop Entry]
Comment=Web Browser
Comment[en_US]=Web Browser
Encoding=UTF-8
Exec=/opt/swiftweasel/swiftweasel
GenericName=Web Browser
GenericName[en_US]=Web Browser
Icon=/opt/swiftweasel/icons/mozicon128.png
Name=Swiftweasel
Name[en_US]=Swiftweasel
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Categories=Application;Network;

Wednesday, April 15, 2009

更改swiftweasel個人化名稱與中文化

swiftweasel一樣可以使用firefox 的插件

在使用zh-TW.xpi包中文化後
名字會自己變成Mozilla Firefox

我想把它改回去

vi

~/.sw3/swiftweasel/vzjhjvvg.default/extensions/langpack-zh-TW@f
irefox.mozilla.org/chrome/zh-TW.jar

然後更改
locale/branding/brand.dtd 內的
1 brandShortName "Swiftweasel">
2 brandFullName "Swiftweasel">
3 vendorShortName "Swiftweasel">

Tuesday, April 14, 2009

解決gsynaptics觸控版不能連點

vi /etc/X11/xorg.conf

在xorg.conf加入Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
InputDevice "Synaptics"
EndSection

Section "InputDevice"
Identifier "Synaptics"
Driver "synaptics"
Option "Device" "/dev/input/event5"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
Option "SendCoreEvents" "true"
Option "SHMConfig" "true"
Option "SHMConfig" "on"
Option "TapButton1" "1"
Option "TapButton2" "2"
EndSection

那個event5是
cat /proc/bus/input/device

I: Bus=0011 Vendor=0002 Product=0007 Version=25b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=mouse0 event5
B: EV=b
B: KEY=6420 0 70000 0 0 0 0 0 0 0 0
B: ABS=11000003

根據實際狀況設定
xorg.conf 是使用
nvidia-xconfig
自動產生的

Monday, April 13, 2009

xorg-server-1.5-upgrade-guide要仔細看

昨天看到新消息,
所以今天有空就更新
xorg-server-1.5

要注意
make.conf
的input _devices加入evdev

不然又會發生鍵盤或者滑鼠不能用的窘境。

感覺比之前的load低多了

swiftfox 換成中文


about:config

general.useragent.locale

改成
zh-TW




http://releases.mozilla.org/pub/mozilla.org/firefox/releases/版本編號/作業系統/xpi/

下載 zh_TW.xpi

重開即可

Sunday, April 12, 2009

gentoo portage news

之前跟新完portage
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.
輸入
eselect news read new


2009-04-06-x_server-1_5
Title Migration to X.org Server 1.5
Author Remi Cardona
Author Christian Faulhammer
Posted 2009-04-06
Revision 1

A lot of changes regarding device recognition and use by the X server
have been introduced in the 1.5 update. As that version is going
stable on all architectures, users should read the upgrade guide [0]
before actually updating the package.

[0] http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml


Friday, April 10, 2009

foxyproxy北京教育網使用

因為在使用ipcn要兩個小時輸入一次密碼,
而且有些網站也是不能連,
又有在使用gappproxy(Google app engine 寫的proxy)。
但是他受限於 Google app engine本身的限制。
下載1MB檔案,
所以在自動組態令碼,
使用ipcn.org站長提供的有教育網列表類的ip位置跟一些網址,
如果不再列表內的就改成使用gappproxy。

改最後一行
else return "PROXY localhost:8000; DIRECT";

即可。

Thursday, April 09, 2009

bc 除出小數點位數

輸入
scale=數字

數字是要顯示到小數點幾位

Saturday, April 04, 2009

移除wine軟體選單

在 ~/.local/share/applications/ 底下
可以刪除icon

終端機下
uninstaller
可以移除軟體

ie4linux離線安裝

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

DCOM98.EXE
http://download.microsoft.com/download/d/1/3/d13cd456-f0cf-4fb2-a17f-20afc79f8a51/DCOM98.EXE

mfc40.cab
http://activex.microsoft.com/controls/vc/mfc40.cab

249973USA8.exe
http://download.microsoft.com/download/win98SE/Update/5072/W98/EN-US/249973USA8.exe

ADVAUTH.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/ADVAUTH.CAB

CRLUPD.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/CRLUPD.CAB

HHUPD.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/HHUPD.CAB

IEDOM.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IEDOM.CAB

IE_EXTRA.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_EXTRA.CAB

IE_S1.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_S1.CAB

IE_S2.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_S2.CAB

IE_S5.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_S5.CAB

IE_S4.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_S4.CAB

IE_S3.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_S3.CAB

IE_S6.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/IE_S6.CAB

SCR56EN.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/SCR56EN.CAB

SETUPW95.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/SETUPW95.CAB

FONTCORE.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/FONTCORE.CAB

FONTSUP.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/FONTSUP.CAB

VGX.CAB
http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/CN/VGX.CAB
swflash.cab
http://download.macromedia.com/get/shockwave/cabs/flash/swflash.cab
在你的主文件夹中会有个".ies4linux"的隐藏文件夹,打开进入"downloads"目录,新建一个"files"文本文件,如果已经有了就打开它,粘贴进如下内容:
DCOM98.EXE
mfc40.cab
249973USA8.exe
ie6/CN/ADVAUTH.CAB
ie6/CN/CRLUPD.CAB
ie6/CN/HHUPD.CAB
ie6/CN/IEDOM.CAB
ie6/CN/IE_EXTRA.CAB
ie6/CN/IE_S1.CAB
ie6/CN/IE_S2.CAB
ie6/CN/IE_S5.CAB
ie6/CN/IE_S4.CAB
ie6/CN/IE_S3.CAB
ie6/CN/IE_S6.CAB
ie6/CN/SCR56EN.CAB
ie6/CN/SETUPW95.CAB
ie6/CN/FONTCORE.CAB
ie6/CN/FONTSUP.CAB
ie6/CN/VGX.CAB
swflash.cab
按照列表中的位置把上面提到的共20个下载文件部署正确,根目录就是当前的"downloads"目录!

./ies4linux --locale CN --no-gui