numlockx paketini yükledikten sonra /etc/default/numlockx ve /etc/X11/Xsession.d/55numlockx yollarında otomatik olarak dosya oluşur, ayrı bir işlem yapmaya gerek yok, eğer bu dosyalar yoksa alttaki gibi manuel olarak oluşturup deneyin.
Önce yüklemediyseniz...
sudo apt-get install numlockx
Şimdi her iki yolda bahsettiğim dosyaların oluşup oluşmadığını kontrol edin, dosyalar yoksa alttaki yönergeye devam edin.
/etc/default/ yolunda boş bir not defteri içine alttakini yapıştırın, ismini numlockx yapın, kaydedin ve kapatın.
# Configuration file for numlockx
# State of numlog on start of X session
# Accepts following options:
# auto - turns numlock on unless ran on laptop
# on - turns numlock on
# off - turns numlock off
# keep - does not change numlock state
# toggle - toggles numlock state
NUMLOCK=auto
/etc/X11/Xsession.d/ yolunda boş bir not defteri içine alttakini yapıştırın, ismini 55numlockx yapın, kaydedin ve kapatın.
# Initial settings
NUMLOCK=auto
# Load configuration
cf=/etc/default/numlockx
[ ! -r $cf ] || . $cf
# Toggle numlock if we're not removed
nlx=/usr/bin/numlockx
[ ! -x $nlx ] || {
case $NUMLOCK in
# 'keep' is an undocumented state (see `man 1 numlockx'), though
# /etc/default/numlockx mentions it; do nothing
keep)
return 0
;;
off|on|toggle)
;;
*)
NUMLOCK=on
ltd=/usr/sbin/laptop-detect
[ ! -x $ltd ] || ! $ltd || NUMLOCK=off
# Enable numlock for USB keyboard on laptop
if [ -f /bin/udevadm ] ; then
for kbd in `udevadm trigger --dry-run --verbose --property-match=ID_INPUT_KEYBOARD=1` ; do
if udevadm info --query=env --path=$kbd | grep -q '^DEVNAME=' ; then
continue
fi
if udevadm info --query=env --path=$kbd | grep -q '^ID_USB_DRIVER=usbhid' ; then
NUMLOCK=on
fi
done
fi
;;
esac
$nlx $NUMLOCK || :
}
# EOF
Bu işlemi yaptıktan sonra eğer numlock tuşu otomatik açılmıyorsa sürüm desteği yok demektir, ancak buna ihtimal vermiyorum, zira son sürümlerin bazı masa üstlerinde numlockx paketi varsayılan olarak yüklü geliyor.