Archive for 11月, 2005

到江边玩了一下 星期六, 11月 26th, 2005

贴张


–>

多媒体键盘添加到fvwm 星期一, 11月 21st, 2005

执行xev。很好的分析软件啊。鼠标键盘的值,系统知道多少,你就知道多少。

代码:
KeyRelease event, serial 33, synthetic NO, window 0×2000001,
root 0×48, subw 0×2000002, time 5397726, (46,33), root:(873,574),
state 0×110, keycode 71 (keysym 0xffc2, F5), same_screen YES,
XLookupString gives 0 bytes:KeyPress event, serial 33, synthetic NO, window 0×2000001,
root 0×48, subw 0×2000002, time 5404261, (46,33), root:(873,574),
state 0×110, keycode 174 (keysym 0×0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

174键没分配进系统。使用xmodmap增加就是了。不要修改keymap文件。因为不同系统,keymap文件不同的。

代码:
AddToFunc   StartFunction
+ I Exec exec `xmodmap -e “pointer = 3 2 1 4 5″`   #左手鼠标
#+ I Exec exec `xmodmap -e ‘keycode 115 = Win_L’`   #左边的Win按键
#+ I Exec exec `xmodmap -e ‘keycode 116 = Win_R’`   #右边的Win按键
#+ I Exec exec `xmodmap -e ‘keycode 117 = PopMenu’`   #右边的弹出菜单按键
+ I Exec exec xmodmap -e ‘keycode 115 = Super_L’        # Left windows key
+ I Exec exec xmodmap -e ‘keycode 116 = Super_R’        # Right windows key
+ I Exec exec xmodmap -e ‘keycode 117 = Menu’           # Windows menu key
+ I Exec exec xmodmap -e ‘add Mod3 = Super_L’           # Make left windows key a modifier
+ I Exec exec xmodmap -e ‘add Mod4 = Super_R’           # Make right windows key a modifier#+ I Exec exec `xmodmap -e ‘keycode 174 = VolumUp’`   #多媒体键盘的音量+
#+ I Exec exec `xmodmap -e ‘keycode 176 = VolumDown’`   #多媒体键盘的音量-

然后就可以直接使用了

代码:
Mouse 3 R A WindowList
Key Menu A A WindowList

安装内核模块的方法(用eagle-usb-modules实习) 星期三, 11月 9th, 2005

1。使用module-assistant
“module-assistant” package and the kernel-headers-* package
corresponding to the kernel version you want to use, then run the
following commands:

# module-assistant prepare # 如果没有内核头文件包,会自动下载相应版本的。

代码:
$ sudo module-assistant prepare
apt-get  install linux-headers-2.6.12-9-686正在读取软件包列表… 完成
正在分析软件包的依赖关系树… 完成
将会安装下列的额外的软件包:
linux-headers-2.6.12-9
下列【新】软件包将被安装:
linux-headers-2.6.12-9 linux-headers-2.6.12-9-686
共升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 3 个软件未被升级。
需要下载 6722kB 的软件包。
解压缩后会消耗掉 69.9MB 的额外空间。
您希望继续执行吗?[Y/n]

# module-assistant get eagle-usb
# module-assistant build eagle-usb
后面2步很简单,系统智能处理了。
现在,可以在/usr/src下面找到eagle-usb-modules-<version>.deb文件。使用dpkg -i 安装就可以了。

2。手工方法。
需要自己熟悉系统的方式和包的本身依赖关系。幸好eagle-usb-modules几乎没有依赖关系。

3。kernel-package方法。(已经被第一种方式替代了)
现在的版本基本不提供了。参考如下:
| The Debian way (with kernel-package): if you compile this kernel
| module using the standard Debian tools to manage packaged kernels
| (which involves using the package named “kernel-package”), you’ll get
| a package named eagle-usb-modules-#KVERS#, where #KVERS# is the
| version number of the kernel package you are compiling. Read the
| documentation for kernel-package to know about compiling kernel
| modules that way.
|
| The eagle-usb-modules-#KVERS# “provide” eagle-usb-modules virtual package.
|
| The eagle-usb-utils depends on eagle-usb-data.
| It only recommands eagle-usb-modules virtual package for the user
| who install driver “by hand” way.
| Pay attention to kernel version numbers and you’ll be fine.

使用ADI(Analog Devices) usb adsl modem 星期一, 11月 7th, 2005

[ Fed Up WIth Life 心情: Fed Up WIth Life ]
一个闲置的同维699CHA adsl usb modem,代替699B用用。

代码:
$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 003: ID 1110:9021 Analog Devices Canada, Ltd (Allied Telesyn)
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

找了一些介绍。还是比较难找到的。绕了好久。
AD6485 – Eagle-II USB/Ethernet
http://www.analog.com/en/prod/0,2877,AD6485,00.html
http://dev.eagle-usb.org/wakka.php?wiki=EagleUsb230
http://baud123.free.fr/eagle-usb/eagle-usb-2.3/eagle-usb-2.3.2.tar.bz2
编译了半天,不确定是否正确。因为和单独下的一个pdf说明完全不同。哎,原来在ubuntu源里面有个1.9.9的。

由于没有说明,自己一个一个试,最后整理了一下包你们的文件说明。

引用:
/etc/eagle-usb/eagle-usb.conf #主要设备配置,针对应该的VPI,VCI等,都在里面。可以手工修改。
/etc/ppp/chap-secrets #保留用户名和密码。
/etc/ppp/peers/adsl #联网配置设置。
/etc/ppp/peers/mire #类似配置,法国电信搞的什么东西,特殊的协议?
/usr/sbin/fctStartAdsl #内置的启动掉用,startadsl就是掉用这个。
/usr/sbin/fctStopAdsl #
/usr/sbin/startmire #法国电信搞的烂协议。
/usr/sbin/startadsl #类似是主执行文件,就是在这个以前modem并没有起来。
/usr/sbin/stopadsl #
/usr/sbin/eaglediag #调试,检查所有配置状态,需要全部显示OK。
/usr/sbin/eagleconfig #主要的配置和启动。就是只能设置固定的ISP和VPI VCI,还是要手工修改/etc/eagle-usb/eagle-usb.conf
/usr/sbin/eaglectrl #搞了半天才找出来的主要启动modem的文件。
/usr/sbin/eaglestat #查看联网状态
/usr/sbin/pppoa
/etc/eagle-usb/scripts/eu_config_bash #就是那些选择ISP的。已经归类了。当然没有适合中国的,还不能选手动。气死。最后修改了一个自己需要的。
增加:
“xCN01″ ) VPI=”00″ ; VCI=”20″ ; ENC=”03″ ; COUNTRY=”Chinese” ; ISP_NAME=”163″ ;;
for ISP_TMP in AT01 BE01 BR01 BR02 BR03 BR04 BG01 BG02 DK01 DE01 ES01 ES02 ES03 ES04 FI01 FR01 FR02 FR03 FR04 FR05 FR06 FR07 GR01 HU01 IE01 IT01 IT02 IT03 NL01 PL01 PT01 SE01 CH01 CH02 CN01 UK01 ; do

