第 4 章 terminal
使用下面的命令获得本机支持的显示模式
vidcontrol -i mode < /dev/ttyv0
root@netkiller:/root # vidcontrol -i mode < /dev/ttyv0 mode# flags type size font window linear buffer ------------------------------------------------------------------------------ 0 (0x000) 0x00000001 T 40x25 8x8 0xb8000 32k 32k 0x00000000 32k 1 (0x001) 0x00000001 T 40x25 8x8 0xb8000 32k 32k 0x00000000 32k 2 (0x002) 0x00000001 T 80x25 8x8 0xb8000 32k 32k 0x00000000 32k 3 (0x003) 0x00000001 T 80x25 8x8 0xb8000 32k 32k 0x00000000 32k 4 (0x004) 0x00000003 G 320x200x2 C 8x8 0xb8000 32k 32k 0x00000000 32k 5 (0x005) 0x00000003 G 320x200x2 C 8x8 0xb8000 32k 32k 0x00000000 32k 6 (0x006) 0x00000003 G 640x200x1 C 8x8 0xb8000 32k 32k 0x00000000 32k 13 (0x00d) 0x00000003 G 320x200x4 4 8x8 0xa0000 64k 64k 0x00000000 256k 14 (0x00e) 0x00000003 G 640x200x4 4 8x8 0xa0000 64k 64k 0x00000000 256k 16 (0x010) 0x00000003 G 640x350x2 2 8x14 0xa0000 64k 64k 0x00000000 128k 18 (0x012) 0x00000003 G 640x350x4 4 8x14 0xa0000 64k 64k 0x00000000 256k 19 (0x013) 0x00000001 T 40x25 8x14 0xb8000 32k 32k 0x00000000 32k 20 (0x014) 0x00000001 T 40x25 8x14 0xb8000 32k 32k 0x00000000 32k 21 (0x015) 0x00000001 T 80x25 8x14 0xb8000 32k 32k 0x00000000 32k 22 (0x016) 0x00000001 T 80x25 8x14 0xb8000 32k 32k 0x00000000 32k 23 (0x017) 0x00000001 T 40x25 8x16 0xb8000 32k 32k 0x00000000 32k 24 (0x018) 0x00000001 T 80x25 8x16 0xb8000 32k 32k 0x00000000 32k 26 (0x01a) 0x00000003 G 640x480x4 4 8x16 0xa0000 64k 64k 0x00000000 256k 27 (0x01b) 0x00000003 G 640x480x4 4 8x16 0xa0000 64k 64k 0x00000000 256k 28 (0x01c) 0x00000003 G 320x200x8 P 8x8 0xa0000 64k 64k 0x00000000 64k 30 (0x01e) 0x00000001 T 80x50 8x8 0xb8000 32k 32k 0x00000000 32k 32 (0x020) 0x00000001 T 80x30 8x16 0xb8000 32k 32k 0x00000000 32k 34 (0x022) 0x00000001 T 80x60 8x8 0xb8000 32k 32k 0x00000000 32k 37 (0x025) 0x00000003 G 320x240x8 V 8x8 0xa0000 64k 64k 0x00000000 256k 112 (0x070) 0x00000000 T 80x43 8x8 0xb8000 32k 32k 0x00000000 32k 113 (0x071) 0x00000001 T 80x43 8x8 0xb8000 32k 32k 0x00000000 32k 257 (0x101) 0x0000000f G 640x480x8 P 8x16 0xa0000 64k 64k 0x80000000 300k 259 (0x103) 0x0000000f G 800x600x8 P 8x16 0xa0000 64k 64k 0x80000000 487k 261 (0x105) 0x0000000f G 1024x768x8 P 8x16 0xa0000 64k 64k 0x80000000 768k 273 (0x111) 0x0000000f G 640x480x16 D 8x16 0xa0000 64k 64k 0x80000000 600k 274 (0x112) 0x0000000f G 640x480x32 D 8x16 0xa0000 64k 64k 0x80000000 1200k 276 (0x114) 0x0000000f G 800x600x16 D 8x16 0xa0000 64k 64k 0x80000000 937k 277 (0x115) 0x0000000f G 800x600x32 D 8x16 0xa0000 64k 64k 0x80000000 1875k 279 (0x117) 0x0000000f G 1024x768x16 D 8x16 0xa0000 64k 64k 0x80000000 1536k 280 (0x118) 0x0000000f G 1024x768x32 D 8x16 0xa0000 64k 64k 0x80000000 3072k
使用下面命令改变当前屏幕的分辨率 280 为 1024x768x32
# vidcontrol MODE_280
启动时生效,就在 /etc/rc.conf 加入
allscreens_flags="MODE_280"
4.2. 屏幕保护
方法一,编辑 /etc/rc.conf 文件加入
blanktime=”60″ saver=”daemon”
方法二,sysinstall
选择 Configure——Console——Saver—–Timeout(设置屏保时间60秒) 在选则 Daemon
屏保文件
# ls /boot/kernel/*saver* | grep -v symbols /boot/kernel/beastie_saver.ko /boot/kernel/blank_saver.ko /boot/kernel/daemon_saver.ko /boot/kernel/dragon_saver.ko /boot/kernel/fade_saver.ko /boot/kernel/fire_saver.ko /boot/kernel/green_saver.ko /boot/kernel/logo_saver.ko /boot/kernel/rain_saver.ko /boot/kernel/snake_saver.ko /boot/kernel/star_saver.ko /boot/kernel/warp_saver.ko
屏保预览
# kldload logo_saver # kldload fire_saver # kldload rain_saver
kldload 不能重复运行,已经载入的屏保不能再重新载入,使用下面命令查看详情。
# kldstat Id Refs Address Size Name 1 22 0xffffffff80200000 1323388 kernel 5 1 0xffffffff81612000 861 snake_saver.ko 6 1 0xffffffff81613000 a2d fire_saver.ko 7 1 0xffffffff81614000 e89 dragon_saver.ko 8 1 0xffffffff81615000 11ad daemon_saver.ko 9 1 0xffffffff81617000 4dd star_saver.ko 10 1 0xffffffff81618000 9cd rain_saver.ko 11 1 0xffffffff81619000 c4d warp_saver.ko
4.3. 键盘设置
使用linux的用户转到BSD很不适应终端键盘设置
bindkey "^[[1~" beginning-of-line bindkey "^[[4~" end-of-line bindkey "^[[3~" delete-char