tyfrlj 发表于 2003-10-28 22:37:00

NumLock自动启用(包括控制台和X)

http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=42319
----------------------------------
#! /bin/sh
# /etc/init.d/ljev: set the users EV.
#setleds用于控制台启用NumLock

PATH=/bin:/usr/bin:/sbin:/usr/sbin

INITTY=/dev/tty
for tty in $INITTY; do
        setleds -D +num < $tty
done

#case "$1" in
#start)
#    ;;
#stop)
#    ;;
#*)
#    exit 1
#esac

exit 0
----------------------------------
# /etc/X11/Xsession.d/55numlockx
# In the script that called this, set -e has been set. Errors in any
# command will abort the entire script and X won't start. By putting
# this part in a subshell, any errors will abort the subshell - which
# we want, in case numlockx fails.
# The 'true' at the end ensures that the entire script will never end
# with an error code, even if there was an error.
# Ariel Shkedi <[email protected]>
# numlockx用于X启用NumLock

(
test -x /usr/bin/X11/numlockx && /usr/bin/X11/numlockx on
)

true

tyfrlj 发表于 2003-11-1 12:54:47

建议ML把这个功能加到系统里。

baif 发表于 2003-11-1 15:40:29

建议ML把这个功能加到系统里。

如果使用KDE的话,是可以使用KDE设置的。

tyfrlj 发表于 2003-11-1 15:54:44

我用的这个方法是通用的,X启动*dm还没运行NumLock就打开了,6个控制台的NumLock也全部打开了。这样不管用KDE还是FVWM、Gnome、……都可以直接使用数字小键盘了。
KDE里有这个设置吗?我不知道在哪里设置的。
页: [1]
查看完整版本: NumLock自动启用(包括控制台和X)