配置步骤:
1。sudo eagleconfig
系统在usb插入时,好像出了一个sit0(ifconfig可以看到)。但是很难清晰的追到。不知原因。由此配置程序虚拟出一个eth0,可以一次性把modem启动及联网全部完成。但重新配置就不执行这些步骤了。搞了好久才清楚。原来如果要一次性执行启动mod等,必须修改成不同的配置,再改回来。
2。然后pppoeconf eth0。才出一个ppp0。还有修改/etc/networks/interface,把eth0加上去。
软件带的startadsl都不要用。但是开机不能自动启动。
软件自己建了一个服务,进程守护程序S99eagle-usb -> ../init.d/eagle-usb。其实就是执行了sudo fctStartAdsl,但我执行了,没反应。还只能ctrl-c。倒是关机时,它知道停止服务。

启动步骤:
eaglectrl -w
sudo pon dsl-provider

看了下,eagle-usb.org的都是法语。英语的有一点。有现象和我一样,竟然说要编译模块。有个家伙还说他就喜欢<eaglectrl -w>,再<startadsl>。气死。摘录了一点FAQ。

代码:
37. The module does not LOAD at bootCHECK the module is installed in the following directory:
/lib/modules/$KVERS/misc

Check hotplug is installed and that the kernel is configured to use it.
Check that the module dependencies are up to date. CHECK the file
/lib/modules/KVERS/modules.usbmap to see ig it contains references to
the eagle-usb.(o|ko) module.

