Posts Tagged ‘Linux’

Fix Ubuntu installation hang when detecting file system

My Ubuntu hanged every time when detecting file system. Sometimes even I can't see the GUI of Kubuntu. I found out that when it hanged my hard disk was reading something. I encountered this problem several years ago, but the detecting process ended not very long after the "Detecting file system" dialog. This time, after 10 minutes waiting, no response. I had to power off my PC.

Last time I thought the problem was caused by non standard or problematical partition. I remembered that I had one logical partition between two primary partitions. I fixed this problem and the installation went on.

But the problem was not the same as my last time, I fixed had a regular partition. I found out that I had some disk errors so I "chkdsk" first my drivers. No luck. I had no ideas about this. I tried to search the problem but no one had the same issue I met. So I had to figure it out by myself.

I tried to unplug the disk first and then after the liveCD desktop showed I plug it so I can see the GUI interface. Just after the "Detecting file system", the hard disk was still reading something without a stop. I switched to another console and type "top" to find the most CPU consume program. One of them is "ntfsresize". So I killed this program. But it appeared again. I killed it until no new "ntfsresize" was shown. And finally I saw the partition. Then the whole installation went on smoothly.

So, this problem must be caused by the "ntfsresize". I didn't know what's wrong with my disk or partitions that "ntfsresize" need to read it again and again. I even did not need to resize my ntfs partition. Next time, kill it first~

VMWare 6.5 vs Sun VirtualBox

昨天我还以为找到了福音,结果今天工作了半天才发现,最新的VirtualBox 2.1的性能还是有问题。昨天看到,XP启动的时候VirtualBox的性能确实好与VMWare 6.5,在实际使用中也发现VirtualBox的磁盘性能也比VMware6.5好。莫非是我虚拟机里面选磁盘接口的时候VirtualBox选的SATA,VMWare选的IDE造成的?

最大的性能差异在于应用程序的执行速度。平时我要开一个VS2005+Resharper插件,VMWare6.5分配了两个CPU给他用,很好用,速度很快。但VirtualBox就恼火了,只能开一个CPU不说,而且核心占用率经常是和实际CPU占用率一样,天啊。Resharper平时本来就要不停地解析,CPU占用又经常是100%,连打字都是飞着打的。郁闷。坚持了两个小时以后,终于放弃VirtualBox了。

总结起来,VirtualBox确实还需要进步阿!期待小巧实用的VirtualBox进一步发展,打败庞大的VMWare。

Ubuntu 8.10硬件安装无分区问题解决

可能是安装的时候占用了硬盘资源,导致无法找到硬盘分区,结果安装就没法正常的分区,安装不能正常进行。最后,参考了这个帖子,只需要在isodevice umount掉就可以了。直接打开“Application"->"Accessories"->"Terminal",然后

cd /

sudo umount -l isodevice

问题解决。笔记本升级为8.10,HAPPY。

PS:Virtual Box 2.1的性能确实要比臃肿的Vmware 6.5快很多,而且也没有Vmware 6.5的键位映射问题。爽~!

Linux下面成功使用Wine模拟TM2008 Beta

零点今天给我说他模拟成功了TM2008,哇,真的啊?他给了我这个网址:Linux 下使用 Wine 安装运行 TM2008 Beta 及乱码、与 Windows 共享聊天记录等相关问题的解决

按照网上给的方法稍作修改以后,安装成功了。

首先是把以前的wine卸载了。安装了打了中文补丁的wine 1.13,就访问http://ftp.ubuntu.org.cn/home/windowssux/Wine_CN/下载并安装最新的wine1.13就可以解决中文问题了。

然后拷贝rpcrt4.dll到wine的system32目录,然后

sh winetricks msxml3 gdiplus riched20 riched30 ie6 vcrun6 vcrun2005sp1

安装一怕啦东西。

最后就是执行TM的安装程序就可以啦。

零点装的是TM Preview 4,貌似字体比较小。我这里装的是TM Beta,但是无法上线,按了上线几秒钟就离开了,郁闷的很。

但无论杂说,还是基本可用了,比用QQ几分钟挂一次好多了,比用QQ FOR LINUX好太太太多了~~感谢wine

