Activating Numlock on Bootup
From ArchWiki
| i18n |
|---|
| English |
| 简体中文 |
| Español |
Contents |
[edit] Virtual Consoles 1-6
To activate the numlock during normal bootup in virtual consoles 1-6 (vc/n), add the following line to /etc/rc.local:
for i in $(seq 6); do /usr/bin/setleds -D +num < /dev/vc/${i} >/dev/null; done
[edit] X window
If you use startx to start your X window session, simply install the numlockx package and add it to your ~/.xinitrc file.
Install numlockx:
pacman -S numlockx
Add it to ~/.xinitrc before exec:
#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # numlockx & exec your_window_manager
[edit] KDM
If you use KDM as a login manager, add :
numlockx on
to your /opt/kde/share/config/kdm/Xsetup.
[edit] KDE Users
You may alternatively add a script to your ~/.kde/Autostart directory:
nano ~/.kde/Autostart/numlockx
Add the following:
#!/bin/sh numlockx on
And make it executable:
chmod +x ~/.kde/Autostart/numlockx
[edit] GDM
GDM users may add the following code to /etc/gdm/Init/Default :
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi