Archive for 09月, 2006

备份 星期五, 09月 29th, 2006

$ svnadmin dump /home/svn/lj12-source/>/media/mmcdisk/lj12-source-repository
* Dumped revision 0.
* Dumped revision 1.
* Dumped revision 2.
* Dumped revision 3.
* Dumped revision 4.
* Dumped revision 5.
* Dumped revision 6.

svnserve实例 星期五, 09月 29th, 2006

千辛万苦测试出来的,就没找到一个详细说明anthz文件写法的。开了一台哑巴机器,在自己机器上面ssh过去,再svn回来。 Laughing 似乎是没事折腾。呵呵。

使用svnserve -d时候的各种认证文件写法。基本是常规写法,特殊的是红色部分。

A机器:
$ cat /home/svn/tmp/conf/svnserve.conf |grep -v ^#
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = Eexp’ Repository

$ cat /home/svn/tmp/conf/passwd |grep -v ^#
[users]
eexp = eexp
test = test

$ cat /home/svn/tmp/conf/authz |grep -v ^#
[groups]
entontech = eexp,test
[tmp:/]
eexp = rw
test = r
* =

其中,[tmp:/]的写法,必须是这样。不能使用全路径,而且手册里面也没有详细说明。当然可能有其他办法可以使用。只是我只有这样才测试成功。

$ svnserve -d -r /home/svn/
只能限制输出路径到根一级的版本库。这里是tmp的上级目录/home/svn。

B机器:
$ svn co svn://10.23.1.18/tmp –username test
认证领域:<svn://10.23.1.18:3690> Eexp’ Repository
“test”的密码:
取出修订版 2。

检查端口监听。突然发现没运行的时候,不断有包收发。 星期五, 09月 29th, 2006

$ sudo nmap -sT -O localhost

Starting Nmap 4.10 ( http://www.insecure.org/nmap/ ) at 2006-09-29 21:43 CST
Interesting ports on localhost (127.0.0.1):
Not shown: 1678 closed ports
PORT STATE SERVICE
631/tcp open ipp
Device type: general purpose
Running: Linux 2.4.X|2.5.X|2.6.X
OS details: Linux 2.4.0 – 2.5.20, Linux 2.5.25 – 2.6.8 or Gentoo 1.2 Linux 2.4.19 rc1-rc7, Linux 2.6.3 – 2.6.10

Nmap finished: 1 IP address (1 host up) scanned in 2.314 seconds

$ cat /etc/services |grep 631
ipp 631/tcp # Internet Printing Protocol
ipp 631/udp

$ sudo netstat -anp|grep 631
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4652/cupsd

$ lsof -i|grep 631

$ lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
gaim 5898 exp 16u IPv4 35714 TCP 218.76.63.194:37206->72.14.253.125:xmpp-client (ESTABLISHED)
gaim 5898 exp 17u IPv4 35797 TCP 218.76.63.194:46254->by1msg3245810.phx.gbl:1863 (ESTABLISHED)
opera 5910 exp 17u IPv4 73281 TCP 218.76.63.194:41216->64.233.189.104:www (ESTABLISHED)
opera 5910 exp 58u IPv4 74179 TCP 218.76.63.194:44097->64.233.167.111:pop3s (ESTABLISHED)

$ lsof -l|grep COMM
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

$ lsof -l|grep 631
gnome-pan 5156 1000 mem REG 3,1 16312 181160 /usr/share/locale-langpack/zh_CN/LC_MESSAGES/gnome-screensaver.mo
gaim 5898 1000 mem REG 3,1 26631 847691 /usr/lib/gaim/idle.so

这烂端口,不知道哪里开的。

模拟小键盘说明 星期四, 09月 28th, 2006

模拟小键盘说明

常规:
7890
uiop
jkl;
m,./

Fn:是模拟成
KP_Home KP_Up KP_Prior *
KP_Left KP_Begin KP_Right -
KP_End KP_Down KP_Next +
KP_Insert comma KP_Delete /

Fn+NumLK开:
789*
456-
123+
0,./

开关触摸板 星期四, 09月 28th, 2006

本本,没触摸板开关的,就用这个了。

代码:
#!/bin/bash ts=`synclient -l|grep TouchpadOff`
ts=${ts#*= }
if((”$ts” == 0))
then
synclient TouchpadOff=1
else
synclient TouchpadOff=0
fi

前提是xorg.conf里面开了

代码:
Option          “SHMConfig”             ”on”

帅帅,9月28号就1岁2个月了。 星期三, 09月 27th, 2006

家里的墙壁是发乱贴纸的。而且是集中张贴的。


–>

到外面就餐,但是像大孩子了。


–>

交换鼠标1,3键的脚本。 星期三, 09月 27th, 2006

平时都是使用左手鼠标,到了玩fps游戏的时候,限于键盘的布局,只能使用右手鼠标了。所以,建立一个bash,快速切换。 Laughing

代码:
#!/bin/bashbut=`xmodmap -pp|head -n 1|cut -d ‘ ‘ -f 3`
((but++))
ret=”"
ret=`xmodmap -pp|grep “3.*1″`
if [ -z "$ret" ]
then
prefix=”xmodmap -e \”pointer = 3 2 1 4 5 6 7 8 9″
else
prefix=”xmodmap -e \”pointer = 1 2 3 4 5 6 7 8 9″
fi
cmd=${prefix%${but}*}’”‘
eval $cmd

Laughing

rhythmbox::mp3 星期二, 09月 26th, 2006

一直没用rhythmbox,今天开了一下。竟然还要安装gstreamer0.10-fluendo-mp3

而nautilus后台播放ogg音频,则需要vorbis-tools作解码器。当然music123会自动包括wav,ogg,mp3(Recommends: esound-clients, mpg321 | mpg123, vorbis-tools)。

使用nautilus后台播放的原因是,可以用录音机(gnome-sound-recorder)进行语音记事。

quake3,老不记得如何开帧速显示。 星期二, 09月 26th, 2006

cg_drawfps 1

doom3的:
com_showfps

最简单解决wine对话栏的中文字体。 星期一, 09月 25th, 2006

自己实验出来的。就是把 MS Sans Serif 和 MS Serif 字体替换。

$ wine –version
Wine 0.9.17

~/.wine$ diff system.reg system.reg-old
9034,9035c9034,9035
< “MS Sans Serif”=”SIMSUN.TTC”
< “MS Serif”=”SIMSUN.TTC”

> “MS Sans Serif”=”sserife.fon”
> “MS Serif”=”serife.fon”
10965c10965
< [Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts] 1159159245

> [Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts] 1159147451
11111,11112c11111,11112
< “MS Sans Serif”=”SIMSUN.TTC”
< “MS Serif”=”SIMSUN.TTC”

> “MS Sans Serif”=”sserife.fon”
> “MS Serif”=”serife.fon”
12090c12090
< [System\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\PS Driver] 1159159244

> [System\\CurrentControlSet\\Control\\Print\\Environments\\Windows NT x86\\Drivers\\Version-3\\PS Driver] 1159147450


–>


–>