2007年5月10日星期四

遭受版权保护

google用的词挺有意思的,
遭受版权保护,呵呵
就知道有多么不愿意了..
阅读全文...

把平常用的firefox扩展记录一下,免得忘了

Extensions:
adblock plus
all-in-one gestures
downthemall
personal menu
xyzproxy
tab mix plus
Themes:
minifox
阅读全文...

关于压缩文件的处理

压缩解压
linux下怎么解后缀名是gzip的文件?
1.以.a为扩展名的文件:
#tar xv file.a
2.以.z为扩展名的文件:
#uncompress file.Z
3.以.gz为扩展名的文件:
#gunzip file.gz
4.以.bz2为扩展名的文件:
#bunzip2 file.bz2
5.以.tar.Z为扩展名的文件:
#tar xvZf file.tar.Z
或 #compress -dc file.tar.Z | tar xvf -
6.以.tar.gz/.tgz为扩展名的文件:
#tar xvzf file.tar.gz
或 gzip -dc file.tar.gz | tar xvf -
7.以.tar.bz2为扩展名的文件:
#tar xvIf file.tar.bz2
或 bzip2 -dc file.tar.bz2 | xvf -
8.以.cpio.gz/.cgz为扩展名的文件:
#gzip -dc file.cgz | cpio -div

9.以.cpio/cpio为扩展名的文件:
#cpio -div file.cpio
或cpio -divc file.cpio
10.以.rpm为扩展名的文件安装:
#rpm -i file.rpm
11.以.rpm为扩展名的文件解压缩:
#rpm2cpio file.rpm | cpio -div
12.以.deb为扩展名的文件安装:
#dpkg -i file.deb
13.以.deb为扩展名的文件解压缩:
#dpkg-deb --fsys-tarfile file.deb | tar xvf - ar p
file.deb data.tar.gz | tar xvzf -
14.以.zip为扩展名的文件:
#unzip file.zip
在linux下解压Winzip格式的文件
  要是装了jdk的话,可以用jar命令;还可以使用unzip命令。
直接解压.tar.gz文件
  xxxx.tar.gz文件使用tar带zxvf参数,可以一次解压开。XXXX为文件名。 例如:
$tar zxvf xxxx.tar.gz 各种压缩文件的解压(安装方法)

文件扩展名 解压(安装方法)

.a ar xv file.a
.Z uncompress file.Z
.gz gunzip file.gz
.bz2 bunzip2 file.bz2
.tar.Z tar xvZf file.tar.Z
compress -dc file.tar.Z | tar xvf -
.tar.gz/.tgz tar xvzf file.tar.gz
gzip -dc file.tar.gz | tar xvf -
.tar.bz2 tar xvIf file.tar.bz2
bzip2 -dc file.tar.bz2 | xvf -
.cpio.gz/.cgz gzip -dc file.cgz | cpio -div
.cpio/cpio cpio -div file.cpio
cpio -divc file.cpio
.rpm/install rpm -i file.rpm
.rpm/extract rpm2cpio file.rpm | cpio -div
.deb/install dpkg -i file.deb
.deb/exrtact dpkg-deb --fsys-tarfile file.deb | tar xvf -
ar p file.deb data.tar.gz | tar xvzf -
.zip unzip file.zip

bzip2 -d myfile.tar.bz2 | tar xvf

tar xvfz myfile.tar.bz2

x 是解压
v 是复杂输出
f 是指定文件
z gz格式

gzip
gzip[选项]要压缩(或解压缩)的文件名
-c将输出写到标准输出上,并保留原有文件。
-d将压缩文件压缩。
-l对每个压缩文件,显示下列字段:压缩文件的大小,未压缩文件的大小、压缩比、未压缩文件的名字
-r递归式地查找指定目录并压缩或压缩其中的所有文件。
-t测试压缩文件是正完整。
-v对每一个压缩和解压缩的文件,显示其文件名和压缩比。
-num-用指定的数字调整压缩的速度。
举例:
把/usr目录并包括它的子目录在内的全部文件做一备份,备份文件名为usr.tar
tar cvf usr.tar /home
把/usr 目录并包括它的子目录在内的全部文件做一备份并进行压缩,备份文件名是usr.tar.gz
tar czvf usr.tar.gz /usr
压缩一组文件,文件的后缀为tar.gz
#tar cvf back.tar /back/
#gzip -q back.tar
or
#tar cvfz back.tar.gz /back/
释放一个后缀为tar.gz的文件。
#tar zxvf back.tar.gz
#gzip back.tar.gz
#tar xvf back.tar

