显示标签为“Ubuntu”的博文。显示所有博文
显示标签为“Ubuntu”的博文。显示所有博文

2007年11月1日星期四

清除runauto...

U盘已经不在我身边几个月了,这期间我都使用MP3代替。但是最近把MP3也借了出去,现在要用,就只有把U盘要回来。
将U盘插入电脑,发现里面多了一个奇怪的东西runauto...,表面像是文件夹,我使用

sudo rm -r runauto...
却提示runauto...不是一个文件夹,于是我就来了一个方便的办法——格式化U盘。百度一下,命令如下(虽然使用ubuntu很久了,但是linux命令还有很多不知道):
sudo umount /dev/sdb1
sudo mkfs.vfat /deb/sdb1
重新mount,一个干净的U盘已经运行起来了。
不嫌麻烦,又百度了一下runauto...,发现这个东西在windows中的生存能力很强,当然也可以清楚的具体如下(来源:长沟中心校):
选择“工具-系统进程”,选择lsass.exe,对应的路径应为 “C:\WINDOWS\lsass.exe”。终止该lsass.exe进程,然后用WinRAR删除(在资源管理器下打开C盘容易造成二次感染,有时 也可以右击盘符,在弹出的菜单中选择打开)以下文件:
C:\WINDOWS\lsass.exe
C:\autorun.inf.tmp
C:\autorun.inf
检查一下其它盘符的根目录,有的话同样删除autorun.inf.tmp,autorun.inf。
接着,清除病毒在注册表创建的两个动作:
HKLM\System\CurrentControlSet\Services\kkdc\\FailureActions
HKLM\System\CurrentControlSet\Services\kkdc\\Start
也就是删除kkdc这项。
以上就是手工清除病毒的过程。

不 过,有一点值得注意,那就是不管你是用杀毒软件删除病毒的,还是纯手工清理的。有一个地方还得另外解决,就是每个盘根目录下的runauto..文件夹。 在资源管理器下runauto..文件夹是删不掉的。cmd下,输入“rd /s runauto..\”,还是不行,为什么呢?
这里不作探讨,大家可以看一下《U..\ 无法正常访问的真正原因》。

解决的方法其实很简单,在cmd下(点击开始菜单-运行,输入cmd,点“确定”),输入:
cd \
rd /s runauto…\
注意:runauto后有3个“.”,提示输入“y”,按回车就行了。
同理删除其它盘符下的“runauto..”文件夹。DOS进入其它盘符cd X:(X为C,D,E,F等),这应该不用多说吧。
也可以用:
rd /s \\.\C:\runauto..\
其它盘符只要把其中的“C”换成相应的盘符(如D,E,F等)就可以了。

