Linux系统在开机时自行启动小键盘的技巧

摘自: linux.ccidnet.com  被阅读次数: 51


yangyi 于 2008-04-29 19:00:24 提供


在Linux系统中,开机的时候是默认小数字键盘是关闭的,可通过如下途径来更改设置,让其在开机的时候启动:

在/etc/rc.local中加入:

for t in 1 2 3 4 5 6 7 8
  do
   setleds –D +num
   $t>/dev/null
  done

这只是在文本模式下会打开如果想在Xwindow下也能打开,需要一个软件才行,叫numlockx,通过yum安装:

yum install -y numlockx

安装好之后可以讲下述语句写入/etc/rc.local中:

if [ -x /usr/bin/numlockx ]; then   
/usr/bin/numlockx on
fi

我认为直接写一句:numlockx也可以,因为在终端中运行这一句就会把小键盘打开。

原文链接: http://tech.ccidnet.com/art/302/...