阅读全文...

unrar命令中如果含有(

unrar e filename.rar
如果filename中含有"(" , ")" , "[" ,"]" 的话,应该在括号前面加上"\"来替换
阅读全文...

rar for linux 命令用法说明

命 令格式: rar

a 向压缩包中添加文件
c 添加压缩注释
cf 添加文件注释
cw 向文件中写压缩注释
d 从压缩包中删除文件
e 在当前目录下解压缩文件
f 刷新压缩文件中的文件
i[par]= 在压缩包中查找指定字符串

k 锁住压缩包
l[t,b] 列出压缩包的内容[t(technical)详细列表,b(bare)简单列表]
m[f] 向压缩包里移动内容[f(files only)只移动文件]
p 在标准输出上打印文件内容
r 修复压缩包
rc 修复丢失卷
rn 重命名压缩的文件
rr[N] 添加数据恢复记录
rv[N] 创建恢复卷
s[name|-] 将压缩包转换为自解压文件,或从自解压文件转换为压缩包
t 测试压缩文件
u 更新压缩包中的文件
v[t,b] 列出压缩包中文件(冗长型)[t(technical)详细列表,b(bare)简单列表]
x 以全路径方式解压文件

- 停止switches扫描
ad 在目的路径后添加压缩文件名
ag[format] 用当前日期生成压缩文件名
ap 设置压缩包内部的路径
as 同步压缩内容
av 设置授权认证(注册版功能)
av- 禁用授权认证检查
c- 禁止内容显示
cfg- 不读取设置
cl 将名称转换为小写
cu 将名称转换为大写
df 在压缩完成后删除源文件
dh 打开共享文件
ds 对于固实压缩包,禁用名称排序
e 设置文件不包含的属性
ed 不添加空目录
en 不设置‘压缩文件尾标志’块
ep 在名称中去掉路径
ep1 在名称中去掉基本路径
ep2 展开全路径
f 刷新文件
hp[password] 对文件数据和文件头都进行加密
idp 禁用百分比显示
ierr 给标准错误输出发送所有信息
ilog[name] 生成错误日志文件(注册版功能)
inul 禁用所有信息
isnd 启用声效
k 锁住压缩包
kb 保留破损的解压文件
m<0..5> 设置压缩率(0-存储...3-默认...5-最大)
mc 设置高级压缩参数
md 以KB显示大小(64,128,256,512,1024,2048,4096 或者A-G)
ms[ext;ext] 指定存储的文件类型
o+ 覆盖已存在文件
o- 不覆盖已存在文件
ol 将符号链接保存为链接而不是文件
ow 保存或恢复文件属主/组
p[password] 设置密码
p- 不查询密码
r 对子目录内容循环
r0 只对通配符进行子目录内容循环
rr[N] 添加数据恢复记录
rv[N] 创建恢复卷
s[,v[-],e] 创建固实压缩包
s- 禁用固实压缩
sfx[name] 创建自解压压缩包
t 压缩后进行解压测试
ta 处理在(YYYYMMDDHHMMSS格式)日期后修改的文件
tb 处理在(YYYYMMDDHHMMSS格式)日期前修改的文件
tk 保留初始压缩时间
tl 设置压缩时间为最新文件的时间
tn
============================================
查看压缩包中的文件
$rar l XXX.rar 或者 $rar v XXX.rar
查看压缩包中的文件(只看有什么文件)
$rar lb XXX.rar 或者 $rar vb XXX.rar
查看压缩包中的文件(详细信息)
$rar lt XXX.rar 或者 $rar vt XXX.rar
============================================
把压缩包的内容解压到当前目录
$rar e XXX.rar
把压缩包的内容解压到指定目录,比如/home/yxd/tmp/下面
$rar e XXX.rar /home/yxd/tmp/
把压缩包解的内容压到指定目录,比如/home/yxd/tmp/下面,包含压缩包中的路径
$rar x XXX.rar /home/yxd/tmp/
============================================
压缩指定的一个文件,比如aaa,以默认压缩率
$rar a XXX.rar aaa
压缩指定的一个文件,比如aaa,以最大压缩率
$rar a -m5 XXX.rar aaa
压缩指定的一个目录下的所有文件,比如ddd目录下的所有文件
$rar a XXX.rar ddd/
压缩指定的一个目录下的所有文件,比如ddd目录下的所有文件和所有子目录
$rar a -r XXX.rar ddd/
压缩指定的一个目录下的所有文件,比如ddd目录下的所有文件和所有子目录,但是不包含空目录
$rar a -r -ed XXX.rar ddd/
压缩指定的一个目录下的所有文件,比如ddd目录,连目录也一起压缩,包括子目录
$rar a XXX.rar ddd
============================================
分卷压缩指定的一个文件,比如aaa,分卷大小为5000B
$rar a -v5 XXX.rar aaa
分卷压缩指定的一个文件,比如aaa,分卷大小为5k(5*1024B)
$rar a -v5k XXX.rar aaa
分卷压缩指定的一个文件,比如aaa,分卷大小为5B
$rar a -v5b XXX.rar aaa
============================================

来自:http://zhangjingking.spaces.live.com

阅读全文...

Azureus启动后立即崩溃的解决方法

比较被动的解决方法
sudo rm -r ~/.azureus
不过要在每次启动以前删除,每次都要重新设置,可以写一个azureus的启动脚本在每次启动以前自动删除改文件
未验证,不知道是不是真的有效。

一劳永逸的方法
安装使用azureus官方版本。
阅读全文...

编译Ati驱动时"176: Syntax error: Bad substitution"错误的解决

sudo ln -sf bash /bin/sh
and change it back to dash after the installer has finished:
sudo ln -sf dash /bin/sh

In ubuntu edgy the /bin/sh points to "dash" which only includes basic sh features. However, the ati installer calls /bin/sh and expects the "bash" shell (it should call /bin/bash directly instead).
as workarround you can change the link to point to bash before running the installer.
阅读全文...

编译安装内核

准备工作
sudo apt-get install build-essential bin86 kernel-package
sudo apt-get install libqt3-headers libqt3-mt-dev
内核及优化补丁请到南湖乐善共享ftp下载,下面给出官方下载链接:
ck : http://ck.kolivas.org/patches/2.6/2.6.14/2.6.14-ck9/patch-2.6.14-ck9.bz2 只有不到50k的小东西,不要看不起它阿。
kernel : http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.tar.bz2 本次行动的核心。

给内核打补丁
偶在编译2.6.18.2和2.6.18.3内核过程中发现打过补丁以后的内核会编译错误,不知道是不是特例
复制内核源码去/usr/src 代码:
sudo cp linux-2.6.14.tar.bz2 /usr/src
解压内核源码
cd /usr/src
sudo tar xvjf linux-2.6.14.tar.bz2
检查/usr/src下有没有linux这个链接,如果有你可以改下名字
sudo mv linux linux.bak
建立一个新的叫做linux的链接 代码:
sudo ln -s ./linux-2.6.14 linux
然后进入linux这个目录 代码:
cd linux
打补丁
sudo bzcat /path to patch/patch-2.6.14-ck9.bz2 | patch -p1

设置内核

设置内核相当麻烦,要看一大堆的选项,而且最要命的是,它问的问题都非常地层,很多我都不知道,所以我复制了我现有的设置过来,有耐心的朋友可以自己来。
复制设置 代码:
sudo cp /boot/config-`uname -r` .config

开始设置
sudo make xconfig

以下部分选项推荐选择,其他选项请个位自己尝试
Processor type and features 部分包含了处理器的特征。
Subarchitecture Type 必须选PC
Processor family 这就是问处理器了,选自己的。
preemption Model 根据自己的情况选 从上到下是服务器 桌面 低配置桌面。
High Memory Support 大内存支持,如果内存小于等于1g就使用off。
Timer frequency 建议改为1000hz。
kexec system call 这个是快速重启系统,启动它需要另外一个kexec-tool的支持
IO Schedulers 部分包含了IO的设置。
推荐关闭Anticipatory I/O scheduler Deadline I/O scheduler 仅仅留下CFQ。

开始编译

编译有很传统的方法──make,可是为了我们以后也方便使用,所以我们利用debian类系统的特权,制作个deb包出来。
方法如下
cd /usr/src/linux
sudo -s -H
make-kpkg clean
sudo make-kpkg --initrd -revision=diy1 kernel_image kernel_headers
注意:最后的命令输入后,过程十分漫长,各位朋友可以弄点零食去消磨下时间。

安装

当你的耐心差不多消磨至尽的时候,啊终于完成了,/usr/src目录下会出现两个东西,一个是内核的安装包,另外一个是内核headers的安装包,把他们装好
sudo dpkg -i /usr/src/kernel-image-2.6.14*.deb
sudo dpkg -i /usr/src/kernel-headers-2.6.14*.deb
这样重启以后,就可以试试新的内核了。

PS:附上E文版的指南

## Authors: John Hornbeck, Alexander Poslavsky
## Freely borrowed from: Creating custom kernels with Debian's kernel-package system' by Kevin McKinley
## this means some parts were copied verbatim...
##
== Introduction ==

The Linux kernel is the heart of your Ubuntu Operating System. The kernel that comes with Ubuntu should contain all of the drivers you need, but just in case you would like to tweak your kernel or if for some reason you need to recompile for some special reason this guide will help you.

A less detailed document that shows essentially the same steps as this one can be found in the KernelCompileHowto.

== Preparation ==

You will need the ''build-essential'' ''fakeroot'' and ''kernel-package'' packages, to build a kernel.
sudo apt-get install build-essential fakeroot kernel-package
You will need the ''gcc-3.4'' compiler for 2.6 series kernels
sudo apt-get install gcc-3.4
You will need developer libraries for the kernel configuration tools
sudo apt-get install libqt3-mt-dev libncurses-dev
If apt-get cannot locate ''libqt3-mt-dev'', try ''libqt3-dev'' (the older name)
Kernels are built in the /usr/src/ directory. To work there, add yourself to the src group.
sudo adduser my_username src
Adding user my_username to group src...
Done.
Log out and log back in, or use su to log in again:
su my_username
groups
my_username src audio adm dialout cdrom floppy video plugdev lpadmin
Will list all the groups you are in, src should be one of them.

== Obtaining the Source ==

sudo apt-get install linux-source
It will download and place the source in ''/usr/src''

== Unpacking the Source ==

I will use the 2.6.8.1 kernel as an example since this is the latest kernel Ubuntu ships at the moment of writing.
cd /usr/src
ls -l
linux-source-2.6.8.1.tar.bz2
If you see a link called ''linux'' to an older kernel source remove the link. (otherwise building will '''not''' be successful.)

extract the archive with
tar jxvf linux-source.tar.bz2
This should create a directory called linux-source-2.6.8.1 owned by you and the src group.
Create a link called linux to the kernel source
ln -s linux-source-2.6.8.1 linux
Check if it's all in place. You should see something like:
ls
linux@ linux-source-2.6.8.1/ linux-source-2.6.8.1.tar.bz2

== Configuring the kernel ==

There are several ways to configure the kernel. You will probably use "xconfig". To get the config that the current running kernel was build with:
cd linux
ls /boot/config-2.6.15-22-386
/boot/config-2.6.15-22-386
cp /boot/config-2.6.15-22-386 .config
(If you have more than one /boot/config, use the most recient one.)
There are two ways to configure the kernel - using an X-based menu or using an ncurses (command-line) menu. To use the X-based menu:
make xconfig
If you are not using X, or don't want to use your mouse:
make menuconfig
Warning: you need to ensure that, at a minimum, your bus, disk, and root filesystem drivers are statically compiled into your kernel. Otherwise, your new kernel image won't boot. See the KernelBuildpackageHowto for a technique that doesn't require reconfiguring the kernel.

Question: Could some one confirm that since we start out by copying a config file from /boot, does that mean that if we don't configure we will end up with a copy of the running kernel? Or do we somehow still start from scratch? A: This seems to be the case.



== Building your kernel ==

=== make-kpkg ===

To build the kernel you'll invoke "make-kpkg", a script which automates and replaces the sequence "make dep; make clean; make bzImage; make modules". Take a few minutes and read over the manual page for make-kpkg.
The make-kpkg command line can be complex and at first intimidating. Its basic syntax is
make-kpkg
Your target will be "kernel_image". Let's examine two of the more important and common options, "--append-to-version" and "--revision".

=== --append-to-version ===

The first option lets you specify an addition to the kernel version, which then becomes part of the kernel's name. You may use alphanumeric characters, "+" and "." (period or full stop); do not use underscore "_".
Here's the kernel I'm running now:
uname -a
Linux da5id 2.6.8.1-2-k7 #1 Sat Sep 18 11:23:11 BST 2004 i686 GNU/Linux

You should avoid using --append-to-version values such as "-686", "-K7", and "-sparc". They are commonly used for Debian pre-compiled kernels.

Kernel modules live in subdirectories of /lib/modules; each kernel has its own subdirectory. Every time you install a kernel image with a new name, the package installer creates a new subdirectory of /lib/modules to hold its modules.

This means that by using a new value for --append-to-version each time you build a kernel image, you can ensure that the new kernel will have a new name, and that its modules won't conflict with those of other kernels.

If you install a kernel with the same name (the same version and --append-to-version) as an already-installed kernel, installing the new kernel package will overwrite the old kernel and its modules. You will be warned and offered the chance to abort. Take it. Use another value for --append-to-version and rebuild.

=== --revision ===

Another make-kpkg option is "--revision", which affects the name of the Debian package itself but not the kernel name. As with --append-to-version, you may use only alphanumeric characters, "+" and ".". Do not use underscores "_". If you do not supply a value for --revision, make-kpkg will use "10.00.Custom".

Using different values of --revision will not prevent conflicts between kernels with the same name. They are just for you to see the difference, for example recompiling the same kernel with a very small change.

=== Kernel package names ===

Debian kernel-image file names have the form
kernel-image-(kernel-version)(--append-to-version)_(--revision)_(architecture).deb
The package name is everything before the first underscore.
ls
kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb

Now you can see why underscores are not allowed in make-kpkg options — they separate the elements of package names.

I recommend using a different --append-to-version value for each kernel you compile, and letting make-kpkg assign the default revision. Date-based values work for me, but you are free to invent your own scheme.

Please read /usr/share/doc/kernel-package/README.gz if --append-to-version or --revision is unclear, or if you plan on using options different from the ones I suggest. (One way to do this is "zless README.gz".) Ignore the discussions of flavours and epochs until you are more familiar with make-kpkg and with Debian packages generally; they are not likely to be useful to you now.

=== fakeroot ===

When you added yourself to the src group you made it possible to do most kernel-package work with normal user privilege. However the files that are part of a kernel package (like the kernel and kernel modules) will be owned by root and run with root privilege; they must be created with root privilege.

Using fakeroot you can start make-kpkg as a normal user, and most of the job will be run with normal permissions. Near the end of the job, fakeroot will simulate a root environment to create the kernel-image package.

The manual page for make-kpkg describes one way to use fakeroot; we will use the simpler method of putting "fakeroot" at the beginning of the make-kpkg command line, like this:

fakeroot make-kpkg

=== Making the kernel image ===

Finally! The time has arrived — you're ready to make the kernel image.
fakeroot make-kpkg clean
Then do:
fakeroot make-kpkg --append-to-version=.181004 kernel_image --initrd binary
Now all you can do is wait for the computer to finish. Take a few minutes off and enjoy yourself while the computer does its fair share of the work.

== Installing the kernel-image package ==

Once the kernel image is built you will install the kernel-image package, which includes the kernel and its modules. First check to make sure it was built successfully by changing to the /usr/src directory and listing its contents:
cd ..
ls
kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb
linux@
linux-source-2.6.8.1/
linux-source-2.6.8.1.tar.bz2
There it is! Notice how the --append-to-version value became part of the kernel name.

To install the kernel and all its modules:
sudo dpkg -i kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb

To install a kernel-image package from disk (as opposed to installing from a Debian archive) use the full file name. You can use tab for command-line-completion.

If everything went well, all you need to do now is reboot. If your new kernel doesn't boot, boot your previous kernel or insert your boot floppy and restart. Go back to Configuring the kernel, tweak your configuration, and try again.

== Wrapping it all up ==

=== Hold that kernel! ===

If you used --append-to-version you shouldn't need to worry about apt-get trying to "upgrade" your kernel. If you're paranoid (it is out to get you) you can make sure by doing this:
echo "kernel-image-2.6.8.1.181004 hold" | sudo dpkg --set-selections

Of course substitute the real name of your kernel. To refer to a package that dpkg knows about (an installed package or one in an archive's list) use the package name rather than the full file name. Also, the "|" character is made by typing Shift-\. Check that the package really is on hold; if it is you should see:
dpkg --get-selections | grep kernel-image
kernel-image-2.6.8.1.181004_10.00.Custom_i386.deb hold

Somebody should write about holding packages, what it does etc.

=== Removing the symlink ===

Next, you should get rid of the symlink you created in the /usr/src directory. There are several reasons for this:

1. The next time you download a kernel it might not be from a Debian archive. When you expand the source tarball it could overwrite your old source tree right through the old symlink. Bummer.
2. The next time you download the kernel source from the Debian archive, you might expand the source into its own tree without problems. But since you already have a symlink called "linux" in the src directory, you might go ahead and compile (forgetting of course that it's linked to your old source tree.)
3. When you download patches or other source code into a specific source tree, you don't want anything else messing with it. By removing the symlink you might prevent #1 from happening.

To remove the link do this:
rm /usr/src/linux

=== Backing up your kernel ===

While not required, it's a good idea to back up your custom kernel .deb. Copy it to a secure undisclosed location.

Once your kernel has been packaged with its modules, you can install it on any machine that has the hardware you specified in your kernel configuration. You could even reinstall it on your current machine after reinstalling your system.

=== Making a new boot diskette ===

Create another boot diskette, this one for the kernel you just installed. Grab another floppy — it's not a good idea to overwrite your old boot disk; you haven't been using your new kernel long enough to be sure it works. A boot disk is only necessary if you messed up your system.
cd /boot
mkboot /boot/vmlinuz-2.4.18.030320

=== Building your next kernel ===

If you want to rebuild your kernel because you just bought a new sound card, or you want to enable a new feature you forgot to include the first time, all you need to do is reconfigure, do "fakeroot make-kpkg clean", and rebuild with a different value for --append-to-version. Your session should look something like this:
cd /usr/src
ln -s linux-source-2.6.8.1 linux
cd linux
make xconfig
(reconfigure your kernel)
fakeroot make-kpkg clean
(lots of cleaning here)
fakeroot make-kpkg --append-to-version=.181004 kernel_image --initrd binary
(screens and screens of stuff)

=== Using an existing configuration ===

When you installed your custom kernel, its configuration was copied to /boot/config-x.y.z. You may want to squirrel it away in another location (or several other locations) for safekeeping or later re-use.

Suppose that just last week you picked your way through the maze of options, and settled on a configuration that supports all the hardware and features you want. Today a new stable kernel is released and of course you want to upgrade right away. Is it necessary to start from scratch configuring the new kernel? Not at all.

Download and expand the new source tarball and make a new symlink. Then change directory to /usr/src/linux, copy your existing configuration there and do "make oldconfig":
cp /boot/config-2.4.18.030320 .config
make oldconfig

You'll be asked questions about new kernel options. It's generally safe to answer "no" to all the questions; make notes of the new options that interest you.

After you finish oldconfig you can run xconfig or menuconfig to review your selections, change your answers, or investigate the options you noted.

Build the latest stable kernel with your own configuration.
fakeroot make-kpkg clean

== Checklist ==

1. Make backup boot diskette.
2. Install required packages.
1. build-essential fakeroot kernel-package
3. Setup source tree.
1. Add yourself to src. Logout, login. Use groups to confirm.
2. Remove old symlink.
3. Expand source tarball.
4. Make and check new symlink.
4. Configure kernel.
1. Use old config file if available. cp /boot/config-x.y.z .config
2. make oldconfig or make xconfig or make menuconfig.
3. Save .config file somewhere else for later use.
5. Build kernel-image package.
1. fakeroot make-kpkg clean
2. fakeroot make-kpkg --append-to-version=alpha+numeric.but.no.underscore kernel_image --initrd binary
6. Install kernel-image package.
1. dpkg -i kernel-image-x.y.z.yy.mm.dd_10.00.Custom_i386.deb
2. Reboot.
7. What next?

1. Hold your package. echo "kernel-image-x.y.z.yymmdd hold" | dpkg --set-selections
2. Remove symlink.
3. Back up kernel image.
4. Remove old kernel image packages.
5. Make new boot diskette.
阅读全文...

安装文泉驿字体以后firefox变慢的解决方法

使用的是Debian(Ubuntu/ArchLinux),在安装了xfonts-wqy包之后发现firefox显示速度变慢
xfonts-wqy是carlosliu和caiqian两个人维护的一个文泉驿字体deb安装包,他们采用了压缩的pcf格式,而pcf.gz格式的字体,特别是在显示中文这样的大字符集时,系统渲染速度比较慢。把字体文件解压可以大大提高显示速度,方法为
cd /path/to/wqy/font/
sudo gunzip wenquanyi*pcf.gz
sudo rm fonts.dir fonts.scale fonts.cache*
sudo mkfontdir .
sudo cp fonts.dir fonts.scale
sudo fc-cache -fv

PS:也可解压以后直接修改fonts.dir 和 fonts.scale 文件,去掉文件中.gz 字段,然后刷新字体缓存。
修改以后可能会出现系统退出对话框字体变为方框的情况,我的重启一次以后就自动恢复了,如果不能自动恢复的话,就 sudo apt-get remove xfonts-wqy ,然后重建fonts.dir和fonts.scale文件,刷新字体缓存。
阅读全文...

easywine 安装

注意:以下(...)为参考信息
1、为今后自动升级做好准备
sudo gedit /etc/apt/sources.list
(http://www.winehq.org/site/download-deb)
deb http://wine.budgetdedicated.com/apt dapper main
deb-src http://wine.budgetdedicated.com/apt dapper main
2、下载并手动安装最新版本
(http://www.linuxgame.org/bbs/?thread-1931-1-1.html)
(http://wine.budgetdedicated.com/archive/index.html)
wget -c http://software.lupaworld.com/pub/deman/EasyWine4G.sh
wget -c http://software.lupaworld.com/pub/deman/plug.tar.bz2
wget -c http://wine.budgetdedicated.com/archive/ubuntu/dapper/wine_0.9.20~winehq0~ubuntu~6.06-1_i386.deb
sudo dpkg -i wine_0.9.20~winehq0~ubuntu~6.06-1_i386.deb
wine
(sudo -s -H)
chmod +x EasyWine4G.sh
./EasyWine4G.sh
cd ~
rm -r .wine
(rm -r .wine_c)
EasyWine (or sudo bash /usr/bin/EasyWine)

安装结束
(you can view .gnome/apps/Wine/)

添加你自己的“应用程序”
sudo gedit /usr/share/applications/ie6.desktop

[Desktop Entry]
Name=Internet Explorer
Exec=wine "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE"
Type=Application
Comment=Browser Client(wine)
Icon=/home/king/.gnome/apps/Wine/Programs/Internet Explorer.xpm
Categories=Application;Network;

sudo gedit /usr/share/applications/wmp64.desktop

[Desktop Entry]
Name=Windows Media Player 6.4
Exec=wine "C:\\Program Files\\Windows Media Player\\mplayer2.exe"
Type=Application
Comment=Media Player(wine)
Icon=/home/king/.gnome/apps/Wine/Programs/Windows Media Player 6.4.xpm
Categories=Application;AudioVideo;Player;
注意修改Icon的路径。
好了,OK了
PS:EasyWine貌似还不支持最新的wine,所以最好是用wine_0.9.20来安装,装好easywine以后再把wine升 级到edgy源里的0.9.22,不要装最新的0.9.25。
阅读全文...

关于 WINE 在 UTF-8 环境下运行缓慢的修正

sudo gedit /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
(用 # 注释掉 GBK 段)
# fs3 class (Chinese Han Character GBK)
fs3 {
charset {
name GBK-0:GLGR
}
font {
primary GBK-0:GLGR
substitute GB13000.1993-1:GLGR
}
}
修改为
# fs3 class (Chinese Han Character GBK)
###fs3 {
### charset {
### name GBK-0:GLGR
### }
### font {
### primary GBK-0:GLGR
### substitute GB13000.1993-1:GLGR
### }
###}
阅读全文...

安装Easywine出现Syntax error错误的解决

su
then:
bash /usr/bin/EasyWine
阅读全文...

开机的时候如果出现提示$home/.dmrc... 提示的解决方法

开机的时候如果出现提示$home/.dmrc无法写入,权限应为644之类的情况,请用以下方法解决:
chmod 755 -R ~/
sudo chown -R latteye:latteye /home/latteye
sudo chmod 644 /home/latteye/.dmrc
sudo chown latteye:latteye /home/latteye/.dmrc

来自于 latteye's blog
阅读全文...

Opera Firefox中ed2k链接直接加入amule下载的方法

Opera
::by thermoman (Marcel Meckel), ender and Jacobo221

Clean way
In Opera go to Tools->Preferences->Paths and Programms->Add...
In the "Protocol" field enter ed2k
In the "Path" or "Open with another application" field enter /path/to/ed2k
Dirty way
If he above instructions didn't work, you can try edit /etc/opera6rc as root or ~/.opera/opera6.ini as non-root and setting:
[User Prefs]
TrustedExternalURLProtocols=ed2k
[Trusted Applications]
ed2k=ed2k

Mozilla 1.7 (or later) & Firefox 0.9 (or later)
::by GhePeU

Mozex doesn't work anymore with Mozilla 1.7 and Firefox 0.9. There is an alternate method that seems to be working with both of them:
* Remove MozEx if installed or at least remove the ed2k input from it (only if MozEx is installed)
* Insert about:config in the address bar
* Right click on the list, select New, then Boolean; insert network.protocol-handler.external.ed2k as Preference Name and true as Value
* Now another right click, select New and String; insert network.protocol-handler.app.ed2k as Preference Name and /path/to/ed2k (path to where the file is installed on your system) as Value.

PS: Someone said it needs amule-utils, so you'd better run sudo apt-get install amule-utils first.
阅读全文...

Ubuntu_Ati_driver_install

Ati 官方驱动安装 >>for ubuntu 6.10
注意,每次内核升级后都必须先把以前安装的驱动彻底删除,然后重新编译安装
sudo apt-get update
sudo apt-get install module-assistant build-essential
sudo apt-get install fakeroot dh-make debconf libstdc++5 linux-headers-$(uname -r)
创建deb包
sudo ln -sf bash /bin/sh
bash ati-driver-installer-8.31.5-x86.x86_64.run --buildpkg Ubuntu/edgy
sudo ln -sf dash /bin/sh
安装驱动
sudo dpkg -i xorg-driver-fglrx_8.31.5-1*.deb
sudo dpkg -i fglrx-kernel-source_8.31.5-1*.deb
sudo dpkg -i fglrx-control_8.31.5-1*.deb
移除旧的fglrx
sudo rm /usr/src/fglrx-kernel*.deb
编译
sudo module-assistant prepare
sudo module-assistant update
sudo module-assistant build fglrx
cd /usr/src
sudo dpkg -i fglrx-kernel-*
sudo depmod -a
配置驱动
注意,如果以前装过fglrx驱动,此步无须再做
sudo dpkg-reconfigure xserver-xorg
在选择驱动时,选择fglrx
然后
sudo aticonfig --ovt=Xv
并且
sudo gedit /etc/X11/xorg.conf
添加一段
Section "Extensions"
Option "Composite" "0"
EndSection
上面这段很重要!

重启系统
确认驱动是否正确安装
$ fglrxinfo
显示:
display: :0.0 screen: 0

OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: MOBILITY RADEON X600 SE Generic
OpenGL version string: 2.0.6174 (8.31.5)

$ glxinfo | grep render
显示:
direct rendering: Yes
.........

如果你碰到2D加速很慢的情况,在/etc/X11/xorg.conf 的 Device section(就是有fglrx的那段)中添上
Option "XaaNoOffscreenPixmaps"

For feisty>>>
安装自带驱动edgy的8.28.8驱动/feisty的8.34.8驱动,支持8500及以上显卡

如果你曾经用过以上方法,需要先执行
代码:
sudo lrm-manager
,并把原来装过的4个包彻底删除。

安装驱动
代码:
sudo apt-get update
sudo apt-get install linux-restricted-modules-$(uname -r)
sudo apt-get install xorg-driver-fglrx fglrx-control
sudo depmod -a

配置驱动
代码:
sudo dpkg-reconfigure xserver-xorg
在选择驱动时,选择fglrx

或者用
代码:
sudo aticonfig --initial -f
以上方法只能两者择一。LCD显示器的推荐用第二种。

然后
代码:
sudo aticonfig --ovt=Xv
并且
代码:
sudo gedit /etc/X11/xorg.conf
添加两段
代码:
Section "Extensions"
Option "Composite" "0"
EndSection

Section "ServerFlags"
Option "AIGLX" "off"
EndSection
注意,上面这一段非常重要!
特别声明:7.04中千万不要加Option "AIGLX" off 这一段,否则进不去x。


重启系统

确认是否正常运行
代码:
fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9600 Generic
OpenGL version string: 2.0.6011 (8.28.8)


整理自: http://forum.ubuntu.org.cn/viewtopic.php?t=26188

阅读全文...