这里还有一个更N的(来源:电脑爱好者论坛
建立或删除autorun.inf文件夹
批处理代码如下:
@echo off
mode con cols=70 lines=18
title 建立或删除autorun.inf文件夹
color 4f
cls
echo.
echo 免疫autorun类病毒,建立或删除autorun.inf文件夹 for /XP
echo ---------------------------------------------------------------
echo.
echo 此批处理会在每个分区的目录下建立autorun.inf\cfan.文件夹,默
echo 认的情况下是删不掉的,但可以用这个批处理删掉。在XP下测试通过。
echo.
echo 6618 2007年3月26日
echo.
echo [Y] 按 Y 键建立autorun.inf文件夹免疫autorun类病毒
echo [U] 按 D 键删除硬盘所有分区下的autorun.inf文件夹
echo [Q] 按其他任意键退出
echo -----------------------------------------------------------------
echo.
SET Choice=
SET /P Choice= 请选择要进行的操作:
IF /I '%Choice:~0,1%'=='y' goto md
IF /I '%Choice:~0,1%'=='d' goto del
exit
:md
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do del /a /f /q %%a:\autorun.inf>nul 2>nul & md %%a:\autorun.inf >nul 2>nul & %%a: >nul 2>nul & cd %%a:\autorun.inf >nul 2>nul & md cfan..\ >nul 2>nul & attrib +s +h +r %%a:\autorun.inf >nul 2>nul
cls
mode con cols=70 lines=10
color 2f
echo.&echo.&echo.
echo 已经在各分区的根目录下建立autorun.inf\cfan.文件夹免疫autorun病毒。
echo.
echo 感谢使用,按任意键退出...
pause>nul
exit
:del
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do rd /s /q %%a:\autorun.inf\cfan..\ >nul 2>nul & rd /s /q %%a:\autorun.inf >nul 2>nul
cls
mode con cols=70 lines=10
color e5
echo.&echo.&echo.
echo 已经删除各分区的根目录下建立autorun.inf\cfan.文件夹。
echo.
echo 感谢使用,按任意键退出...
pause>nul
exit

好人呀。感谢一下这位6618的仁兄,即使我的ubuntu中没有这个无语的runauto...

2007年5月5日星期六

解决两个问题

一、升级到feisty后,totem播放rmvb文件没有声音。按照ubuntu中文论坛
升级festy后rmvb播放没声音了”
主题14楼的办法,解决了该问题。

编辑~/.xine/catalog.cache文件
找到
/usr/lib/xine/plugins/1.1.4/xineplug_decode_real_audio.so
把decoder_priority增加到10


二、不能通过锐杰认证上网。提示
Detect Proxy Server!Err = 4(Too many IP or Nic)

YOZX提醒,可能是虚拟机问题。因此试着删除libxalan110包。重启以后又不能上网了。因为出现ath0:avahi,所以我试着把avahi-autoipd和avahi-daemon卸载掉。现在可以使用xrgsu联网了,但是寻找到eth0要花一段时间。

不过acevery师兄就更厉害了,使用xsupplicant取代了xrgsu(原文),崇拜中……

2007年4月25日星期三

在feisty中安装adobe reader

feisty源中没有adobe reader。那么有两种方法解决:
1. 到adobe reader官方下载。
虽然adobe连接速度慢了些,但是可以下载到最新的软件,安装软件定制方便。
2. 使用ubuntu以前版本源中的包。
该方法可以快速的下载到软件。但是寻找不方便,可以使用 ubuntu官方提供的package搜索进行检索,或使用debian软件仓检索,还有可以通过一些网站下载,如:lauchpad等。

2007年4月12日星期四

中文乱码解决之路(二)

请教Yozx,看见他blog的《修改打开gedit的默认编码》。使用他的这种方法:

gconf-editor-->app-->gedit2-->preferences-->encodings

记入编码GB2312,但是部分文件还是乱码。
同时在ubuntu中文论坛,找到gedit不能显示GB2312文件。在/etc/vim/vimrc文件中添加如下代码解决了乱码问题:
let &termencoding=&encoding
set fileencodings=utf-8,gbk,ucs-bom,cp936

试着在gedit中将GB2312改为GBK,忽然发现乱码问题解决了。

2007年4月5日星期四

成功升级feisty

升级也是一件很简单的事。

终端输入运行

gksu "update-manager -c -d"

按照提示做就可以了。
建议使用中国科技大学的源:
deb http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse


使用校园,整个过程大约1个小时左右。

feisty界面做的漂亮了很多。中文支持做的很好。不过好像速度慢下来了。

2007年3月4日星期日

关于ubuntu

一、关于声音
今天,多媒体突然没有了声音。百思不得其解。经多方搜索发现是PCM被禁音了(原文[11楼])。双击右上角的小喇叭,将PCM静音去掉,久违的声音终于响起。


二、关于skype
一直以为是源中的skype有问题。今天发现原来是scim-qtimm包作怪。卸载之,skype即可正常登录。

三、关于scim
按照wiki.ubuntu.org.cn上在最后一步:

sudo im-switch -s scim-pinyin

始终提示错误。最后按照depp的精华文章使用:
im-switch -s scim-pinyin

重启X,scim图标赫然列在任务栏中。

四、关于源
大陆的源基本上都有一些问题。经多方寻找,发现电信使用CN99,网通可以使用台湾的。
CN99
deb http://ubuntu.cn99.com/ubuntu/ edgy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ edgy main restricted universe multiverse

台湾(我正在使用的源,一般在200K以上)
deb http://ftp.tw.debian.org/ubuntu/ edgy main multiverse restricted universe
deb http://ftp.tw.debian.org/ubuntu/ edgy-backports main multiverse restricted universe
deb http://ftp.tw.debian.org/ubuntu/ edgy-proposed main multiverse restricted universe
deb http://ftp.tw.debian.org/ubuntu/ edgy-security main multiverse restricted universe
deb http://ftp.tw.debian.org/ubuntu/ edgy-updates main multiverse restricted universe



北方交大在校园网中也很快,就是没有更新。
#deb http://mirror.bjtu.edu.cn/ubuntu/ edgy main restricted universe multiverse
#deb http://mirror.bjtu.edu.cn/ubuntu/ edgy-updates main restricted universe multiverse
#deb http://mirror.bjtu.edu.cn/ubuntu/ edgy-security main restricted universe multiverse
#deb http://mirror.bjtu.edu.cn/ubuntu/ edgy-backports main restricted universe multiverse


deb ftp://debian.ustc.edu.cn/ubuntu/ edgy main restricted universe multiverse
deb ftp://debian.ustc.edu.cn/ubuntu/ edgy-updates main restricted universe multiverse
deb ftp://debian.ustc.edu.cn/ubuntu/ edgy-security main restricted universe multiverse
deb ftp://debian.ustc.edu.cn/ubuntu/ edgy-backports main restricted universe multiverse

2007年2月28日星期三

在ubunt上安装DC++

debian用户:

aptitude install linuxdcpp0.691

也有deb包(下载
ubuntu可以参照也可以使用deb安装(点击参看)。该文提供ubuntu edgy上Linux DC++安装方案。
安装以下包:
cvs
scons
build-essential
libgtk2.0-dev
libglade2-dev
zlib1g-dev
libbz2-dev
libssl-dev
命令:
sudo apt-get install cvs scons build-essential libgtk2.0-dev libglade2-dev zlib1g-dev libbz2-dev libssl-dev


linux DC++目前还只是alpha版。所以我们只能如下安装:
下载:
cvs -d:pserver:anonymous@cvs.linuxdcpp.berlios.de:/cvsroot/linuxdcpp login

密码不用输入。
cvs -z3 -d:pserver:anonymous@cvs.linuxdcpp.berlios.de:/cvsroot/linuxdcpp co linuxdcpp

安装:
cd linuxdcpp
scons release=1 PREFIX=/usr/local
sudo scons install

运行:
linuxdcpp

将其加入菜单
[Desktop Entry]
Name=dcpp
Comment=Direct Connect client
Exec=/home/user/place_where_you_put_it/linuxdcpp/linuxdcpp
Path=/home/user/place_where_you_put_it/linuxdcpp/
Icon=/home/user/place_where_you_put_it/linuxdcpp/pixmaps/linuxdcpp.png
Terminal=false
Type=Application
Categories=Application;Network;

升级:
cvs update -d

注:升级时需要在linux DC++安装目录进行。若按上述步驟安装,是安装目录为:
cd ~/linuxcpp/


卸载:
sudo scons -c install

linux DC++官方连接:Linux DC++

PS:
1. 基本翻译该文
2. 连接比较慢,校内下载速度还是比较快的(刚测试8mib/s)

2007年1月18日星期四

OpenSSH安装和配置

其实OpenSSH配置一很简单。
注:client表示客服端,server表示服务器。本文以SSH 1.x

一、公钥安装
安装好OpenSSH。

:~# apt-get install ssh

查看你安装的版本:
:~$ ssh -V
OpenSSH_4.2p1 Debian-7ubuntu3.1, OpenSSL 0.9.8a 11 Oct 2005


二、生成公钥
一对密钥必须在客服端计算机上生成。公钥部分存放在需要连接的计算机上,而私钥部分存放在安全的客服端计算机上(缺省为~/.ssh/id_rsa)。使用ssh-keygen(1)工具生成key的代码如下:
client$ ssh-keygen -q -f ~/.ssh/id_rsa -t rsa
Enter passphrase (empty for no passphrase): …
Enter same passphrase again: …

也可以使用
client$ ssh-keygen

以上命令生成的密钥文件在~/.ssh/下,一般为:id_rsa(私钥)和id_rsa.pub(公钥)
如果远程主机使用的是SSH 2.x就要用这个命令:
client$ ssh-keygen -d

然后按提示作。
该命令生的密钥文件一般在~/.ssh/下,一般为id_dsa(私钥)和id_dsa.pub(公钥)。
可以使用如下代码查看你的私钥和公钥:
client/.ssh:$ cat filename

私钥一般是不能让别人知道的。当有其他人知道时,你需要重新生成密钥了。所要确保只用你自己知道,建议:
$ chmod go-w ~/
$ chmod 700 ~/.ssh
$ chmod go-rwx ~/.ssh/*


三、公钥发布
下面将公钥copy到你想要使用SSH登入的服务器计算机上。
# first, upload public key from client to server
client$ scp ~/.ssh/id_rsa.pub server.example.org:

# next, setup the public key on server
server$ mkdir ~/.ssh
server$ chmod 700 ~/.ssh
server$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
server$ chmod 600 ~/.ssh/authorized_keys
server$ rm ~/id_rsa.pub

确保id_rsa.pub已经写入authorized_keys,可以运行如下代码检测:
client$ ssh -o PreferredAuthentications=publickey server.example.org
Enter passphrase for key '/…/.ssh/id_rsa': …

server$

到这里你已经可以使用SSH登入远程的主机了。

四、配置客服端
OpenSSH 有三种配置方式:命令行参数、用户配置文件和系统级的配置文件("/etc/ssh/ssh_config")。命令行参数优先于配置文件,用户配置文件优先于系统配置文件。所有的命令行的参数都能在配置文件中设置。因为在安装的时候没有默认的用户配置文件,所以要把 "/etc/ssh/ssh_config"拷贝并重新命名为"~/.ssh/config"。
标准的配置文件大概是这样的:
[lots of explanations and possible options listed]
# Be paranoid by default
Host *
ForwardAgent no
ForwardX11 no
FallBackToRsh no

还有很多选项的设置可以用"man ssh"查看"CONFIGURATION FILES"这一章。
配置文件是按顺序读取的。先设置的选项先生效。
假定你在www.foobar.com上有一个名为"bilbo"的帐号。而且你要把"ssh-agent"和"ssh-add"结合起来使用并且使用数据压缩来加快传输速度。因为主机名太长了,你懒得输入这么长的名字,用"fbc"作为"www.foobar.com"的简称。你的配置文件可以是这样的:
Host *fbc
HostName www.foobar.com
User bilbo
ForwardAgent yes
Compression yes
# Be paranoid by default
Host *
ForwardAgent no
ForwardX11 no
FallBackToRsh no

你输入"ssh fbc"之后,SSH会自动地从配置文件中找到主机的全名,用你的用户名登录并且用"ssh-agent"管理的密匙进行安全验证。这样很方便吧!
用SSH连接到其它远程计算机用的还是"paranoid(偏执)"默认设置。如果有些选项没有在配置文件或命令行中设置,那么还是使用默认的"paranoid"设置。
在我们上面举的那个例子中,对于到www.foobar.com的SSH连接:"ForwardAgent"和"Compression"被设置为 "Yes";其它的设置选项(如果没有用命令行参数)"ForwardX11"和"FallBackToRsh"都被设置成"No"。
其它还有一些需要仔细看一看的设置选项是:
l CheckHostIP yes
这个选项用来进行IP地址的检查以防止DNS欺骗。
l CompressionLevel
压缩的级别从"1"(最快)到"9"(压缩率最高)。默认值为"6"。
l ForwardX11 yes
为了在本地运行远程的X程序必须设置这个选项。
l LogLevel DEBUG
当SSH出现问题的时候,这选项就很有用了。默认值为"INFO"。

参考:1. Jeremy Mates’s Domain
2. Netsword的博客

2007年1月13日星期六

中文乱码解决之路

一 usbdisk中文乱码
在usbdisk工作时,我直接把他拔下来。问题就这样产生了:原本可以显示中文,现在被“????”取代了。寻找解决方案,在ubuntu中文论坛里苦苦搜索。均以失败结束。此时已经凌晨1点了。明天还有六级考试。无奈之下只好作罢。
六级考完,回寝室,进入ubuntu@linux的qq群询问。SaD帮我一起想办法解决。给我提供了很多的解决方案。最后,SaD提供oneleaf写的U盘中文名乱码处理,我意识到可以解决了。但是我无法找到oneleaf提到的/usr/share/hal/fdi/95userpolicy/storage-policy.fdi文件。失望。幸好TubuX提供了另外一种解决方案:
在/etc/fstab中加上下面的内容:

/dev/sda1 /media/usb auto rw,user,noauto,utf8 0 0

使用之,完美解决。

二 firefox浏览网页时出现的中文乱码
但我访问石建的blog终是乱码。SaD提醒我那是编码问题。因此,我在firefox中做如下设置:
View->character encoding->auto-detect->chinese
完美解决。

非常感谢ubuntu@linux中SaD,以及ubuntu中文论坛中oneleaf,express与TubuX。

2006年12月13日星期三

About Installing Ubuntu

"I am prode of using OPENSOURCE" ,when I read the sentence on a book about scilab, I shaked. At that time I decided not to use windows, beacause of copyright.
At the same time, one friend gave me a CD with the ubuntu 5.10. I searched some howto, and tryed to install ubuntu on my computer. A pity, I failed. I tryed again and again. A error was still in the new OS. I gave up and went back windows.
Maybe it became custom, I used to input "linux&ubuntu" to the google.
"I have got the ubuntu 6.06" the same guy, who gave the CD to me, "This one is yours nows."
So I got the second CD about ubuntu. And I tryed again, failed too. I realised the reason was that I installed the 64bit OS, but more software doesn't support it, such as xrgsu supplicant. I exchanged my computer for a secondhand IBM.
I search more information about ubuntu & linux. I found linux support the hard on the second computer. Installed, seted, did… Fine, I made it.
Maybe I am fool to exchanged the computer. But I think I need a laptop, just study. And I am glod.