OpenCASCADE 6.3.0编译出错的解决方法

在Linux下编译OpenCASCADE 6.3.0,出现:

g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../inc -I../../../drv/EDL -I../../../src/EDL -I../../../drv/MS -I../../../src/MS -I../../../drv/WOKAPI -I../../../src/WOKAPI -I../../../drv/WOKBuilder -I../../../src/WOKBuilder -I../../../drv/WOKDFLT -I../../../src/WOKDFLT -I../../../drv/WOKDeliv -I../../../src/WOKDeliv -I../../../drv/WOKMake -I../../../src/WOKMake -I../../../drv/WOKOBJS -I../../../src/WOKOBJS -I../../../drv/WOKOrbix -I../../../src/WOKOrbix -I../../../drv/WOKStep -I../../../src/WOKStep -I../../../drv/WOKTools -I../../../src/WOKTools -I../../../drv/WOKUnix -I../../../src/WOKUnix -I../../../drv/WOKUtils -I../../../src/WOKUtils -I../../../drv/WOKernel -I../../../src/WOKernel -DNDEBUG -DNo_Exception -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -ffriend-injection -fpermissive -DCSFDB -DOCC_CONVERT_SIGNALS -DLIN -DLININTEL -D_GNU_SOURCE=1 -O2 -MT WOKUnix_FDescr.lo -MD -MP -MF .deps/WOKUnix_FDescr.Tpo -c ../../../src/WOKUnix/WOKUnix_FDescr.cxx -fPIC -DPIC -o WOKUnix_FDescr.lo
../../../src/WOKUnix/WOKUnix_FDescr.cxx: In member function 'void WOKUnix_FDescr::Dup()':
../../../src/WOKUnix/WOKUnix_FDescr.cxx:249: warning: ignoring return value of 'int dup(int)', declared with attribute warn_unused_result
../../../src/WOKUnix/WOKUnix_FDescr.cxx: In member function 'Handle_TCollection_HAsciiString WOKUnix_FDescr::ReadLine()':
../../../src/WOKUnix/WOKUnix_FDescr.cxx:355: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result
../../../src/WOKUnix/WOKUnix_FDescr.cxx: In function 'FILE* _wokunix_fdopen(int)':
../../../src/WOKUnix/WOKUnix_FDescr.cxx:436: warning: deprecated conversion from string constant to 'char*'
../../../src/WOKUnix/WOKUnix_FDescr.cxx:443: warning: deprecated conversion from string constant to 'char*'
../../../src/WOKUnix/WOKUnix_FDescr.cxx:449: warning: deprecated conversion from string constant to 'char*'
In function 'int open(const char*, int, ...)',
inlined from 'WOKUnix_FDescr WOKUnix_FDescr::BuildNamedPipe()' at ../../../src/WOKUnix/WOKUnix_FDescr.cxx:205:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[3]: *** [WOKUnix_FDescr.lo] Error 1
make[3]: Leaving directory `/home/anubis/src/rpm/BUILD/OpenCASCADE6.3.0/ros/adm/make/TKWOK'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/anubis/src/rpm/BUILD/OpenCASCADE6.3.0/ros/adm/make'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/anubis/src/rpm/BUILD/OpenCASCADE6.3.0/ros'
make: *** [all] Error 2

注意函数体BuildNamedPipe出错。在论坛上找到解决方案

只需要修改ros/src/WOKUnix/WOKUnix_FDescr.cxx的205行为:

myFileChannel = open(apath.ToCString(), O_RDONLY | O_NDELAY | O_CREAT, S_IRUSR);

即可

搭建Linux简易流媒体服务器

在教研室一直都用笔记VNC远程连接到寝室的台式机,图像倒是没有问题了,可郁闷的是声音没有。倒是突然觉得windows的远程还好用了些,包括能够把本地磁盘带到远程的功能都是挺好用的。唯一不满意的就是Windows的稳定性,万一崩溃了就麻烦了,而在开发中遇到这些问题也是相当头痛的。扯远了——言归正传,回到我们的流媒体服务器上来。

为什么我要弄一个流媒体服务器呢,关键是我想学学英语,在教研室开发的时候听听英语也是好的。但是直接听下载的英语,一来麻烦,而来下载了一怕啦,实际听得时间并不多。还是喜欢广播,一直有新鲜的东西能够听到,量大,而且随时可以收听,不用担心找不到资源。http://english.cri.cn/就提供了很多有用的资源,通过mms流媒体服务播出。那么,如何将这个音频带到远程的电脑上呢?

在Linux下面让远程能够听到声音,我查到可以有两种方法:

  1. 将本地声音转到eSound声卡驱动,然后远程链接播放。用了一下感觉比较麻烦,没搞懂怎么弄得。
  2. 如果你只是播放一些音乐的话,用vlc media player就可以搞定。

首先,将解码器等安装全: Read more

wine下能够正常使用的迅雷

最新版本的迅雷无法用,表现为经常崩溃,或者99.99%时下载不完。最后找到一个可用的绿色版:

http://www.namipan.com/d/Thunder.v5.6.3.307.NoAD-Ayu.rar/2f2275831d5259a64d8574074bd7eb6b16b0e39765323200

本地下载:

  Thunder.Under.Wine.rar (3.1 MiB, 462 hits)

VMWare workstation 6.5在Ubuntu 8.10下键位失灵问题解决

今天把UBUNTU 8.10装好了,字体使用了文泉译的字体,很好看。哪知道装了虚拟机就来了很多问题。发现虚拟机里面方向键不能用了,其实回车键右边的所有键都不能用了。怎么回事哟。以前6.5在8.04上都好好的呢,怎么现在出了问题呢?6.5的BUG?和8.10不兼容??在网上搜了N久没有找到问题的描述。

后来放弃了,装了VirtualBox,好用,但问题来了,虚拟Windows98需要关闭虚拟化技术~只能软件模拟~~哎,毕竟是16位和32位混合的产物,指令没法直接使用的。没法和Windows2000同使用,而且好像没有相应的显卡驱动,麻烦。试了试KVM,不支持98~放弃。

最后还是回到VMware来,怎么回事呢????还亏了我巨大的耐心和无敌的搜索技能,终于找到一个和我一样的人~~,一看问题和我一样,高兴了。哟,那儿去找~/.vmware/config文件哦,没有,郁闷了。嘿嘿,再看了看,文中提到了“The Longer Story",草草的看了看,明白了起中的道理,好的把/etc/vmware/config最后一行加入:

xkeymap.nokeycodeMap = true

就OK了。

我想,可能问题在于键位映射,和选择的中文环境可能有一些关系。

Linux双面打印概要

摘自:http://www.realss.cn/kb&menuaction=phpbrain.uikb.view_article&art_id=6

双面打印及小册子打印

网络打印机常常不能像本机上安装的打印机一样实现一步一步指导地双面打印。这样就需要操作人员格外用心,自己在打印时候先打印一面,然后去打印机前重新装纸,回到桌前再打印另一面。

打印机有两种送纸方式。一般激光打印机送纸时,第一张送入的纸,将会出现在第一页(先进先出);喷墨打印机第一张送入的纸,将会出现在最后一页。这两种打印机双面打印的方法和小册子打印方法都不同。

对于激光打印机,双面打印需要先逆序打印左页,回到打印机前装纸,再正序打印右页。打印小册子时候,需要先正序打印右页,回到打印机前装纸,再逆序打印左页。

对于喷墨打印机 Read more

Ubuntu下使用打印机~痛苦

记得好像是5.12地震以前用过打印机,后来就再也没有用过了。这会儿都10月中旬了,拿出来晒晒。

插上电源,接上USB,呵呵,Ubuntu真好,打印机就识别到了。来,打印个测试也看看,哟,没动静?怎么回事~!

网上一搜,晕,HP的打印机Ubuntu是认识了,可是用不了。郁闷,按照大家的说法到得到打印机驱动。经过一番安装,OK了。可恶的是中间竟然要求网络连接下载一个Plug-in,看来Linux真是一个网络操作系统,不错,确实,网络不好别想用。

很好,打印测试很顺利。来吧,打印那篇论文。

双面打印吧,靠,驱动不支持……

Read more

12
Return top