让numlock开机就亮的方法
授权方式:署名,非商业用途,保持一致,转载时请务必以超链接(http://www.fwolf.com/blog/post/352)的形式标明文章原始出处和作者信息及本声明。numlock开机就亮,输入数字的时候就不用再按一下NumLock键了,有时候总是忘,所以事虽然小但很不方便。从网上我一共找到3种方法:
1、在/etc/rc.d/rc.local中加入:
for t in 1 2 3 4 5 6 7 8
do
setleds –D +num
$t>/dev/null
done
不过setleds在我这里怎么用也不行。
2、在/etc/console-tools/config这个文件靠近最后的几行:
# Turn on numlock by default
#LEDS=+num
去掉第二行的注释就可以了,不过好像只能用于纯控制台,对图形界面无效。
3、先安装numlockx这个小工具:
sudo apt-get install numlockx
然后编辑/etc/X11/gdm/Init/Default这个文件(注意备份),在最后一行exit 0前面添加:
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
然后再重启就可以了,在我的Ubuntu 7.04,xfce桌面环境下成功。
参考:
No tags for this post.
![[Bloglines]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/bloglines.png)
![[co.mments]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/comments.png)
![[del.icio.us]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/digg.png)
![[diigo]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/diigo.png)
![[Facebook]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/furl.png)
![[Google]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/google.png)
![[MySpace]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/reddit.png)
![[Rojo]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/rojo.png)
![[Slashdot]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/technorati.png)
![[Windows Live]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/email.png)
September 5th, 2007 at 8:18:47
想当年我也是这么干的, 看到这文章, 蓦然发现已经N长时间没有碰*nix了
September 5th, 2007 at 10:41:14
是啊,有的时候回头看看,时间过得真是很快呢
一眨眼我用linux也已经一年多了(2006年4、5月)