方法5.把下面的保存成VBS脚本,执行。 $ Z* O# r X: [$ oset WshShell=CreateObject("WScript.shell") & R! y2 B- A8 @
WshShell.SendKeys"{NUMLOCK}" , |' h: o5 |+ s. \' X& q- U$ E Linux6 }- p' Z' i/ f7 W
1.* l. Y3 a) U% j% }
5 Y$ l9 h2 M! O h, N6 f0 F' y
[root@localhost ~]# cat /etc/rc.d/rc.local ! l, V$ z( b3 y8 D/ O
#!/bin/sh - n9 C: W4 I2 P( F# 3 g0 D' w. i; n( T. x% e
# This script will be executed *after* all the other init scripts. 9 y0 w$ |! J) z. F
# You can put your own initialization stuff in here if you don't 4 C, z1 D# r1 P" D3 r, V. u+ W# want to do the full Sys V style init stuff. 1 p" ^, a1 A9 }* R( pINITTY=/dev/tty[1-8] ; M2 Y/ i6 n* M1 o$ D. {for tty in $INITTY; do ! l" e5 X" @2 a" c5 |' C2 v
setleds -D +num < $tty / |; N. E- |5 L
done 0 Q+ n6 ]# o. x: ^ m' M5 M" Ttouch /var/lock/subsys/local9 }% h& j+ D1 R) n! n
2.在man setleds的描述中,有一段设置字符控制台数字灯的脚本 注意的是:设置字符控制台数字灯 在字符模式下,也可以这样: setleds -D +num/+caps/+scroll作者: 爱的伤痕 时间: 2008-12-4 09:40