CHECK you have a recent version of modutils.

38. The module is loaded at boot, bug hotplug do not load
the firmware or the DSP code

Hotplug should LOAD the DSP code thanks to the script
/etc/hotplug/usb/eagle-usb

It is called whenever the modem declares itself on the USB bus
with the USB identifiers that are specified in the file
/lib/modules/$KVERS/modules.usbmap,
just after the module was loaded.

CHECK these files are correct, and that have execute permission.

测试执行了一下。

代码:
exp@exp-ubuntu:~$ ll /etc/hotplug/usb/eagle-usb
ls: /etc/hotplug/usb/eagle-usb: 没有那个文件或目录
exp@exp-ubuntu:~$ ll /lib/modules/$KVERS/modules.usbmap
ls: /lib/modules//modules.usbmap: 没有那个文件或目录$ ll /lib/modules/2.6.10-5-686/modules.usbmap
-rw-r–r– 1 root root 263544 2005-11-06 02:21 /lib/modules/2.6.10-5-686/modules.usbmap

$ whereis eagle-usb
eagle-usb: /etc/eagle-usb /usr/lib/eagle-usb

_________________

—————————————————-
dapper new
—————————————————-
ai eagle-usb-utils
自动启动了配置。
/etc/eagle-usb/*
/etc/hotplug/usb/eagle-usb
/etc/init.d/eagle-usb

/usr/sbin/eaglediag
/usr/sbin/eagleconfig

/usr/sbin/eagleconfig_front.bash ISP列表
“xCN12″ ) VPI=”0″ ; VCI=”20″ ; ENC=”3″ ; COUNTRY=”China” ; ISP_NAME=”China Telecom Hangzhou” ; CMVep=WO ; CMVei=WO ;;
这个配置适合湖南电信

/usr/sbin/fctStartAdsl
/usr/sbin/fctStopAdsl
/usr/sbin/startadsl
/usr/sbin/stopadsl
/usr/sbin/eagletestconnec
/usr/sbin/eaglectrl
/usr/sbin/eaglestat
/usr/sbin/pppoa
/usr/share/eagle-usb/lang/*

重新安装grub 星期一, 11月 7th, 2005

好久以前的一个blog了。翻出来参考。

装了一个fanx(slax),竟然还是lilo的启动。
只好重新配置了一个grub for dos。使用for dos版本,主要是考虑一旦引导有问题,肯定要用fdisk/mbr保住xp。这样就可以一次完整恢复。如果使用grub配置到ext3一类的分区,出问题后,多一道救援步骤。

1。复制了包含stage1,stage2,menu.lst等内容的目录到C:\boot\grub。
2。复制grldr到C:\。
3。追加C:\GRLDR=”Start GRUB”到boot.ini(用attrib先修改一下属性)。
4。修改menu.lst。
# —————————————————-
# color black/cyan yellow/cyan
timeout 10
default 0

title Windows XP on (hd0,0)(hda1)
root (hd0,0)
# makeactive
chainloader +1
# rootnoverify (hd0)

title Fanx(Slax) Linux on (hd0,2)(hda3)
root (hd0,2)
kernel /boot/vmlinuz rw root=/dev/hda3
# initrd的项目可以不要