启动时打开数字键
From ArchWiki
| i18n |
|---|
| English |
| 简体中文 |
Contents |
[edit] 虚拟控制台1-6
在/etc/rc.local加入下面的代码:
for i in $(seq 6); do /usr/bin/setleds -D +num < /dev/vc/${i} >/dev/null; done
[edit] X window
如果你使用startx来启动X window会话,只需要安装numlockx软件包并把它加入到你的~/.xinitrc文件中。
安装numlockx软件包:
pacman -S numlockx
并在~/.xinitrc中窗口管理器启动位置之前加入:
#!/bin/sh # # ~/.xinitrc # # Executed by startx (run your window manager from here) # numlockx & exec your_window_manager
[edit] SLiM
编辑/etc/slim.conf 取消# numlock on 这行的注释
[edit] KDM
如果你使用KDM作为登录管理器,可以在/opt/kde/share/config/kdm/Xsetup中加入这行:
numlockx on
[edit] KDE
可以在KDE自启动目录~/.kde/Autostart中加入numlockx的启动项:
nano ~/.kde/Autostart/numlockx
在该文件中加入:
#!/bin/sh numlockx on
然后为其加上可执行权限:
chmod +x ~/.kde/Autostart/numlockx
[edit] GDM
GDM用户可以将以下代码加入到/etc/gdm/Init/Default:
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
Categories: 简体中文 | 启动过程 | 桌面环境 | 其它桌面用户资源 | HOWTOs (简体中文)