配置Ubuntu在开机时自动开启NumLock
打开终端,安装numlockx程序:
sudo apt-get install numlockx
编辑/etc/rc.local文件:
sudo gedit /etc/rc.local
在exit 0前,插入:
Numlock enable [ -x /usr/bin/numlockx ] && numlockx on
for tty in /dev/tty[1-9]*;do
setleds -D +num < $tty
done
编辑/usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf文件:
sudo gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
在文件末尾加入:
greeter-setup-script=/usr/bin/numlockx on
参考:
https://jingyan.baidu.com/article/358570f65c46ddce4724fcbb.html
页面版本: 1, 最后编辑于: 12 Apr 2021 09:00