21 五月, 2008 14:08
论文终于弄的差不多了,就差最后的收尾工作了,不过,感觉任务还是挺艰巨
看到一段对话,引自“Linux!=windows”
新用户(以下简称“新”):我想要一个新玩具汽车,每个人都因乐高汽车的好玩而着了迷。所以我也买了它,但当我到家后我才发现,我的盒子里只有积木和齿轮!我的车子在哪里?
老用户(以下简称“老”):你应该在积木之外组装一辆车,这才是乐高的真谛。
新:什么??我不知道应怎样拼装这个车子。我不是个机械师。为什么我应该知道如何组装它?
老:盒子里有使用手册。它上面写着拼装车子的步骤。你不用知道原理,只要按照按部就班就好。
新:好吧,我找到了步骤。这将占用我很多时间!为什么厂家不能装好了再卖给我,还得让我自己动手??
老:并不是所有人都满足于将乐高做成玩具车。这些积木可以被我们组成万物。这才是游戏的真谛。
新:我仍旧不明白为什么厂商不能给我们这种想要车子的人一个成品,如果那些喜欢动手的人高兴可以自己拆了它阿。无论如何,我还是将它组装起来了,尽管某些部件时不时地掉下来。我有什么方法可以解决吗?我能将它们粘起来吗?
老:这就是乐高。他就是用来拆装的。这才是游戏的真谛。
新:但我不希望总是拆拆装装,我仅仅希望一个玩具车而已!
老:呃...,欢迎您到地球来。你买的是乐高吗?
11 四月, 2008 17:51
有时候,我们拿到的光盘映像文件为 .bin/.cue 格式,如果要在 Ubuntu 中使用,那么可以将其转换为 .iso 格式。在 Ubuntu 中有一个命令行的程序 BinChunker 能够完成该任务。
在终端中输入 sudo apt-get install bchunk 指令可以立即安装 BinChunker 程序。
如我们要把 image.bin/image.cue 转换为 image.iso,则使用下列命令:
bchunk image.bin image.cue image.iso
关于 bchunk 更多选项的说明,可以使用 man bchunk 查询。
在网上下载了spss for linux,结果下来一看是bin/cue格式,折腾半天,chmod半天也没有什么结果,利用上面的方法,转为了iso模式!
然后当然是sudo mount -o loop espss16l.iso01.iso /media/cdrom
然后,cd到/media/cdrom0
chmod +x setup.bin
./setup.bin
Initializing Wizard........
Launching InstallShield Wizard........
界面出来了!终于又拼凑出一个安装过程!
02 四月, 2008 18:46
用windows习惯了,没有个防火墙啥的,总觉得心里不落忍,幸好ubuntu里自带了firestarter,管它有用没有用呢,装上再说了,结果。。。
the device eth0 is not ready
知之为知之,不知道搜索知,baidu,google,wiki一通,发现方法如下:
该问题是由于软件升级造成的,Firestarter的 启动脚本比较愚蠢,会从ifconfig的输出信息中查找相关接口的配置信息。以前它查找的肯定是英文的字符串,现在由于ifconfig的输出信息变成 了中文的,一些参数信息它可能无法获取了,所以导致启动失败。
检查Firestarter的启动脚本,Firestarter
的启动脚本是/etc/init.d/firestarter,其中执行了/etc/firestarter/firestarter.sh来启动防火
墙,因此,其实Firestarter真正的启动脚本是/etc/firestarter/firestarter.sh。
方法一:编辑/etc/firestarter/firestarter.sh
根据本机ifconfig的输出信息来修改以下几行代码:
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \ -f 1`
例如,我的系统使用eth0上网,就执行ifconfig eth0。其中IP地址依然可以通过以上代码的第一行获取,只是子网掩码和广播地址的获取会有问题。于是保留第一行不做修改,将后两行代码中grep搜索的英文字符串改为相应中文字符串即可。
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
MASK=`/sbin/ifconfig $IF | grep 掩码: | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep 广播: | cut -d : -f 3 | cut -d \ -f 1`
保存文件后,启动Firestarter。一切正常。
方法二:sudo vi /etc/firestarter/firestarter.sh
找个合适的地方,例如在
# External network interface data
这行注释的上面,添加一行:
LANG=en_US
这样,ifconfig的输出就是英文的了,这个启动脚本也就可以从它的输出信息中搜索出需要的几个参数了。这个方法更加简单,并且感觉上通用性似乎好一点。
原文引自:http://www.sanhex.cn/2007/02/firestarter.html
02 四月, 2008 02:44
最近装了一个ubuntu系统,来体验一下linux的魅力,开始在硬盘上直接装的,结果由于声卡驱动不了,就索性给格了,然后在虚拟机上装了一个,体验了两天,不甘心,又在硬盘上装了一个,结果这次很顺利的什么都是好好的,好景不长,问题又出来了,前两天弄上耳机,发现音箱和耳机一起响了,这不明显的是掩耳盗铃的效果,不甘心,连续baidu,google,wiki,今天晚上终于弄好了!过程如下:
使用 lsmod |grep snd
,得知:snd_hda_intel 263840 1
运行alsamixer,查看芯片型号 为Conexant CX20549 (Venice)
card为HDA INTEL
从 http://www.alsa-project.org/下载alsa-driver,找到
ALSA-Configuration.txt,从中用Chip型号中的关键字,一般是最後一段搜索,或lsmod
得到的声卡模块名搜索,再用Chip型号定位。查出可用的参数
Conexant 5045
laptop-hpsense Laptop with HP sense (old model laptop)
laptop-micsense Laptop with Mic sense (old model fujitsu)
laptop-hpmicsense Laptop with HP and Mic senses
benq Benq R55E
test for testing/debugging purpose, almost all controls
can be adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
Conexant 5047
laptop Basic Laptop config
laptop-hp Laptop config for some HP models (subdevice 30A5)
laptop-eapd Laptop config with EAPD support
test for testing/debugging purpose, almost all controls
can be adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
onexant 5051
laptop Basic Laptop config (default)
hp HP Spartan laptop
然后,sudo gedit /etc/modprobe.d/options
在最后一行,添加:
options snd-hda-intel model=参数,
结果是:试了所有带hp 字样的mod,全不行!
今天晚上找到最终的解决方法: 更新alsa最新的驱动!
方法如下:
下载了最新的驱动
alsa-driver-hg20070613.tar.bz2
下载地址:ftp://ftp.suse.com/pub/projects/alsa/snapshot/driver/
下载驱动后
$tar xvf alsa-driver-hg20080323.tar.bz2
$./configure
$sudo make
$sudo make install
重新启动机器,搞定!
不过,在其中,也有一个小小的波折,那就是在./configure时出现了错误,更换了源以
后,更新 sudo apt-get install libc6-dev
后再./configure,ok!
一个菜鸟,开始ubuntu的开始!
在这里附录./configure常见错误解决方法:错误: C compiler cannot create executables
解决:sudo apt-get gcc libc6-dev
错误:checking for C compiler default output... configure: error: C compiler cannot create executables
解决:sudo apt-get install libc6-dev
错误:configure: error: C++ preprocessor "/lib/cpp" fails sanity check
原因:gcc的组件没装全
解决:sudo apt-get install build-essential
错误: Can't find X includes. Please check your installation and add the correct paths!
原因:没有X的包含文件
解决:sudo apt-get install xlibs-dev
错误: Qt (>= Qt 3.0) (headers and libraries) not found. Please check your installation!
原因:查找提供qt的lib&&headers的软件包,并安装之
解决:sudo apt-get install libqt3-headers libqt3-mt-dev
错误:in the prefix, you've chosen, are no KDE headers installed. This will fail. So, check this please and use another prefix!
原因:install a KDE application in a Gnome environment。
解决: sudo apt-get update sudo apt-get install kdelibs4-dev kdelibs4c2a
错误:./admin/cvs.sh: 585: autoconf: not found
解决:sudo apt-get install autoconf
错误: *** GTK >= 2.4.0 not installed! ***
原因:没装GTK
解决:sudo apt-get build-dep gedit
错误:heching for gtk-config... no checking for GTK - version = 1.2.0... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG enviroment variable to the *** full path to gtk-config. configure: error: Cannot find GTK: Is gtk-config in path?
解决:sudo apt-get install libgtk1.2-dev




