Linux 開機後數字小鍵盤預設是關閉的,可以透過兩處設定讓它自動亮起。
在 /etc/rc.local 中加入:
for t in 1 2 3 4 5 6 7 8
do
setleds -D +num
$t >/dev/null
done
上述做法只在文字模式有效。若希望在 X Window 下也自動開啟,需要 numlockx:
yum install -y numlockx
安裝後把這段寫進 /etc/rc.local:
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
其實在終端直接執行 numlockx on 就會立刻亮起小鍵盤,寫入 rc.local 只是為了讓開機自動執行。