<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>走出Windows &#187; 使用</title>
	<atom:link href="http://www.killwin.com/articles/category/linux/use/feed" rel="self" type="application/rss+xml" />
	<link>http://www.killwin.com</link>
	<description>抛弃Windows就是走向高效率</description>
	<lastBuildDate>Fri, 23 Sep 2011 12:50:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>kill命令杀死父进程的同时杀死子进程的方法</title>
		<link>http://www.killwin.com/articles/327.html</link>
		<comments>http://www.killwin.com/articles/327.html#comments</comments>
		<pubDate>Mon, 15 Nov 2010 03:05:53 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[使用]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=327</guid>
		<description><![CDATA[命令如下 kill -TERM pid 这样就可以在杀死父进程之前通知子进程：“你们老爹快要死了，你们先跳楼去吧”，然后kill掉父进程，世界干净了 PS: 这个命令可以这么使用 kill -TERM $(cat /var/run/php-cgi.pid) 类似上面的例子，从pid文件读取父进程pid，然后杀死，实现全自动杀进程]]></description>
			<content:encoded><![CDATA[<p>命令如下</p>
<blockquote><p>kill -TERM pid</p></blockquote>
<p>这样就可以在杀死父进程之前通知子进程：“你们老爹快要死了，你们先跳楼去吧”，然后kill掉父进程，世界干净了</p>
<p>PS:<br />
这个命令可以这么使用</p>
<blockquote><p>
kill -TERM $(cat /var/run/php-cgi.pid)
</p></blockquote>
<p>类似上面的例子，从pid文件读取父进程pid，然后杀死，实现全自动杀进程</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/327.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Shell 中进行条件判断</title>
		<link>http://www.killwin.com/articles/276.html</link>
		<comments>http://www.killwin.com/articles/276.html#comments</comments>
		<pubDate>Tue, 11 May 2010 07:41:21 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[编程]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=276</guid>
		<description><![CDATA[一般用法是 if [ 条件 ]; then 执行语句 fi 要注意的是，条件要包含在方括号内，且条件和方括号相连的地方要有空格隔开，不然会出错 下面是转自网上的各种条件的写法 1、比较文件 -b file 若文件存在且是一个块特殊文件，则为真 -c file 若文件存在且是一个字符特殊文件，则为真 -d file 若文件存在且是一个目录，则为真 -e file 若文件存在，则为真 -f file 若文件存在且是一个规则文件，则为真 -g file 若文件存在且设置了SGID位的值，则为真 -h file 若文件存在且为一个符合链接，则为真 -k file 若文件存在且设置了"sticky"位的值 -p file 若文件存在且为一已命名管道，则为真 -r file 若文件存在且可读，则为真 -s file 若文件存在且其大小大于零，则为真 -u file 若文件存在且设置了SUID位，则为真 -w file 若文件存在且可写，则为真 -x file 若文件存在且可执行，则为真 -o file [...]]]></description>
			<content:encoded><![CDATA[<p>一般用法是 </p>
<blockquote><p>if [ 条件 ]; then<br />
    执行语句<br />
fi</p></blockquote>
<p>要注意的是，条件要包含在方括号内，且条件和方括号相连的地方要有空格隔开，不然会出错<br />
下面是转自网上的各种条件的写法</p>
<blockquote><p>1、比较文件<br />
-b file            若文件存在且是一个块特殊文件，则为真<br />
-c file            若文件存在且是一个字符特殊文件，则为真<br />
-d file            若文件存在且是一个目录，则为真<br />
-e file            若文件存在，则为真<br />
-f file            若文件存在且是一个规则文件，则为真<br />
-g file            若文件存在且设置了SGID位的值，则为真<br />
-h file            若文件存在且为一个符合链接，则为真<br />
-k file            若文件存在且设置了"sticky"位的值<br />
-p file            若文件存在且为一已命名管道，则为真<br />
-r file            若文件存在且可读，则为真<br />
-s file            若文件存在且其大小大于零，则为真<br />
-u file            若文件存在且设置了SUID位，则为真<br />
-w file            若文件存在且可写，则为真<br />
-x file            若文件存在且可执行，则为真<br />
-o file            若文件存在且被有效用户ID所拥有，则为真<br />
2、比较字符串<br />
-z string          若string长度为0，则为真<br />
-n string          若string长度不为0，则为真<br />
string1 = string2  若两个字符串相等，则为真<br />
string1 != string2 若两个字符串不相等，则为真<br />
3、比较整数<br />
int1 -eq int2      若int1等于int2，则为真<br />
int1 -ne int2      若int1不等于int2，则为真<br />
int1 -lt int2      若int1小于int2，则为真<br />
int1 -le int2      若int1小于等于int2，则为真<br />
int1 -gt int2      若int1大于int2，则为真<br />
int1 -ge int2      若int1大于等于int2，则为真</p>
<p>!expr              若expr为假则复合表达式为真。expr可以是任何有效的测试表达式<br />
expr1 -a expr2     若expr1和expr2都为真则整式为真<br />
expr1 -o expr2     若expr1和expr2有一个为真则整式为真<br />
注意：作为一个通用的规则，你应该在所有的$变量加上双引号来避免shell发生不正确的变量的替代。例如[ "$XX" -eq 3]中，如果XX为空而没有”“的就变成了[ -eq 3]这样会导致test命令语法错误。加上双引号之后就是["" -eq 3]，这样保证test命令成功运行而得到正确的结果。</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/276.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LVM 下增加减少磁盘分区容量</title>
		<link>http://www.killwin.com/articles/238.html</link>
		<comments>http://www.killwin.com/articles/238.html#comments</comments>
		<pubDate>Wed, 24 Mar 2010 07:26:27 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=238</guid>
		<description><![CDATA[以我目前使用的为例子 VG名字是 sp /data 是从 /dev/mapper/vg-data 挂载来的 那么 #umount /data 增加2G空间 # lvextend -L +2G /dev/sp/sp_data # e2fsck -f /dev/mapper/vg-data 如果是ReiserFS，则使用reiserfsck -f /dev/mapper/vg-data # resize2fs /dev/mapper/vg-data 如果是ReiserFS，则使用 resize_reiserfs /dev/mapper/vg-data # mount /dev/mapper/vg-data /data 减少2G空间 # lvresize -L -2G /dev/mapper/vg-data # e2fsck -f /dev/mapper/vg-data # resize2fs /dev/mapper/vg-data # mount /dev/mapper/vg-data /data 如果第一步无法umount，提示设备忙的话，可以按照下面的方法查找使用设备的进程： &#160; server ~ # [...]]]></description>
			<content:encoded><![CDATA[<p>以我目前使用的为例子</p>
<p>VG名字是 sp<br />
/data 是从 /dev/mapper/vg-data 挂载来的<br />
那么</p>
<blockquote><p>#umount /data</p></blockquote>
<p>增加2G空间</p>
<blockquote><p># lvextend -L +2G /dev/sp/sp_data<br />
# e2fsck -f /dev/mapper/vg-data 如果是ReiserFS，则使用reiserfsck -f /dev/mapper/vg-data<br />
# resize2fs /dev/mapper/vg-data 如果是ReiserFS，则使用 resize_reiserfs /dev/mapper/vg-data<br />
# mount /dev/mapper/vg-data /data</p></blockquote>
<p>减少2G空间</p>
<blockquote><p># lvresize -L -2G /dev/mapper/vg-data<br />
# e2fsck -f /dev/mapper/vg-data<br />
# resize2fs /dev/mapper/vg-data<br />
# mount /dev/mapper/vg-data /data</p></blockquote>
<p>如果第一步无法umount，提示设备忙的话，可以按照下面的方法查找使用设备的进程：</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">&nbsp;
server ~ # fuser -m /dev/mapper/vg-data
/dev/mapper/vg-data:  5203c
server ~ # ps aux|grep 5203
mysql     5203  0.4  0.8 174396 33192 ?        Ssl  May01   1:30 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/data/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
root     22068  0.0  0.0   1920   660 pts/0    S+   00:39   0:00 grep --colour=auto 5203</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/238.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL修改数据目录后无法启动</title>
		<link>http://www.killwin.com/articles/219.html</link>
		<comments>http://www.killwin.com/articles/219.html#comments</comments>
		<pubDate>Wed, 17 Mar 2010 17:59:51 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[使用]]></category>
		<category><![CDATA[软件]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=219</guid>
		<description><![CDATA[Ubuntu 9.10 有个apparmor. my.cnf里面有段注释 [mysqld] # # * Basic Settings # # # * IMPORTANT # If you make changes to these settings and your system uses apparmor, you may # also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. # 查看/etc/apparmor.d/usr.sbin.mysqld, 的确是一些目录的权限设置. 把/var/lib/mysql 改成 /data/mysql. # /etc/init.d/apparmor restart 在启动mysql就可以成功了]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 9.10 有个apparmor.<br />
my.cnf里面有段注释</p>
<blockquote><p>[mysqld]<br />
#<br />
# * Basic Settings<br />
#<br />
#<br />
# * IMPORTANT<br />
# If you make changes to these settings and your system uses apparmor, you may<br />
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.<br />
#</p></blockquote>
<p>查看/etc/apparmor.d/usr.sbin.mysqld, 的确是一些目录的权限设置. 把/var/lib/mysql 改成 /data/mysql.</p>
<blockquote><p># /etc/init.d/apparmor restart</p></blockquote>
<p>在启动mysql就可以成功了</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/219.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下转换视频格式的方法</title>
		<link>http://www.killwin.com/articles/169.html</link>
		<comments>http://www.killwin.com/articles/169.html#comments</comments>
		<pubDate>Wed, 03 Feb 2010 05:00:27 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[软件]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=169</guid>
		<description><![CDATA[将avi格式视频转换成mpg的可以刻录vcd格式的命令 ffmpeg -i 11.avi -target vcd 11.mpg 将rmvb转换为avi格式 mencoder 11.rmvb -oac mp3lame -lameopts preset=64 -ovc xvid -xvidencopts bitrate=600 -of avi -o 11.avi]]></description>
			<content:encoded><![CDATA[<p>将avi格式视频转换成mpg的可以刻录vcd格式的命令</p>
<blockquote><p>ffmpeg -i 11.avi -target vcd 11.mpg</p></blockquote>
<p>将rmvb转换为avi格式</p>
<blockquote><p>mencoder 11.rmvb -oac mp3lame -lameopts preset=64 -ovc xvid -xvidencopts bitrate=600 -of avi -o 11.avi</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/169.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu命令行下连接 Windows 2003 PPTP VPN服务器--译文</title>
		<link>http://www.killwin.com/articles/127.html</link>
		<comments>http://www.killwin.com/articles/127.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 13:05:43 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[网络相关]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PPTP]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[命令行]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=127</guid>
		<description><![CDATA[引言:前段时间一直没空翻译，所以直接贴了英文版的在上面，可能难为了那些英文比我还烂的童鞋（本人至今公共英语四级未通过），今天拿来翻译下，上面一行是英文，下面一行是中文，翻译的不好的地方请大家指教 Installing the Client Program 安装客户端程序 Install PPTP Client from the Ubuntu Project: 从Ubuntu Project安装PPTP客户端 apt-get install pptp-linux 上面那行是命令，在终端输入的，不翻译了 Installing the Configuration Program 安装配置程序 Note: you may wish to skip the configuration program and configure the client by hand. 注意：你可能想要跳过安装配置程序，并且手工配置客户端 1. add the following lines to the sources list file, /etc/apt/sources.list : 1.添加下面几行到源列表，/etc/apt/sources.list # James [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>引言:前段时间一直没空翻译，所以直接贴了英文版的在上面，可能难为了那些英文比我还烂的童鞋（本人至今公共英语四级未通过），今天拿来翻译下，上面一行是英文，下面一行是中文，翻译的不好的地方请大家指教</p></blockquote>
<p>Installing the Client Program<br />
安装客户端程序<br />
Install PPTP Client from the Ubuntu Project:<br />
从Ubuntu Project安装PPTP客户端<br />
apt-get install pptp-linux<br />
上面那行是命令，在终端输入的，不翻译了<br />
Installing the Configuration Program<br />
安装配置程序<br />
Note: you may wish to skip the configuration program and configure the client by hand.<br />
注意：你可能想要跳过安装配置程序，并且手工配置客户端<br />
1. add the following lines to the sources list file, /etc/apt/sources.list :<br />
1.添加下面几行到源列表，/etc/apt/sources.list</p>
<blockquote><p># James Cameron's PPTP GUI packaging<br />
deb http://quozl.netrek.org/pptp/pptpconfig ./</p></blockquote>
<p>Note: can use a text editor, or simply cat the lines on to the end of the file using &gt;&gt;, but if you make a mistake in formatting you will likely be told by the apt-get update step.<br />
注意：你可以使用文本编辑器，或者使用  >>  cat这几行到文件末端,但是如果你的格式出错了，在apt-get update时可能会出问题</p>
<p>2. update the list of packages:<br />
2.更新包列表</p>
<p>apt-get update<br />
上面是命令</p>
<p>3. install the PPTP Client GUI:<br />
3.安装PPTP客户端GUI程序</p>
<p>apt-get install pptpconfig<br />
上面是命令</p>
<p>Note: you may be told that the packages could not be authenticated. For the moment, tell your system to install them anyway. We'll take patches to our release process if anyone can explain simply how to provide authentication.<br />
这句太麻烦，不翻译了，大概意思是如果系统提示无法验证包，请选择无论如何都安装</p>
<p>Configuration, by hand<br />
手工配置</p>
<p>1. obtain from your PPTP Server administrator:<br />
1.从你的PPTP服务器管理员处获取：</p>
<p>* the IP address or host name of the server ($SERVER),<br />
* 服务器的IP地址或名称(下面用$SERVER代替)<br />
* the name you wish to use to refer to the tunnel ($TUNNEL),<br />
* VPN连接的通道名称(下面用$TUNNEL代替)(译者注:一般情况下，通道名称可以自己起，比如我就是用vpn这三个字母做通道名称的)<br />
* the authentication domain name ($DOMAIN),<br />
* 验证域的名称(下面用$DOMAIN代替)(译者注:一般是没有这个东西，留空就好)<br />
* the username you are to use ($USERNAME),<br />
* 拨号用的用户名(下面用$USERNAME代替)<br />
* the password you are to use ($PASSWORD),<br />
* 拨号用的密码(下面用$PASSWORD代替)<br />
* whether encryption is required.<br />
* 是否要求加密</p>
<p>In the steps below, substitute these values manually. For example, where we write $PASSWORD we expect you to replace this with your password.<br />
这句话的内容都在上面的注释里了，不翻译了</p>
<p>2. create or edit the /etc/ppp/options.pptp file, which sets options common to all tunnels:<br />
2.创建或者编辑 /etc/ppp/options.pptp文件，这个是所有通道的共同设置</p>
<p>下面这个是文件的内容</p>
<blockquote><p>lock noauth nobsdcomp nodeflate</p></blockquote>
<p>3. create or add lines to the /etc/ppp/chap-secrets file, which holds usernames and passwords:<br />
3. 创建或者添加下面这些行到  /etc/ppp/chap-secrets 文件，这个文件存储用户名和密码</p>
<blockquote><p>$DOMAIN\\$USERNAME PPTP $PASSWORD * #备注:$DOMAIN可以不要</p></blockquote>
<p>Note: if you are using a PPTP Server that does not require an authentication domain name, omit the slashes as well as the domain name.<br />
这句是我上面的备注内容，不翻译了</p>
<p>Note: if the passwords contain any special characters, quote them. See man pppd for more details.<br />
注意：如果密码中有特殊字符，用双引号引起来</p>
<p>4. create a /etc/ppp/peers/$TUNNEL file:<br />
4. 创建 /etc/ppp/peers/$TUNNEL 文件内容如下</p>
<blockquote><p>pty "pptp $SERVER --nolaunchpppd"<br />
name $DOMAIN\\$USERNAME<br />
remotename PPTP<br />
require-mppe-128<br />
file /etc/ppp/options.pptp<br />
ipparam $TUNNEL</p></blockquote>
<p>Note: if you do not need MPPE support, then remove the require-mppe-128 option from this file and /etc/ppp/options.pptp.<br />
注意：如果你不需要MPPE支持，从这个文件和/etc/ppp/options.pptp删除 require-mppe-128<br />
5. start the tunnel using the pon command:<br />
5. 用pon命令连接VPN</p>
<blockquote><p>pon $TUNNEL</p></blockquote>
<p>to further diagnose a failure, add options to the command:</p>
<p>pon $TUNNEL debug dump logfd 2 nodetach</p>
<p>Note: we have further information on enabling debug mode, and on diagnosing problems.</p>
<p>6. stop the tunnel using the poff command:<br />
6. 用poff命令断开连接</p>
<blockquote><p>poff $TUNNEL</p></blockquote>
<p>注：上面的翻译已经足够连接上VPN服务器了，下面是讲创建启动脚本的，这里就不翻译了，有空继续下面的翻译</p>
<p>7. to script the tunnel connection so that something is done as soon as the tunnel is up, use either ip-up.d scripts or the updetach keyword.</p>
<p>1. see the Routing HOWTO for examples of ip-up.d scripting that adds routes or iptables rules.</p>
<p>2. using updetach will cause pppd to fork, detach, and exit with success once the network link is up. This example connects a provider link, then the tunnel, then runs fetchmail to get new e-mail:</p>
<p>pon provider updetach &amp;&amp; pon $TUNNEL updetach &amp;&amp; fetchmail</p>
<p>Note: the double ampersand &amp;&amp; means that the commands following it will only be executed if the command to the left of it was successful. If the tunnel fails to connect, the fetchmail will not happen.</p>
<p>8. to have the tunnel automatically restarted if it fails, add the option persist to either the command line or the /etc/ppp/peers/$TUNNEL file.</p>
<p>9. to have the tunnel started on system boot:</p>
<p>* for Debian Sarge and later, edit the /etc/network/interfaces file, and add this section:</p>
<p>auto tunnel<br />
iface tunnel inet ppp<br />
provider $TUNNEL</p>
<p>* for Debian Woody, edit the /etc/ppp/no_ppp_on_boot file, remove the first line comment, and change the word provider to the name of your tunnel, so that it looks like this:</p>
<p>#!/bin/sh<br />
...<br />
$PPPD call $TUNNEL</p>
<p>(The line ... means the other lines in the file, it doesn't mean a line with three dots.)</p>
<p>Then rename the no_ppp_on_boot file and make it executable:</p>
<p># mv /etc/ppp/no_ppp_on_boot /etc/ppp/ppp_on_boot<br />
# chmod +x /etc/ppp/ppp_on_boot</p>
<p>Every time your computer starts, the tunnel will be started automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/127.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>给SSH设置代理</title>
		<link>http://www.killwin.com/articles/119.html</link>
		<comments>http://www.killwin.com/articles/119.html#comments</comments>
		<pubDate>Fri, 01 Jan 2010 06:07:22 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[代理]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=119</guid>
		<description><![CDATA[这个月没网费了，刚好在学校机房有个能做代理上网的服务器，上网问题是解决了，可是要用SSH管理服务器咋办？ 下面就来解决这个问题 $ sudo apt-get install corkscrew $ sudo vim /etc/ssh/ssh_config 添加几行 Host 要通过代理连接的服务器地址，全部通过代理用*表示 ProxyCommand /usr/bin/corkscrew 代理服务器IP 代理端口 %h %p 现在ssh到服务器，是不是能连上了？]]></description>
			<content:encoded><![CDATA[<p>这个月没网费了，刚好在学校机房有个能做代理上网的服务器，上网问题是解决了，可是要用SSH管理服务器咋办？<br />
下面就来解决这个问题</p>
<blockquote><p>
$ sudo apt-get install corkscrew<br />
$ sudo vim /etc/ssh/ssh_config
</p></blockquote>
<p>添加几行</p>
<blockquote><p>
Host 要通过代理连接的服务器地址，全部通过代理用*表示<br />
ProxyCommand /usr/bin/corkscrew 代理服务器IP 代理端口 %h %p
</p></blockquote>
<p>现在ssh到服务器，是不是能连上了？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/119.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决Firefox下iBus输入法无效的问题</title>
		<link>http://www.killwin.com/articles/103.html</link>
		<comments>http://www.killwin.com/articles/103.html#comments</comments>
		<pubDate>Fri, 04 Dec 2009 09:27:10 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[软件]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[iBus]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=103</guid>
		<description><![CDATA[就在刚刚，我快崩溃了，因为Firefox下面不能输入中文了，iBus切换不出来了，原因未知，Google许久，非常艰难的，找到一个应急方法 $ sudo vim /usr/bin/firefox 在开头加入 ########### XMODIFIERS=@im=ibus GTK_IM_MODULE=ibus export XMODIFIERS GTK_IM_MODULE ########### 重启firefox，问题解决]]></description>
			<content:encoded><![CDATA[<p>就在刚刚，我快崩溃了，因为Firefox下面不能输入中文了，iBus切换不出来了，原因未知，Google许久，非常艰难的，找到一个应急方法</p>
<blockquote><p>$ sudo vim /usr/bin/firefox</p></blockquote>
<p>在开头加入</p>
<blockquote><p>
###########<br />
XMODIFIERS=@im=ibus<br />
GTK_IM_MODULE=ibus<br />
export XMODIFIERS GTK_IM_MODULE<br />
###########
</p></blockquote>
<p>重启firefox，问题解决</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/103.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>sudo不输入密码的方法</title>
		<link>http://www.killwin.com/articles/79.html</link>
		<comments>http://www.killwin.com/articles/79.html#comments</comments>
		<pubDate>Wed, 11 Nov 2009 02:25:13 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[M$]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://www.killwin.com/?p=79</guid>
		<description><![CDATA[sudo命令就是从普通用户切换到特权用户，也就是root，其实Windows Vista和Windows 7下面的UAC就是模仿这个做出来的，我只能说M$太不要脸了，从开源软件获取了那么多，没有任何付出，还要倒打一耙，可能有人会说，微软不是给开源捐过钱么，可是你敢相信微软么？当开源做出一点贡献了，微软就要拿来卖钱了，本来应该属于全人类的开源成果，就被微软独吞了，但是就微软捐的那点钱，在开源基金会里面有多大？可能连粮仓里面的一粒麦子都不到，我实在佩服微软。 扯的太远了，回归主题，在网上找找，你能找到很多解决方法，Google第一页就很多方法，当然你按照那些方法是可以成功，但是我觉得不安全，那些方法很多都是修改/etc/sudoers权限为740再加上一句 ALL=NOPASSWD:ALL 或者加一句 yourname ALL=(ALL) NOPASSWD: ALL 然后权限改回440 先说第一种，这样做，全部的用户都有了sudo权限，而且不要密码的，安全性非常差。两种共有的缺陷是，这样做没有检测语法，如果不下心手抖一下打错了，那你就再也没有sudo的权限了，非常危险。 可能很多人还不知道有visudo这个东西,这种方法非常安全，我的方法是，执行 $sudo visudo 找到 %admin ALL=(ALL) ALL 注释之，在下面加上 %admin ALL=(ALL) NOPASSWD: ALL 意思是属于admin组的用户可以不需要输入密码执行sudo 如果是 admin ALL=(ALL) NOPASSWD: ALL 也就是去掉百分号，意思就是admin这个用户可以执行sudo 这样做的好处是避免了输入错误，如果出错，退出之后会提示你出错，按e重新编辑，不会出现进不了sudo的情况，安全了很多]]></description>
			<content:encoded><![CDATA[<p>sudo命令就是从普通用户切换到特权用户，也就是root，其实Windows Vista和Windows 7下面的UAC就是模仿这个做出来的，我只能说M$太不要脸了，从开源软件获取了那么多，没有任何付出，还要<a href="http://www.cnbeta.com/articles/92891.htm" target="_blank">倒打一耙</a>，可能有人会说，<a href="http://www.cnbeta.com/articles/93119.htm" target="_blank">微软不是给开源捐过钱么</a>，可是你敢相信微软么？当开源做出一点贡献了，微软就要拿来卖钱了，<a href="http://www.cnbeta.com/articles/93299.htm">本来应该属于全人类的开源成果，就被微软独吞了</a>，但是就微软捐的那点钱，在开源基金会里面有多大？可能连粮仓里面的一粒麦子都不到，我实在佩服微软。<br />
扯的太远了，回归主题，在网上找找，你能找到很多解决方法，<a href="http://www.google.cn/search?hl=zh-CN&amp;newwindow=1&amp;q=sudo+%E4%B8%8D%E8%BE%93%E5%85%A5%E5%AF%86%E7%A0%81&amp;btnG=Google+%E6%90%9C%E7%B4%A2&amp;aq=f&amp;oq=" target="_bank">Google</a>第一页就很多方法，当然你按照那些方法是可以成功，但是我觉得<strong><span style="color: #ff0000;">不安全</span></strong>，那些方法很多都是修改/etc/sudoers权限为740再加上一句</p>
<blockquote><p>ALL=NOPASSWD:ALL</p></blockquote>
<p>或者加一句</p>
<blockquote><p>yourname   ALL=(ALL)  NOPASSWD:  ALL</p></blockquote>
<p>然后权限改回440</p>
<p>先说第一种，这样做，全部的用户都有了sudo权限，而且不要密码的，安全性非常差。两种共有的缺陷是，这样做没有检测语法，如果不下心手抖一下打错了，那你就再也没有sudo的权限了，<span style="color: #ff0000;"><strong>非常危险</strong></span>。</p>
<p>可能很多人还不知道有visudo这个东西,<span style="color: #00ff00;"><strong>这种方法非常安全</strong></span>，我的方法是，执行<br />
<span id="more-79"></span></p>
<blockquote><p>$sudo visudo</p></blockquote>
<p>找到</p>
<blockquote><p>%admin ALL=(ALL) ALL</p></blockquote>
<p>注释之，在下面加上</p>
<blockquote><p>%admin ALL=(ALL) NOPASSWD: ALL</p></blockquote>
<p>意思是属于admin组的用户可以不需要输入密码执行sudo<br />
如果是</p>
<blockquote><p>admin ALL=(ALL) NOPASSWD: ALL</p></blockquote>
<p>也就是去掉百分号，意思就是admin这个用户可以执行sudo</p>
<p>这样做的好处是避免了输入错误，如果出错，退出之后会提示你出错，按e重新编辑，不会出现进不了sudo的情况，安全了很多</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/79.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 上遇到 GPG error的处理方法</title>
		<link>http://www.killwin.com/articles/73.html</link>
		<comments>http://www.killwin.com/articles/73.html#comments</comments>
		<pubDate>Tue, 03 Nov 2009 02:47:12 +0000</pubDate>
		<dc:creator>LuckyBoy</dc:creator>
				<category><![CDATA[使用]]></category>
		<category><![CDATA[GPG error]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.killwin.com/articels/73.html</guid>
		<description><![CDATA[一般出现这个问题基本上都是都是因为想要装ibus输入法，添加了ppa的源，例如： GPG error: http://ppa.launchpad.net jaunty Release: The following signatures The last 3 times I have updated, this missing key keeps coming up. Can some one direct me to the public key? W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 632D16BB0C713DA6 解决方法是 执行下面两行命令 $gpg [...]]]></description>
			<content:encoded><![CDATA[<p>一般出现这个问题基本上都是都是因为想要装ibus输入法，添加了ppa的源，例如：</p>
<blockquote><p>GPG error: http://ppa.launchpad.net jaunty Release: The following signatures<br />
The last 3 times I have updated, this missing key keeps coming up. Can some one direct me to the public key?<br />
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 632D16BB0C713DA6</p></blockquote>
<p>解决方法是 执行下面两行命令</p>
<blockquote><p>$gpg --keyserver keyserver.ubuntu.com --recv NO_PUBKEY的最后8位<br />
$gpg --export --armor NO_PUBKEY的最后8位 | sudo apt-key add -</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.killwin.com/articles/73.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

